The go library used to communicate with Openvswitch and manage Openvswitch bridges and ports
This is the high level library for Go programs to interact with Openvswitch.
- Can connect to local Openvswitch db via Unix socket or remote tcp socket
- Can be used to create/delete bridges, create/delete various types of ports, e.g. Internal port, Veth port or Patch port
- Openvswitch flow management are not in place since they are not handled by ovsdb
Code is tested with Openvswitch 2.0 on Ubuntu14.04
client, err := goovs.GetOVSClient("unix", "")
if err != nil {
fmt.Println(err.Error())
return
}
err := client.CreateBridge(brName)
if err != nil {
fmt.Println(err.Error())
}
err := client.CreateInternalPort(brName, internalPortName, internalPortTag)
if err != nil {
fmt.Println(err.Error())
}