Skip to content

Commit

Permalink
Removed printouts in lib
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 11, 2016
1 parent ff5c17a commit 9743238
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func main() {
log.Fatal(err)
}

err = client.CreateVethPort(brName, "vethA")
err = client.CreateVethPort(brName, "vethA", 0)
if err != nil {
fmt.Println(err.Error())
}
Expand Down
11 changes: 5 additions & 6 deletions ovsclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package goovs

import (
"fmt"
"log"
"net"
"reflect"
"strconv"
Expand Down Expand Up @@ -102,19 +101,19 @@ func (client *ovsClient) transact(operations []libovsdb.Operation, action string
if len(reply) < len(operations) {
return fmt.Errorf("%s failed due to Number of Replies should be at least equal to number of Operations", action)
}
ok := true
//ok := true
for i, o := range reply {
if o.Error != "" {
ok = false
//ok = false
if i < len(operations) {
return fmt.Errorf("%s transaction Failed due to an error : %s details: %s in %+v", action, o.Error, o.Details, operations[i])
}
return fmt.Errorf("%s transaction Failed due to an error :%s", action, o.Error)
}
}
if ok {
log.Println(action, "successful: ", reply[0].UUID.GoUuid)
}
//if ok {
// log.Println(action, "successful: ", reply[0].UUID.GoUuid)
//}

return nil
}
Expand Down
2 changes: 1 addition & 1 deletion ovsintf.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (client *ovsClient) interfaceUUIDExists(interfaceUUID string) (bool, error)
return false, fmt.Errorf("Transaction Failed due to an error: %v", reply[0].Error)
}
if len(reply[0].Rows) == 0 {
fmt.Println("The reply is empty, interface not found")
//fmt.Println("The reply is empty, interface not found")
return false, nil
}
return true, nil
Expand Down
2 changes: 1 addition & 1 deletion ovsport.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func (client *ovsClient) selectPortInPortTable(selectCondition []interface{}) (b
return false, fmt.Errorf("find port in table failed due to Transaction Failed due to an error: %v", reply[0].Error)
}
if len(reply[0].Rows) == 0 {
fmt.Println("The reply is empty, port not found")
// fmt.Println("The reply is empty, port not found")
return false, nil
}
return true, nil
Expand Down

0 comments on commit 9743238

Please sign in to comment.