Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit 6e9ee3a

Browse files
authored
Merge pull request #56 from przemeklal/glide_to_go_modules
replace glide with go modules
2 parents c491716 + 0758c8b commit 6e9ee3a

File tree

17,227 files changed

+684
-5005206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

17,227 files changed

+684
-5005206
lines changed

Diff for: .gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@ userspace/userspace
22
cnivpp/test/memifAddDel/memifAddDel
33
cnivpp/test/vhostUserAddDel/vhostUserAddDel
44
cnivpp/test/ipAddDel/ipAddDel
5+
cnivpp/bin_api/
56
docker/usrsp-app/usrsp-app
67
docker/vpp-centos-userspace-cni/usrsp-app
78
docker/ovs-centos-userspace-cni/usrsp-app
8-
vendor/git.fd.io/govpp.git/core/bin_api/
9-
vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator
109
docker/unit-tests/Dockerfile.*
1110
!docker/unit-tests/Dockerfile.*.in

Diff for: .travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
language: go
22

3+
go: 1.14.x
4+
35
before_install:
46
- sudo apt-get update -qq
57

Diff for: Makefile

+7-17
Original file line numberDiff line numberDiff line change
@@ -106,24 +106,13 @@ help:
106106
@echo ""
107107
@echo " Supported OS distributions for unit testing are: $(UT_OS_ALL)"
108108
@echo ""
109-
@echo "Other:"
110-
@echo " glide update --strip-vendor - Recalculate dependancies and update *vendor\* with proper packages."
111-
@echo ""
112109
# @echo "Makefile variables (debug):"
113110
# @echo " SUDO=$(SUDO) OS_ID=$(OS_ID) OS_VERSION_ID=$(OS_VERSION_ID) PKG=$(PKG) VPPVERSION=$(VPPVERSION) $(VPPDOTVERSION)"
114111
# @echo " VPPLIBDIR=$(VPPLIBDIR)"
115112
# @echo " VPPINSTALLED=$(VPPINSTALLED) VPPLCLINSTALLED=$(VPPLCLINSTALLED)"
116113
# @echo ""
117114

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

129118
test-app:
@@ -221,18 +210,14 @@ endif
221210

222211

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

230215
clean: test-clean
231216
@rm -f docker/usrsp-app/usrsp-app
232217
@rm -f cnivpp/test/memifAddDel/memifAddDel
233218
@rm -f cnivpp/test/vhostUserAddDel/vhostUserAddDel
234219
@rm -f cnivpp/test/ipAddDel/ipAddDel
235-
@rm -f vendor/git.fd.io/govpp.git/cmd/binapi-generator/binapi-generator
220+
@rm -rf cnivpp/bin_api
236221
@rm -f userspace/userspace
237222
ifeq ($(VPPLCLINSTALLED),1)
238223
@echo VPP was installed by *make install*, so cleaning up files.
@@ -246,6 +231,11 @@ ifeq ($(VPPLCLINSTALLED),1)
246231
endif
247232

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

250240
lint:
251241

Diff for: README.md

+5-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* [Contacts](#contacts)
66
* [Userspace CNI plugin](#userspace-cni-plugin)
77
* [Build & Clean](#build--clean)
8-
* [Update dependencies in vendor/](#update-dependencies-in-vendor)
8+
* [Update dependencies](#update-dependencies)
99
* [Network Configuration Reference](#network-configuration-reference)
1010
* [Work Standalone](#work-standalone)
1111
* [Integrated with Multus Plugin](#integrated-with-multus-plugin)
@@ -151,14 +151,10 @@ code, perform a make clean:
151151
```
152152

153153

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

163159

164160
# Network Configuration Reference

Diff for: cnivpp/api/bridge/bridge.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
package vppbridge
1818

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

2222
import (
2323
"fmt"
2424

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

2929
//

Diff for: cnivpp/api/infra/infra.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package vppinfra
1818

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

2222
import (
2323
"fmt"

Diff for: cnivpp/api/interface/interface.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
package vppinterface
1818

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

2222
import (
2323
"fmt"
2424

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

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

3131
//

Diff for: cnivpp/api/memif/memif.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
package vppmemif
1818

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

2222
import (
2323
"net"
2424
"os"
2525
"path/filepath"
2626

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

3030
"github.com/intel/userspace-cni-network-plugin/logging"
3131
)

Diff for: cnivpp/api/vhostuser/vhostuser.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
package vppvhostuser
1818

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

2222
import (
2323
"fmt"
2424

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

2929
//

Diff for: cnivpp/test/memifAddDel/memifAddDel.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package main
1818

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

2222
import (
2323
"fmt"

Diff for: cnivpp/test/vhostUserAddDel/vhostUserAddDel.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package main
1818

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

2222
import (
2323
"fmt"
@@ -29,9 +29,9 @@ import (
2929
_ "git.fd.io/govpp.git/core"
3030
_ "github.com/sirupsen/logrus"
3131

32-
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge"
33-
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
34-
"github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser"
32+
vppbridge "github.com/intel/userspace-cni-network-plugin/cnivpp/api/bridge"
33+
vppinfra "github.com/intel/userspace-cni-network-plugin/cnivpp/api/infra"
34+
vppvhostuser "github.com/intel/userspace-cni-network-plugin/cnivpp/api/vhostuser"
3535
)
3636

3737
//

0 commit comments

Comments
 (0)