diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2017-06-02 16:45:12 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2017-06-04 13:56:28 +0900 |
commit | 03c67d368dfa19bba6f070b060fb15aace4dd703 (patch) | |
tree | e4b2025432232710cb71b2d181623da36fc4d938 | |
parent | 574e417d9d991f9e7f9aba7fde2b91b45b8d8152 (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.py | 2 |
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) |