diff options
author | IWASE Yusuke <iwase.yusuke0@gmail.com> | 2016-09-26 09:28:37 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-10-01 21:13:27 +0900 |
commit | 3d815d34553362466ac01d0bb791b5707396e449 (patch) | |
tree | f1e169ebc9aa2c9f58ce3a981d4315acaf91003c | |
parent | 25a7eb51fe534ced19d9d0d76f4d8ea13418c305 (diff) |
ovs/vsctl: Catch the default tag type in Port Table
According to ovs-vswitchd.conf.db(5), the tag column is an integer
in range 0 to 4095, but OVS may returns the empty list [] as the
default value.
OTOH, Ryu expects an integer type as the default and fails to get
the port information in the table.
This patch enables to catch the empty list as the default and
fixes this problem.
Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/lib/ovs/vsctl.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ryu/lib/ovs/vsctl.py b/ryu/lib/ovs/vsctl.py index b3457743..f5db402e 100644 --- a/ryu/lib/ovs/vsctl.py +++ b/ryu/lib/ovs/vsctl.py @@ -264,7 +264,7 @@ class VSCtlContext(object): def add_port_to_cache(self, vsctl_bridge_parent, ovsrec_port): tag = getattr(ovsrec_port, vswitch_idl.OVSREC_PORT_COL_TAG, None) - if (tag is not None and tag >= 0 and tag < 4096): + if tag is not None and tag != [] and 0 <= tag < 4096: vlan_bridge = vsctl_bridge_parent.find_vlan_bridge() if vlan_bridge: vsctl_bridge_parent = vlan_bridge |