Skip to content

Commit ce2560f

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[functional tests] compatibility with ovsdbapp>=2.2.2" into stable/2023.1
2 parents da8f6ef + fde3103 commit ce2560f

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

neutron/tests/functional/base.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
from oslo_log import log
3232
from oslo_utils import timeutils
3333
from oslo_utils import uuidutils
34+
from ovsdbapp.backend.ovs_idl import idlutils
3435

3536
from neutron.agent.linux import utils
3637
from neutron.api import extensions as exts
@@ -473,6 +474,13 @@ def append_cms_options(ext_ids, value):
473474
def del_fake_chassis(self, chassis, if_exists=True):
474475
self.sb_api.chassis_del(
475476
chassis, if_exists=if_exists).execute(check_error=True)
476-
if self.sb_api.is_table_present('Chassis_Private'):
477-
self.sb_api.db_destroy(
478-
'Chassis_Private', chassis).execute(check_error=True)
477+
try:
478+
if self.sb_api.is_table_present('Chassis_Private'):
479+
self.sb_api.db_destroy(
480+
'Chassis_Private', chassis).execute(check_error=True)
481+
except idlutils.RowNotFound:
482+
# NOTE(ykarel ): ovsdbapp >= 2.2.2 handles Chassis_Private
483+
# record delete with chassis
484+
# try/except can be dropped when neutron requirements.txt
485+
# include ovsdbapp>=2.2.2
486+
pass

neutron/tests/functional/plugins/ml2/drivers/ovn/mech_driver/test_mech_driver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1215,7 +1215,8 @@ def test_agent_list(self):
12151215
# then Chassis_Private.chassis = []; both metadata and controller
12161216
# agents will still be present in the agent list.
12171217
agent_event = AgentWaitEvent(self.mech_driver, [self.chassis],
1218-
events=(event.RowEvent.ROW_UPDATE,))
1218+
events=(event.RowEvent.ROW_UPDATE,
1219+
event.RowEvent.ROW_DELETE,))
12191220
self.sb_api.idl.notify_handler.watch_event(agent_event)
12201221
self.sb_api.chassis_del(self.chassis).execute(check_error=True)
12211222
self.assertTrue(agent_event.wait())

0 commit comments

Comments
 (0)