Skip to content

Commit 97e4713

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[functional tests] compatibility with ovsdbapp>=2.6.1" into stable/2024.1
2 parents f70ef2c + 4221f70 commit 97e4713

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

neutron/tests/functional/base.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
from oslo_log import log
2929
from oslo_utils import timeutils
3030
from oslo_utils import uuidutils
31+
from ovsdbapp.backend.ovs_idl import idlutils
3132

3233
from neutron.agent.linux import utils
3334
from neutron.api import extensions as exts
@@ -443,5 +444,12 @@ def append_cms_options(ext_ids, value):
443444
def del_fake_chassis(self, chassis, if_exists=True):
444445
self.sb_api.chassis_del(
445446
chassis, if_exists=if_exists).execute(check_error=True)
446-
self.sb_api.db_destroy(
447-
'Chassis_Private', chassis).execute(check_error=True)
447+
try:
448+
self.sb_api.db_destroy(
449+
'Chassis_Private', chassis).execute(check_error=True)
450+
except idlutils.RowNotFound:
451+
# NOTE(ykarel ): ovsdbapp >= 2.6.1 handles Chassis_Private
452+
# record delete with chassis
453+
# try/except can be dropped when neutron requirements.txt
454+
# include ovsdbapp>=2.6.1
455+
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
@@ -1234,7 +1234,8 @@ def test_agent_list(self):
12341234
# then Chassis_Private.chassis = []; both metadata and controller
12351235
# agents will still be present in the agent list.
12361236
agent_event = AgentWaitEvent(self.mech_driver, [self.chassis],
1237-
events=(event.RowEvent.ROW_UPDATE,))
1237+
events=(event.RowEvent.ROW_UPDATE,
1238+
event.RowEvent.ROW_DELETE,))
12381239
self.sb_api.idl.notify_handler.watch_event(agent_event)
12391240
self.sb_api.chassis_del(self.chassis).execute(check_error=True)
12401241
self.assertTrue(agent_event.wait())

0 commit comments

Comments
 (0)