From 2dc2714ca3964300c0b2f8de71231093a4e428c8 Mon Sep 17 00:00:00 2001 From: Zhenfang Wei Date: Sat, 12 Mar 2016 22:21:38 +0100 Subject: [PATCH] FindAllPortsOnBridge to FindAllPortUUIDsOnBridge Signed-off-by: Zhenfang Wei --- examples/example.go | 2 +- ovsbridge.go | 2 +- ovsclient.go | 2 +- ovsport.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/example.go b/examples/example.go index 76c76f3..a1f7689 100644 --- a/examples/example.go +++ b/examples/example.go @@ -61,7 +61,7 @@ func main() { fmt.Println(err.Error()) } - ports, err := client.FindAllPortsOnBridge(brName) + ports, err := client.FindAllPortUUIDsOnBridge(brName) if err != nil { fmt.Println(err.Error()) return diff --git a/ovsbridge.go b/ovsbridge.go index 484ef2c..34b28a9 100644 --- a/ovsbridge.go +++ b/ovsbridge.go @@ -121,7 +121,7 @@ func (client *ovsClient) deleteAllPortsOnBridge(brname string) error { return nil } - portList, err := client.FindAllPortsOnBridge(brname) + portList, err := client.FindAllPortUUIDsOnBridge(brname) if err != nil { return err } diff --git a/ovsclient.go b/ovsclient.go index 0f89984..3ef4949 100644 --- a/ovsclient.go +++ b/ovsclient.go @@ -42,7 +42,7 @@ type OvsClient interface { CreateVethPort(brname, portname string, vlantag int) error CreatePatchPort(brname, portname, peername string) error DeletePort(brname, porname string) error - FindAllPortsOnBridge(brname string) ([]string, error) + FindAllPortUUIDsOnBridge(brname string) ([]string, error) PortExistsOnBridge(portname, brname string) (bool, error) RemoveInterfaceFromPort(portname, interfaceUUID string) error } diff --git a/ovsport.go b/ovsport.go index 723ceb3..7a33e22 100644 --- a/ovsport.go +++ b/ovsport.go @@ -131,7 +131,7 @@ func (client *ovsClient) deletePortByUUID(brname, portUUID string) error { } func (client *ovsClient) PortExistsOnBridge(portname, brname string) (bool, error) { - portUUIDs, err := client.FindAllPortsOnBridge(brname) + portUUIDs, err := client.FindAllPortUUIDsOnBridge(brname) if err != nil { return false, nil } else if len(portUUIDs) == 0 { @@ -177,7 +177,7 @@ func (client *ovsClient) selectPortInPortTable(selectCondition []interface{}) (b return true, nil } -func (client *ovsClient) FindAllPortsOnBridge(brname string) ([]string, error) { +func (client *ovsClient) FindAllPortUUIDsOnBridge(brname string) ([]string, error) { condition := libovsdb.NewCondition("name", "==", brname) selectOp := libovsdb.Operation{ Op: selectOperation,