summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorIWASE Yusuke <iwase.yusuke0@gmail.com>2017-06-02 16:45:12 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2017-06-04 13:56:28 +0900
commit03c67d368dfa19bba6f070b060fb15aace4dd703 (patch)
treee4b2025432232710cb71b2d181623da36fc4d938
parent574e417d9d991f9e7f9aba7fde2b91b45b8d8152 (diff)
service/ovsdb: Default of controller_info in set_controller
Currently, api.set_controller in OVSDB service raises AttributeError if controller_info is None and controller is not found in current table. This patch sets the empty dict as the default value and fixes this problem. Reported-by: 胡鼎原 <hdyvip@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/services/protocols/ovsdb/api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ryu/services/protocols/ovsdb/api.py b/ryu/services/protocols/ovsdb/api.py
index c1f04398..9443d750 100644
--- a/ryu/services/protocols/ovsdb/api.py
+++ b/ryu/services/protocols/ovsdb/api.py
@@ -364,6 +364,8 @@ def del_port_by_name(manager, system_id, bridge_name, port_name):
def set_controller(manager, system_id, bridge_name,
target, controller_info=None):
+ controller_info = controller_info or {}
+
def _set_controller(tables, insert):
bridge = _get_bridge(tables, bridge_name)