plugins: update to spec version 1.0.0
Signed-off-by: Dan Williams <dcbw@redhat.com>
This commit is contained in:
@ -24,7 +24,7 @@ import (
|
||||
|
||||
"github.com/containernetworking/cni/pkg/skel"
|
||||
"github.com/containernetworking/cni/pkg/types"
|
||||
"github.com/containernetworking/cni/pkg/types/current"
|
||||
current "github.com/containernetworking/cni/pkg/types/100"
|
||||
"github.com/containernetworking/cni/pkg/version"
|
||||
|
||||
"github.com/containernetworking/plugins/pkg/ns"
|
||||
@ -109,12 +109,19 @@ func cmdAdd(args *skel.CmdArgs) error {
|
||||
// loopback should pass it transparently
|
||||
result = conf.PrevResult
|
||||
} else {
|
||||
loopbackInterface := ¤t.Interface{Name: args.IfName, Mac: "00:00:00:00:00:00", Sandbox: args.Netns}
|
||||
r := ¤t.Result{CNIVersion: conf.CNIVersion, Interfaces: []*current.Interface{loopbackInterface}}
|
||||
r := ¤t.Result{
|
||||
CNIVersion: conf.CNIVersion,
|
||||
Interfaces: []*current.Interface{
|
||||
¤t.Interface{
|
||||
Name: args.IfName,
|
||||
Mac: "00:00:00:00:00:00",
|
||||
Sandbox: args.Netns,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if v4Addr != nil {
|
||||
r.IPs = append(r.IPs, ¤t.IPConfig{
|
||||
Version: "4",
|
||||
Interface: current.Int(0),
|
||||
Address: *v4Addr,
|
||||
})
|
||||
@ -122,7 +129,6 @@ func cmdAdd(args *skel.CmdArgs) error {
|
||||
|
||||
if v6Addr != nil {
|
||||
r.IPs = append(r.IPs, ¤t.IPConfig{
|
||||
Version: "6",
|
||||
Interface: current.Int(0),
|
||||
Address: *v6Addr,
|
||||
})
|
||||
|
Reference in New Issue
Block a user