From 92b3b628404dfcfb77fb3b7bd64e6d459c8077d8 Mon Sep 17 00:00:00 2001 From: Terry Wilson Date: Fri, 5 Feb 2021 19:07:53 +0000 Subject: [PATCH] add_fake_chassis() may need to create a Chassis_Private If the Chassis_Private table exists in the schema, add_fake_chassis will need to create it since we aren't running ovn-controller. Closes-Bug: #1914754 Change-Id: Ie36cb025540c158fbbed4126be5d654888715300 (cherry picked from commit d452e7868756935b074cc2026262e588e9523413) --- neutron/tests/functional/base.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/neutron/tests/functional/base.py b/neutron/tests/functional/base.py index e0fc76d5175..6cea6d6689b 100644 --- a/neutron/tests/functional/base.py +++ b/neutron/tests/functional/base.py @@ -347,9 +347,13 @@ class TestOVNFunctionalBase(test_plugin.Ml2PluginV2TestCase, # fake chassis but from the SB db point of view, 'ip' column can be # any string so we could add entries with ip='172.24.4.1000'. self._counter += 1 - self.sb_api.chassis_add( + chassis = self.sb_api.chassis_add( name, ['geneve'], '172.24.4.%d' % self._counter, external_ids=external_ids, hostname=host).execute(check_error=True) + if self.sb_api.is_table_present('Chassis_Private'): + self.sb_api.db_create( + 'Chassis_Private', name=name, external_ids=external_ids, + chassis=chassis.uuid).execute(check_error=True) return name def del_fake_chassis(self, chassis, if_exists=True):