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 <[email protected]> --- ryu/lib/ovs/vsctl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ryu/lib/ovs/vsctl.py b/ryu/lib/ovs/vsctl.py index b345774..f5db402 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 -- 2.7.4 ------------------------------------------------------------------------------ _______________________________________________ Ryu-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ryu-devel
