Skip to content

Commit

Permalink
Merge pull request #1083 from danwinship/update-deps
Browse files Browse the repository at this point in the history
update deps (go-iptables, cni)
  • Loading branch information
squeed authored Aug 29, 2024
2 parents 720b1e9 + 06ba001 commit 20f31e5
Show file tree
Hide file tree
Showing 42 changed files with 1,021 additions and 205 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ require (
github.com/Microsoft/hcsshim v0.12.6
github.com/alexflint/go-filemutex v1.3.0
github.com/buger/jsonparser v1.1.1
github.com/containernetworking/cni v1.1.2
github.com/coreos/go-iptables v0.7.0
github.com/containernetworking/cni v1.2.3
github.com/coreos/go-iptables v0.8.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c
github.com/d2g/dhcp4client v1.0.0
Expand Down
55 changes: 4 additions & 51 deletions go.sum

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion plugins/ipam/dhcp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,13 @@ func main() {
os.Exit(1)
}
} else {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("dhcp"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("dhcp"))
}
}

Expand Down
8 changes: 7 additions & 1 deletion plugins/ipam/host-local/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@ import (
)

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("host-local"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("host-local"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/ipam/static/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ type Address struct {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("static"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("static"))
}

func loadNetConf(bytes []byte) (*types.NetConf, string, error) {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("bridge"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("bridge"))
}

type cniBridgeIf struct {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/dummy/dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("dummy"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("dummy"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/host-device/host-device.go
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,13 @@ func getLink(devname, hwaddr, kernelpath, pciaddr string, auxDev string) (netlin
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("host-device"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("host-device"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/ipvlan/ipvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("ipvlan"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("ipvlan"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/loopback/loopback.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("loopback"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("loopback"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
3 changes: 2 additions & 1 deletion plugins/main/loopback/loopback_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ var _ = Describe("Loopback", func() {
session, err := gexec.Start(command, GinkgoWriter, GinkgoWriter)
Expect(err).NotTo(HaveOccurred())

Eventually(session).Should(gbytes.Say(`{.*}`))
// "(?s)" turns on the "s" flag, making "." match newlines too.
Eventually(session).Should(gbytes.Say(`(?s){.*}`))
Eventually(session).Should(gexec.Exit(0))

var lo *net.Interface
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/macvlan/macvlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("macvlan"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("macvlan"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/ptp/ptp.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("ptp"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("ptp"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/tap/tap.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("tap"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("tap"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/vlan/vlan.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("vlan"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("vlan"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/main/windows/win-bridge/win-bridge_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,11 @@ func cmdCheck(_ *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("win-bridge"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("win-bridge"))
}
8 changes: 7 additions & 1 deletion plugins/main/windows/win-overlay/win-overlay_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,11 @@ func cmdCheck(_ *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("win-overlay"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("win-overlay"))
}
8 changes: 7 additions & 1 deletion plugins/meta/bandwidth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.3.0"), bv.BuildString("bandwidth"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.VersionsStartingFrom("0.3.0"), bv.BuildString("bandwidth"))
}

func SafeQdiscList(link netlink.Link) ([]netlink.Qdisc, error) {
Expand Down
8 changes: 7 additions & 1 deletion plugins/meta/firewall/firewall.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.4.0"), bv.BuildString("firewall"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.VersionsStartingFrom("0.4.0"), bv.BuildString("firewall"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/meta/portmap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("portmap"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("portmap"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/meta/sbr/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,13 @@ RULE_LOOP:
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("sbr"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("sbr"))
}

func cmdCheck(_ *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/meta/tuning/tuning.go
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,13 @@ func cmdDel(args *skel.CmdArgs) error {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("tuning"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("tuning"))
}

func cmdCheck(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/meta/vrf/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ type VRFNetConf struct {
}

func main() {
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.VersionsStartingFrom("0.3.1"), bv.BuildString("vrf"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.VersionsStartingFrom("0.3.1"), bv.BuildString("vrf"))
}

func cmdAdd(args *skel.CmdArgs) error {
Expand Down
8 changes: 7 additions & 1 deletion plugins/sample/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ func cmdDel(args *skel.CmdArgs) error {

func main() {
// replace TODO with your plugin name
skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.All, bv.BuildString("TODO"))
skel.PluginMainFuncs(skel.CNIFuncs{
Add: cmdAdd,
Check: cmdCheck,
Del: cmdDel,
/* FIXME GC */
/* FIXME Status */
}, version.All, bv.BuildString("TODO"))
}

func cmdCheck(_ *skel.CmdArgs) error {
Expand Down
Loading

0 comments on commit 20f31e5

Please sign in to comment.