[OVN] Remove the check of presence of "Chassis_Private"

Since [1], Neutron removed the compatibility for OVN < v20.09. That
implies the SB table "Chassis_Private" is always present.

[1]https://review.opendev.org/c/openstack/neutron/+/884898

Related-Bug: #2002839
Signed-off-by: Rodolfo Alonso Hernandez <ralonsoh@redhat.com>
Change-Id: I7a9bd38c2df372d9eb7dc1a966a41c65c2d7ce17
This commit is contained in:
Rodolfo Alonso Hernandez committed 2025-07-30 10:57:26 +00:00
1 parent 758dbfa135
commit 227da23f7a
2 files changed
+9 -13

No files matched your search

@@ -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: