Skip to content

Commit

Permalink
Merge pull request #56 from przemeklal/glide_to_go_modules
Browse files Browse the repository at this point in the history
replace glide with go modules
  • Loading branch information
garyloug authored Oct 14, 2020
2 parents c491716 + 0758c8b commit 6e9ee3a
Show file tree
Hide file tree
Showing 17,227 changed files with 684 additions and 5,005,206 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ userspace/userspace
cnivpp/test/memifAddDel/memifAddDel
cnivpp/test/vhostUserAddDel/vhostUserAddDel
cnivpp/test/ipAddDel/ipAddDel
cnivpp/bin_api/
docker/usrsp-app/usrsp-app
docker/vpp-centos-userspace-cni/usrsp-app
docker/ovs-centos-userspace-cni/usrsp-app
vendor/git.fd.io/govpp.git/core/bin_api/
vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator
docker/unit-tests/Dockerfile.*
!docker/unit-tests/Dockerfile.*.in
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
language: go

go: 1.14.x

before_install:
- sudo apt-get update -qq

Expand Down
24 changes: 7 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,24 +106,13 @@ help:
@echo ""
@echo " Supported OS distributions for unit testing are: $(UT_OS_ALL)"
@echo ""
@echo "Other:"
@echo " glide update --strip-vendor - Recalculate dependancies and update *vendor\* with proper packages."
@echo ""
# @echo "Makefile variables (debug):"
# @echo " SUDO=$(SUDO) OS_ID=$(OS_ID) OS_VERSION_ID=$(OS_VERSION_ID) PKG=$(PKG) VPPVERSION=$(VPPVERSION) $(VPPDOTVERSION)"
# @echo " VPPLIBDIR=$(VPPLIBDIR)"
# @echo " VPPINSTALLED=$(VPPINSTALLED) VPPLCLINSTALLED=$(VPPLCLINSTALLED)"
# @echo ""

build:
ifeq ($(VPPINSTALLED),0)
@echo VPP not installed. Run *make install* to install the minimum set of files to compile, or install VPP.
@echo
endif
@cd vendor/git.fd.io/govpp.git/cmd/binapi-generator && go build -v
@./vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator \
--input-dir=/usr/share/vpp/api/ \
--output-dir=vendor/git.fd.io/govpp.git/core/bin_api/
build: generate
@cd userspace && go build -v

test-app:
Expand Down Expand Up @@ -221,18 +210,14 @@ endif


extras:
@cd vendor/git.fd.io/govpp.git/cmd/binapi-generator && go build -v
@./vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator \
--input-dir=/usr/share/vpp/api/ \
--output-dir=vendor/git.fd.io/govpp.git/core/bin_api/
@cd docker/usrsp-app && go build -v

clean: test-clean
@rm -f docker/usrsp-app/usrsp-app
@rm -f cnivpp/test/memifAddDel/memifAddDel
@rm -f cnivpp/test/vhostUserAddDel/vhostUserAddDel
@rm -f cnivpp/test/ipAddDel/ipAddDel
@rm -f vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator
@rm -rf cnivpp/bin_api
@rm -f userspace/userspace
ifeq ($(VPPLCLINSTALLED),1)
@echo VPP was installed by *make install*, so cleaning up files.
Expand All @@ -246,6 +231,11 @@ ifeq ($(VPPLCLINSTALLED),1)
endif

generate:
ifeq ($(VPPINSTALLED),0)
@echo VPP not installed. Run *make install* to install the minimum set of files to compile, or install VPP.
@echo
endif
for package in cnivpp/api/* ; do cd $$package ; pwd ; go generate ; cd - ; done

lint:

Expand Down
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* [Contacts](#contacts)
* [Userspace CNI plugin](#userspace-cni-plugin)
* [Build & Clean](#build--clean)
* [Update dependencies in vendor/](#update-dependencies-in-vendor)
* [Update dependencies](#update-dependencies)
* [Network Configuration Reference](#network-configuration-reference)
* [Work Standalone](#work-standalone)
* [Integrated with Multus Plugin](#integrated-with-multus-plugin)
Expand Down Expand Up @@ -151,14 +151,10 @@ code, perform a make clean:
```


## Update dependencies in vendor/
This project is currently using **glide**. To refresh or update the set
dependancies for this project, run:
```
glide update --strip-vendor
```
This project currently checks in the *glide.lock* and files under the
*vendor* directory.
## Update dependencies
This project is currently using [go modules](https://github.com/golang/go/wiki/Modules)
to manage dependencies. Please refer to official documentation to learn more
about **go modules** behavior and typical [workflow](https://github.com/golang/go/wiki/Modules#daily-workflow).


# Network Configuration Reference
Expand Down
4 changes: 2 additions & 2 deletions cnivpp/api/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
package vppbridge

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"

"git.fd.io/govpp.git/api"
"git.fd.io/govpp.git/core/bin_api/l2"
"github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/l2"
)

//
Expand Down
2 changes: 1 addition & 1 deletion cnivpp/api/infra/infra.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package vppinfra

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"
Expand Down
4 changes: 2 additions & 2 deletions cnivpp/api/interface/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
package vppinterface

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"

"github.com/containernetworking/cni/pkg/types/current"

"git.fd.io/govpp.git/api"
"git.fd.io/govpp.git/core/bin_api/interfaces"
"github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/interfaces"
)

//
Expand Down
4 changes: 2 additions & 2 deletions cnivpp/api/memif/memif.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
package vppmemif

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"net"
"os"
"path/filepath"

"git.fd.io/govpp.git/api"
"git.fd.io/govpp.git/core/bin_api/memif"
"github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/memif"

"github.com/intel/userspace-cni-network-plugin/logging"
)
Expand Down
4 changes: 2 additions & 2 deletions cnivpp/api/vhostuser/vhostuser.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
package vppvhostuser

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"

"git.fd.io/govpp.git/api"
"git.fd.io/govpp.git/core/bin_api/vhost_user"
"github.com/intel/userspace-cni-network-plugin/cnivpp/bin_api/vhost_user"
)

//
Expand Down
2 changes: 1 addition & 1 deletion cnivpp/test/memifAddDel/memifAddDel.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package main

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"
Expand Down
8 changes: 4 additions & 4 deletions cnivpp/test/vhostUserAddDel/vhostUserAddDel.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package main

// Generates Go bindings for all VPP APIs located in the json directory.
//go:generate binapi-generator --input-dir=../../bin_api --output-dir=../../bin_api
//go:generate go run git.fd.io/govpp.git/cmd/binapi-generator --output-dir=../../bin_api

import (
"fmt"
Expand All @@ -29,9 +29,9 @@ import (
_ "git.fd.io/govpp.git/core"
_ "github.com/sirupsen/logrus"

"github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser"
vppbridge "github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge"
vppinfra "github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
vppvhostuser "github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser"
)

//
Expand Down
Loading

0 comments on commit 6e9ee3a

Please sign in to comment.