Merge "[OVN] Skip maintenance IGMP snoop check if not LS name"
This commit is contained in:
commit
b20bb13a6c
neutron
plugins/ml2/drivers/ovn/mech_driver/ovsdb
tests/unit/plugins/ml2/drivers/ovn/mech_driver/ovsdb
@ -560,7 +560,8 @@ class DBInconsistenciesPeriodics(SchemaAwarePeriodicsBase):
|
||||
value = ('true' if ovn_conf.is_igmp_snooping_enabled()
|
||||
else 'false')
|
||||
for ls in self._nb_idl.ls_list().execute(check_error=True):
|
||||
if ls.other_config.get(ovn_const.MCAST_SNOOP, None) == value:
|
||||
if (ls.other_config.get(ovn_const.MCAST_SNOOP,
|
||||
None) == value or not ls.name):
|
||||
continue
|
||||
txn.add(self._nb_idl.db_set(
|
||||
'Logical_Switch', ls.name,
|
||||
|
@ -325,14 +325,21 @@ class TestDBInconsistenciesPeriodics(testlib_api.SqlTestCaseLight,
|
||||
'other_config': {
|
||||
constants.MCAST_SNOOP: 'true',
|
||||
constants.MCAST_FLOOD_UNREGISTERED: 'false'}})
|
||||
ls3 = fakes.FakeOvsdbRow.create_one_ovsdb_row(
|
||||
attrs={'name': '',
|
||||
'other_config': {}})
|
||||
ls4 = fakes.FakeOvsdbRow.create_one_ovsdb_row(
|
||||
attrs={'name': '',
|
||||
'other_config': {constants.MCAST_SNOOP: 'false'}})
|
||||
|
||||
nb_idl.ls_list.return_value.execute.return_value = [ls0, ls1, ls2]
|
||||
nb_idl.ls_list.return_value.execute.return_value = [ls0, ls1, ls2, ls3,
|
||||
ls4]
|
||||
|
||||
self.assertRaises(periodics.NeverAgain,
|
||||
self.periodic.check_for_igmp_snoop_support)
|
||||
|
||||
# "ls2" is not part of the transaction because it already
|
||||
# have the right value set
|
||||
# have the right value set; "ls3" and "ls4" do not have a name set.
|
||||
expected_calls = [
|
||||
mock.call('Logical_Switch', 'ls0',
|
||||
('other_config', {
|
||||
|
Loading…
x
Reference in New Issue
Block a user