From 0a8adbf4c9cdf517d9d45fa96a95f15b6069a8d9 Mon Sep 17 00:00:00 2001 From: Congqi Zhao Date: Wed, 18 Dec 2024 16:05:02 +0800 Subject: [PATCH] remove unused function (#4821) Signed-off-by: zcq98 --- pkg/ovs/ovn-nb-suite_test.go | 4 ---- pkg/ovs/ovs-vsctl.go | 4 ---- pkg/ovs/ovs-vsctl_test.go | 9 --------- 3 files changed, 17 deletions(-) diff --git a/pkg/ovs/ovn-nb-suite_test.go b/pkg/ovs/ovn-nb-suite_test.go index 08883685d42..4bc6c96400b 100644 --- a/pkg/ovs/ovn-nb-suite_test.go +++ b/pkg/ovs/ovn-nb-suite_test.go @@ -1231,10 +1231,6 @@ func (suite *OvnClientTestSuite) Test_OvsCleanDuplicatePort() { suite.testOvsCleanDuplicatePort() } -func (suite *OvnClientTestSuite) Test_OvsSetPortTag() { - suite.testOvsSetPortTag() -} - func (suite *OvnClientTestSuite) Test_ValidatePortVendor() { suite.testValidatePortVendor() } diff --git a/pkg/ovs/ovs-vsctl.go b/pkg/ovs/ovs-vsctl.go index 1af9ec8f801..25088facfcc 100644 --- a/pkg/ovs/ovs-vsctl.go +++ b/pkg/ovs/ovs-vsctl.go @@ -288,10 +288,6 @@ func CleanDuplicatePort(ifaceID, portName string) { } } -func SetPortTag(port, tag string) error { - return ovsSet("port", port, fmt.Sprintf("tag=%s", tag)) -} - // ValidatePortVendor returns true if the port's external_ids:vendor=kube-ovn func ValidatePortVendor(port string) (bool, error) { output, err := ovsFind("Port", "name", "external_ids:vendor="+util.CniTypeName) diff --git a/pkg/ovs/ovs-vsctl_test.go b/pkg/ovs/ovs-vsctl_test.go index 2893ce5cf6c..deb8f909187 100644 --- a/pkg/ovs/ovs-vsctl_test.go +++ b/pkg/ovs/ovs-vsctl_test.go @@ -177,15 +177,6 @@ func (suite *OvnClientTestSuite) testOvsCleanDuplicatePort() { CleanDuplicatePort("iface-id", "port-name") } -func (suite *OvnClientTestSuite) testOvsSetPortTag() { - t := suite.T() - t.Parallel() - - err := SetPortTag("port-name", "tag") - // ovs-vsctl cmd is not available in the test environment - require.Error(t, err) -} - func (suite *OvnClientTestSuite) testValidatePortVendor() { t := suite.T() t.Parallel()