Merge "[OVN] Remove the check of presence of "Chassis_Private""
This commit is contained in:
@@ -1603,14 +1603,11 @@ def delete_agent(self, context, id, _driver=None):
|
||||
chassis_name = agent['configurations']['chassis_name']
|
||||
_driver.sb_ovn.chassis_del(chassis_name, if_exists=True).execute(
|
||||
check_error=True)
|
||||
if _driver.sb_ovn.is_table_present('Chassis_Private'):
|
||||
# TODO(ralonsoh): implement the corresponding chassis_private
|
||||
# commands in ovsdbapp.
|
||||
try:
|
||||
_driver.sb_ovn.db_destroy('Chassis_Private', chassis_name).execute(
|
||||
check_error=True)
|
||||
except idlutils.RowNotFound:
|
||||
pass
|
||||
try:
|
||||
_driver.sb_ovn.db_destroy('Chassis_Private', chassis_name).execute(
|
||||
check_error=True)
|
||||
except idlutils.RowNotFound:
|
||||
pass
|
||||
# Send a specific event that all API workers can get to delete the agent
|
||||
# from their caches. Ideally we could send a single transaction that both
|
||||
# created and deleted the key, but alas python-ovs is too "smart"
|
||||
|
||||
@@ -1403,11 +1403,10 @@ class TestAgentApi(base.TestOVNFunctionalBase):
|
||||
def _check_chassis_registers(self, present=True):
|
||||
chassis = self.sb_api.lookup('Chassis', self.chassis, default=None)
|
||||
chassis_name = chassis.name if chassis else None
|
||||
if self.sb_api.is_table_present('Chassis_Private'):
|
||||
ch_private = self.sb_api.lookup(
|
||||
'Chassis_Private', self.chassis, default=None)
|
||||
ch_private_name = ch_private.name if ch_private else None
|
||||
self.assertEqual(chassis_name, ch_private_name)
|
||||
ch_private = self.sb_api.lookup(
|
||||
'Chassis_Private', self.chassis, default=None)
|
||||
ch_private_name = ch_private.name if ch_private else None
|
||||
self.assertEqual(chassis_name, ch_private_name)
|
||||
if present:
|
||||
self.assertEqual(self.chassis, chassis_name)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user