diff --git a/pkg/tools/utils/ovs.go b/pkg/tools/utils/ovs.go index 9deb73f..88e55dc 100644 --- a/pkg/tools/utils/ovs.go +++ b/pkg/tools/utils/ovs.go @@ -1,4 +1,4 @@ -// Copyright (c) 2021-2022 Nordix Foundation. +// Copyright (c) 2021-2023 Nordix Foundation. // // Copyright (c) 2023 Cisco and/or its affiliates. // @@ -108,6 +108,14 @@ func ConfigureOvS(ctx context.Context, l2Connections map[string]*L2ConnectionPoi return nil } +// DeleteBridge delete ovs bridge for client and endpoint connections +func DeleteBridge(ctx context.Context, bridgeName string) { + stdout, stderr, err := util.RunOVSVsctl("del-br", bridgeName) + if err != nil { + log.FromContext(ctx).Warnf("Failed to remove bridge %s, stdout: %q, stderr: %q, error: %v", bridgeName, stdout, stderr, err) + } +} + func configureL2Interface(ctx context.Context, cp *L2ConnectionPoint) error { link, err := netlink.LinkByName(cp.Interface) if err != nil {