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. Signed-off-by: qin-nz@GitHub <hdy...@gmail.com> Signed-off-by: IWASE Yusuke <iwase.yusu...@gmail.com> --- ryu/services/protocols/ovsdb/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ryu/services/protocols/ovsdb/api.py b/ryu/services/protocols/ovsdb/api.py index c1f0439..9443d75 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) -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Ryu-devel mailing list Ryu-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ryu-devel