diff options
author | IWAMOTO Toshihiro <iwamoto@valinux.co.jp> | 2018-07-18 17:40:07 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2018-07-21 14:50:44 +0900 |
commit | b39ff68f82b2699e1a6498c259f935df961addbe (patch) | |
tree | c62954eed2349c69d8f94e8fdd14991c526d1384 | |
parent | e848eaa57e2532cd2cb298fd58910abc00cedf9d (diff) |
lib/ovs/bridge: Return multiple controllers
OVSBridge may have more than one controller. Let get_controller()
return a list of controllers in such cases.
NOTE: this introduces incompatibility if multiple controllers are
configured for a bridge.
Signed-off-by: IWAMOTO Toshihiro <iwamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ovs/bridge.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ryu/lib/ovs/bridge.py b/ryu/lib/ovs/bridge.py index 9753fa29..f86e9ae0 100644 --- a/ryu/lib/ovs/bridge.py +++ b/ryu/lib/ovs/bridge.py @@ -171,7 +171,8 @@ class OVSBridge(object): """ command = ovs_vsctl.VSCtlCommand('get-controller', [self.br_name]) self.run_command([command]) - return command.result[0] + result = command.result + return result[0] if len(result) == 1 else result def set_controller(self, controllers): """ |