[func]Test with optimize_for_wide_provider_trees

Placement implemented a workaround optimization for large provider
trees. This patch enables that optimization to run the pci_in_placement
related nova functional tests with this config enabled.

Change-Id: I0b5e13673cb4cc7c57aeae50914ace443dfc18fa
Signed-off-by: Balazs Gibizer <gibi@redhat.com>
This commit is contained in:
Balazs Gibizer
2025-10-04 12:58:46 +02:00
parent 17f1f0ad49
commit 29c609be23
2 changed files with 11 additions and 1 deletions
+3 -1
View File
@@ -1376,7 +1376,9 @@ class _IntegratedTestBase(test.TestCase, PlacementInstanceHelperMixin):
if self.CAST_AS_CALL:
self.useFixture(nova_fixtures.CastAsCallFixture(self))
self.placement = self.useFixture(func_fixtures.PlacementFixture()).api
self.placement_fixture = self.useFixture(
func_fixtures.PlacementFixture())
self.placement = self.placement_fixture.api
self.neutron = self.useFixture(nova_fixtures.NeutronFixture(self))
self.cinder = self.useFixture(nova_fixtures.CinderFixture(self))
self.glance = self.useFixture(nova_fixtures.GlanceFixture(self))
@@ -87,6 +87,14 @@ class PlacementPCIReportingTests(test_pci_sriov_servers._PCIServersTestBase):
def setUp(self):
super().setUp()
# Use tuned placement config to exercise the more complex code
# path when pci_in_placement is used
self.placement_fixture.conf_fixture.config(
group='workarounds', optimize_for_wide_provider_trees=True)
self.placement_fixture.conf_fixture.config(
group='placement',
allocation_candidates_generation_strategy="breadth-first")
self.flags(group="pci", report_in_placement=True)
# These tests should not depend on the host's sysfs