From bd384997ac216da371a642ec96e20fd348a757c5 Mon Sep 17 00:00:00 2001 From: IWASE Yusuke Date: Mon, 5 Feb 2018 09:46:44 +0900 Subject: lib/ovs: Fix a typo of "--may-exist" option Signed-off-by: IWASE Yusuke Signed-off-by: FUJITA Tomonori --- ryu/lib/ovs/vsctl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ryu/lib/ovs/vsctl.py b/ryu/lib/ovs/vsctl.py index 2391c903..b18b5ef1 100644 --- a/ryu/lib/ovs/vsctl.py +++ b/ryu/lib/ovs/vsctl.py @@ -1563,7 +1563,9 @@ class VSCtl(object): self._pre_add_port(ctx, columns) def _cmd_add_port(self, ctx, command): - may_exist = command.has_option('--may_exist') + # '--may_exist' is a typo but for backword compatibility + may_exist = (command.has_option('--may_exist') + or command.has_option('--may-exist')) br_name = command.args[0] port_name = command.args[1] @@ -1577,7 +1579,9 @@ class VSCtl(object): False, iface_names, settings) def _cmd_add_bond(self, ctx, command): - may_exist = command.has_option('--may_exist') + # '--may_exist' is a typo but for backword compatibility + may_exist = (command.has_option('--may_exist') + or command.has_option('--may-exist')) fake_iface = command.has_option('--fake-iface') br_name = command.args[0] -- cgit v1.2.3