Merge "[functional tests] compatibility with ovsdbapp>=2.6.1" into stable/2024.1
This commit is contained in:
commit
97e4713bb3
neutron/tests/functional
@ -28,6 +28,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log
|
||||
from oslo_utils import timeutils
|
||||
from oslo_utils import uuidutils
|
||||
from ovsdbapp.backend.ovs_idl import idlutils
|
||||
|
||||
from neutron.agent.linux import utils
|
||||
from neutron.api import extensions as exts
|
||||
@ -443,5 +444,12 @@ class TestOVNFunctionalBase(test_plugin.Ml2PluginV2TestCase,
|
||||
def del_fake_chassis(self, chassis, if_exists=True):
|
||||
self.sb_api.chassis_del(
|
||||
chassis, if_exists=if_exists).execute(check_error=True)
|
||||
self.sb_api.db_destroy(
|
||||
'Chassis_Private', chassis).execute(check_error=True)
|
||||
try:
|
||||
self.sb_api.db_destroy(
|
||||
'Chassis_Private', chassis).execute(check_error=True)
|
||||
except idlutils.RowNotFound:
|
||||
# NOTE(ykarel ): ovsdbapp >= 2.6.1 handles Chassis_Private
|
||||
# record delete with chassis
|
||||
# try/except can be dropped when neutron requirements.txt
|
||||
# include ovsdbapp>=2.6.1
|
||||
pass
|
||||
|
@ -1234,7 +1234,8 @@ class TestAgentApi(base.TestOVNFunctionalBase):
|
||||
# then Chassis_Private.chassis = []; both metadata and controller
|
||||
# agents will still be present in the agent list.
|
||||
agent_event = AgentWaitEvent(self.mech_driver, [self.chassis],
|
||||
events=(event.RowEvent.ROW_UPDATE,))
|
||||
events=(event.RowEvent.ROW_UPDATE,
|
||||
event.RowEvent.ROW_DELETE,))
|
||||
self.sb_api.idl.notify_handler.watch_event(agent_event)
|
||||
self.sb_api.chassis_del(self.chassis).execute(check_error=True)
|
||||
self.assertTrue(agent_event.wait())
|
||||
|
Loading…
x
Reference in New Issue
Block a user