allow funtional test to run with released placment

As part of I0b5e13673cb4cc7c57aeae50914ace443dfc18fa
a new depency was created on a placement config
option and the workarounds config group

This enabled the workaround added in
I13ab83a165c229ae57876df4570e8af25221a45e
which is present on master but not in a release

That works in ci because in ci we use placement
master but locally and in the requirement repo
we do not.

Closes-Bug: #2131032
Change-Id: I744049b5cf0ef69624fc4b6db1e5f415ab89a5af
Signed-off-by: Sean Mooney <work@seanmooney.info>
This commit is contained in:
Sean Mooney
2025-11-10 19:59:37 +00:00
committed by sean mooney
parent 68a0a69c33
commit 61242f75da

View File

@@ -89,8 +89,20 @@ class PlacementPCIReportingTests(test_pci_sriov_servers._PCIServersTestBase):
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(
# TODO(sean-k-mooney): remove this try except after we have
# a release with [workarounds]optimize_for_wide_provider_trees
# this currently passes in ci because the nova functional job
# uses required project to install placement form master
# but this fails in cross-nova-functional job in the requirements
# repo and locally as we have not release placement since this
# config option was introduced.
try:
self.placement_fixture.conf_fixture.config(
group='workarounds', optimize_for_wide_provider_trees=True)
except cfg.NoSuchGroupError:
# this means we are running with an older version of placement
# that does not support this config option
pass
self.placement_fixture.conf_fixture.config(
group='placement',
allocation_candidates_generation_strategy="breadth-first")