Skip to content

Commit

Permalink
Revert "Merge pull request #103 from aws/dev"
Browse files Browse the repository at this point in the history
This reverts commit a04bd6e, reversing
changes made to db58647.
  • Loading branch information
fierlion committed Feb 16, 2023
1 parent 515943c commit f216cc7
Show file tree
Hide file tree
Showing 768 changed files with 100,000 additions and 388,022 deletions.
28 changes: 0 additions & 28 deletions go.mod

This file was deleted.

151 changes: 0 additions & 151 deletions go.sum

This file was deleted.

2 changes: 1 addition & 1 deletion pkg/cniipamwrapper/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
package cniipamwrapper

import (
cni_ipam "github.com/containernetworking/cni/pkg/ipam"
"github.com/containernetworking/cni/pkg/types"
"github.com/containernetworking/cni/pkg/types/current"
cni_ipam "github.com/containernetworking/plugins/pkg/ipam"
)

// IPAM wraps methods used from the the cni/pkg/ipam package
Expand Down
2 changes: 1 addition & 1 deletion pkg/cniipamwrapper/mocks/cniipamwrapper_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 8 additions & 9 deletions pkg/cniipamwrapper/mocks_types/result_mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 6 additions & 11 deletions pkg/cniipwrapper/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@ package cniipwrapper
import (
"net"

"github.com/containernetworking/plugins/pkg/ip"
"github.com/containernetworking/plugins/pkg/ns"
"github.com/containernetworking/cni/pkg/ip"
"github.com/containernetworking/cni/pkg/ns"
)

// IPAM wraps methods used from the the cni/pkg/ip package
// See github.com/containernetworking/plugins/pkg/ip for more details
// Seee github.com/containernetworking/cni/pkg/ip for more details
type IP interface {
// SetupVeth creates a veth pair
SetupVeth(contVethName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error)
// SetHWAddrByIP sets the hardware address for the interface identified
// by the ip address
SetHWAddrByIP(ifName string, ip4 net.IP, ip6 net.IP) error
// DelLinkByNameAddr deletes the interface
DelLinkByNameAddr(ifName string) (*net.IPNet, error)
DelLinkByNameAddr(ifName string, family int) (*net.IPNet, error)
}

type cniIP struct{}
Expand All @@ -47,11 +47,6 @@ func (*cniIP) SetHWAddrByIP(ifName string, ip4 net.IP, ip6 net.IP) error {
return ip.SetHWAddrByIP(ifName, ip4, ip6)
}

func (*cniIP) DelLinkByNameAddr(ifName string) (*net.IPNet, error) {
// this was updated to return an array of its addresses. For now just returning the first
ips, err := ip.DelLinkByNameAddr(ifName)
if err != nil {
return &net.IPNet{}, err
}
return ips[0], err
func (*cniIP) DelLinkByNameAddr(ifName string, family int) (*net.IPNet, error) {
return ip.DelLinkByNameAddr(ifName, family)
}

0 comments on commit f216cc7

Please sign in to comment.