Skip to content

Commit e2e3502

Browse files
authored
Merge pull request #351 from darkowlzz/cni-100
Update CNI dependencies to v1.0.0
2 parents b18499f + ad06eed commit e2e3502

File tree

7 files changed

+805
-32
lines changed

7 files changed

+805
-32
lines changed

cni/internal/cniutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ package internal
1616
import (
1717
"fmt"
1818

19-
"github.com/containernetworking/cni/pkg/types/current"
19+
current "github.com/containernetworking/cni/pkg/types/100"
2020
"github.com/pkg/errors"
2121
)
2222

cni/internal/cniutil_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import (
1717
"net"
1818
"testing"
1919

20-
"github.com/containernetworking/cni/pkg/types/current"
20+
current "github.com/containernetworking/cni/pkg/types/100"
2121
"github.com/containernetworking/cni/pkg/version"
2222
"github.com/stretchr/testify/assert"
2323
"github.com/stretchr/testify/require"
@@ -51,7 +51,6 @@ func TestInterfaceIPs(t *testing.T) {
5151
},
5252
IPs: []*current.IPConfig{
5353
{
54-
Version: "4",
5554
Interface: &vethIndex,
5655
Address: net.IPNet{
5756
IP: net.IPv4(10, 0, 0, 2),
@@ -60,7 +59,6 @@ func TestInterfaceIPs(t *testing.T) {
6059
Gateway: net.IPv4(10, 0, 0, 1),
6160
},
6261
{
63-
Version: "4",
6462
Interface: &vmIndex,
6563
Address: net.IPNet{
6664
IP: net.IPv4(10, 0, 1, 2),
@@ -69,7 +67,6 @@ func TestInterfaceIPs(t *testing.T) {
6967
Gateway: net.IPv4(10, 0, 1, 1),
7068
},
7169
{
72-
Version: "4",
7370
Interface: &vethIndex,
7471
Address: net.IPNet{
7572
IP: net.IPv4(192, 168, 0, 2),

cni/vmconf/vmconf.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"strings"
3434

3535
"github.com/containernetworking/cni/pkg/types"
36-
"github.com/containernetworking/cni/pkg/types/current"
36+
current "github.com/containernetworking/cni/pkg/types/100"
3737
"github.com/containernetworking/plugins/pkg/ns"
3838
"github.com/pkg/errors"
3939

cni/vmconf/vmconf_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
"testing"
1919

2020
"github.com/containernetworking/cni/pkg/types"
21-
"github.com/containernetworking/cni/pkg/types/current"
21+
current "github.com/containernetworking/cni/pkg/types/100"
2222
"github.com/stretchr/testify/assert"
2323
"github.com/stretchr/testify/require"
2424
"github.com/vishvananda/netlink"
@@ -69,7 +69,6 @@ func TestIPBootParams(t *testing.T) {
6969
VMIfName: "eth0",
7070
VMMTU: 1337,
7171
VMIPConfig: &current.IPConfig{
72-
Version: "4",
7372
Address: net.IPNet{
7473
IP: net.IPv4(10, 0, 0, 2),
7574
Mask: net.IPv4Mask(255, 255, 255, 0),

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ module github.com/firecracker-microvm/firecracker-go-sdk
33
go 1.11
44

55
require (
6-
github.com/containerd/fifo v0.0.0-20191213151349-ff969a566b00
7-
github.com/containernetworking/cni v0.8.1
8-
github.com/containernetworking/plugins v0.9.1
6+
github.com/containerd/fifo v1.0.0
7+
github.com/containernetworking/cni v1.0.1
8+
github.com/containernetworking/plugins v1.0.1
99
github.com/go-openapi/errors v0.20.1
1010
github.com/go-openapi/runtime v0.19.26
1111
github.com/go-openapi/strfmt v0.20.3
@@ -17,6 +17,6 @@ require (
1717
github.com/sirupsen/logrus v1.8.1
1818
github.com/sparrc/go-ping v0.0.0-20190613174326-4e5b6552494c
1919
github.com/stretchr/testify v1.7.0
20-
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
21-
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68
20+
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5
21+
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e
2222
)

go.sum

Lines changed: 795 additions & 17 deletions
Large diffs are not rendered by default.

network.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323

2424
"github.com/containernetworking/cni/libcni"
2525
"github.com/containernetworking/cni/pkg/types"
26-
"github.com/containernetworking/cni/pkg/types/current"
26+
current "github.com/containernetworking/cni/pkg/types/100"
2727
"github.com/containernetworking/plugins/pkg/ns"
2828
"github.com/pkg/errors"
2929
log "github.com/sirupsen/logrus"
@@ -549,7 +549,6 @@ func (conf IPConfiguration) ipBootParam() string {
549549
vmConf := vmconf.StaticNetworkConf{
550550
VMNameservers: conf.Nameservers,
551551
VMIPConfig: &current.IPConfig{
552-
Version: "4",
553552
Address: conf.IPAddr,
554553
Gateway: conf.Gateway,
555554
},

0 commit comments

Comments
 (0)