digitalocean / go-openvswitch

Go packages which enable interacting with Open vSwitch and related tools. Apache 2.0 Licensed.
Other
295 stars 95 forks source link

add get-controller which is used to get the current controller address #47

Closed mregmi closed 6 years ago

mregmi commented 6 years ago

Applications use this to get the current controller address set in ovs. this is needed if user wants to verify if the ovs has the address currently support, if not user can overwrite it with the supported one. Also add the unit test.

mdlayher commented 6 years ago

Just to verify, can you run this command directly on a box with a controller configured and show the output?

I think we may need to trim some whitespace or similar.

mregmi commented 6 years ago

@mdlayher the return values are just strings (returns the same way as get-fail-mode )

sudo ovs-vsctl get-controller br0 pssl:6653:127.0.0.1

when its not set it just returns nothing (new line) mregmi@s2r4node4:~$ sudo ovs-vsctl get-controller br0 mregmi@s2r4node4:~$

I am assuming in the latter case the user will get "" string right?