Skip to content

Commit

Permalink
Update ovs cni plugin to support cni version 1.0.0
Browse files Browse the repository at this point in the history
Signed-off-by: adrianc <[email protected]>
  • Loading branch information
adrianchiris committed Jun 3, 2024
1 parent 6f8174b commit 27d617a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmd/mirror-consumer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ import (

// mirror-consumer
func main() {
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.PluginSupports("0.3.0", "0.3.1", "0.4.0"), buildversion.BuildString("OVS mirror consumer"))
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.All, buildversion.BuildString("OVS mirror consumer"))
}
2 changes: 1 addition & 1 deletion cmd/mirror-producer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ import (

// ovs-mirror-producer
func main() {
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.PluginSupports("0.3.0", "0.3.1", "0.4.0"), buildversion.BuildString("OVS mirror producer"))
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.All, buildversion.BuildString("OVS mirror producer"))
}
2 changes: 1 addition & 1 deletion cmd/plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ import (
)

func main() {
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.PluginSupports("0.3.0", "0.3.1", "0.4.0"), buildversion.BuildString("OVS bridge"))
skel.PluginMain(plugin.CmdAdd, plugin.CmdCheck, plugin.CmdDel, version.All, buildversion.BuildString("OVS bridge"))
}
3 changes: 2 additions & 1 deletion tests/mirror_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
var _ = Describe("ovs-mirror 0.3.0", func() { testMirrorFunc("0.3.0") })
var _ = Describe("ovs-mirror 0.3.1", func() { testMirrorFunc("0.3.1") })
var _ = Describe("ovs-mirror 0.4.0", func() { testMirrorFunc("0.4.0") })
var _ = Describe("ovs-mirror 1.0.0", func() { testMirrorFunc("1.0.0") })

var testMirrorFunc = func(version string) {
Describe("ovs traffic mirroring tests", func() {
Expand Down Expand Up @@ -78,7 +79,7 @@ var testMirrorFunc = func(version string) {
Eventually(func() error {
_, err := clusterApi.ReadFileFromPod(podConsName, "test", "/tcpdump.log")
return err
}, 120 * time.Second, time.Second).Should(Succeed(), "tcpdump did not start in time");
}, 120*time.Second, time.Second).Should(Succeed(), "tcpdump did not start in time")

clusterApi.CreatePrivilegedPodWithIP(podProd1Name, nadProducerName, bridgeName, cidrPodProd1, "")
clusterApi.CreatePrivilegedPodWithIP(podProd2Name, nadProducerName, bridgeName, cidrPodProd2, "")
Expand Down
1 change: 1 addition & 0 deletions tests/ovs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import (
var _ = Describe("ovs-cni 0.3.0", func() { testFunc("0.3.0") })
var _ = Describe("ovs-cni 0.3.1", func() { testFunc("0.3.1") })
var _ = Describe("ovs-cni 0.4.0", func() { testFunc("0.4.0") })
var _ = Describe("ovs-cni 1.0.0", func() { testFunc("1.0.0") })

var testFunc = func(version string) {
Describe("pod availability tests", func() {
Expand Down

0 comments on commit 27d617a

Please sign in to comment.