Skip to content

Commit fd8bea8

Browse files
almaslennikove0ne
authored andcommitted
fix: drop unused function from ovs.go
Signed-off-by: Alexander Maslennikov <amaslennikov@nvidia.com> (cherry picked from commit f9f1d61)
1 parent b638474 commit fd8bea8

File tree

1 file changed

+0
-35
lines changed
  • pkg/host/internal/bridge/ovs

1 file changed

+0
-35
lines changed

pkg/host/internal/bridge/ovs/ovs.go

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"strings"
2727
"time"
2828

29-
"github.com/go-logr/logr"
3029
"github.com/google/uuid"
3130
"github.com/ovn-org/libovsdb/client"
3231
"github.com/ovn-org/libovsdb/model"
@@ -216,40 +215,6 @@ func (o *ovs) CreateOVSBridge(ctx context.Context, conf *sriovnetworkv1.OVSConfi
216215
return nil
217216
}
218217

219-
func (o *ovs) ensureInternalInterface(ctx context.Context, funcLog logr.Logger, dbClient client.Client, bridge *BridgeEntry) error {
220-
funcLog.V(2).Info("CreateOVSBridge(): Check if internal interface exists in the bridge")
221-
existingIface, err := o.getInterfaceByName(ctx, dbClient, bridge.Name)
222-
if err != nil {
223-
funcLog.Error(err, "CreateOVSBridge(): failed to check internal interface in the bridge")
224-
return err
225-
}
226-
if existingIface != nil {
227-
// If interface exists but is in error state, we should remove it
228-
if existingIface.Error != nil {
229-
funcLog.V(2).Info("CreateOVSBridge(): internal interface exists but is in error state, removing it", "error", *existingIface.Error)
230-
if err := o.deleteInterfaceByName(ctx, dbClient, bridge.Name); err != nil {
231-
funcLog.Error(err, "CreateOVSBridge(): failed to remove internal interface in error state")
232-
return err
233-
}
234-
existingIface = nil
235-
} else {
236-
funcLog.V(2).Info("CreateOVSBridge(): internal interface already exists and is valid")
237-
return nil // Interface is already in the desired state, return early
238-
}
239-
}
240-
// existingIface is nil here, so we need to create it
241-
funcLog.V(2).Info("CreateOVSBridge(): add internal interface to the bridge")
242-
if err := o.addInterface(ctx, dbClient, bridge, &InterfaceEntry{
243-
Name: bridge.Name,
244-
UUID: uuid.NewString(),
245-
Type: "internal",
246-
}); err != nil {
247-
funcLog.Error(err, "CreateOVSBridge(): failed to add internal interface to the bridge")
248-
return err
249-
}
250-
return nil
251-
}
252-
253218
// GetOVSBridges returns configuration for all managed bridges
254219
func (o *ovs) GetOVSBridges(ctx context.Context) ([]sriovnetworkv1.OVSConfigExt, error) {
255220
ctx, cancel := setDefaultTimeout(ctx)

0 commit comments

Comments
 (0)