Merge "Fix IndexError when no VLAN tag is defined"
This commit is contained in:
commit
2d29afc58f
@ -186,7 +186,7 @@ class OvsdbNbOvnIdl(nb_impl_idl.OvnNbApiIdlImpl, Backend):
|
||||
cmd = self.db_find_rows('Logical_Switch_Port', ('type', '=',
|
||||
constants.OVN_LOCALNET_VIF_PORT_TYPE))
|
||||
for row in cmd.execute(check_error=True):
|
||||
if (row.options and
|
||||
if (row.tag and row.options and
|
||||
row.options.get('network_name') == network_name):
|
||||
tags.append(row.tag[0])
|
||||
return tags
|
||||
@ -333,7 +333,7 @@ class OvsdbSbOvnIdl(sb_impl_idl.OvnSbApiIdlImpl, Backend):
|
||||
cmd = self.db_find_rows('Port_Binding', ('type', '=',
|
||||
constants.OVN_LOCALNET_VIF_PORT_TYPE))
|
||||
for row in cmd.execute(check_error=True):
|
||||
if (row.options and
|
||||
if (row.tag and row.options and
|
||||
row.options.get('network_name') == network_name):
|
||||
tags.append(row.tag[0])
|
||||
return tags
|
||||
|
Loading…
Reference in New Issue
Block a user