Skip to content

Commit

Permalink
FindAllPortsOnBridge to FindAllPortUUIDsOnBridge
Browse files Browse the repository at this point in the history
Signed-off-by: Zhenfang Wei <kopkop@gmail.com>
  • Loading branch information
kopwei committed Mar 12, 2016
1 parent 8a54264 commit 2dc2714
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ovsbridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion ovsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions ovsport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2dc2714

Please sign in to comment.