When making a GET /allocation_candidates request with the 'limit'
parameter, include all the providers in the same tree as the providers
mentioned in the allocation requests. That is, in a nested situation,
if we limit the allocation requests to 10, we would usually expect
considerably more than 10 providers in provider summaries, to include
any non-contributing providers in the same tree.
Accomplish this by filtering provider summaries on root_provider_uuid
instead of individual provider uuid.
A gabbi test is added which exercises this in a nested situation.
An existing test is updated to reflect the new filtering style. It
does not exercise the nested scenario.
A reno is added indicating the fix.
Change-Id: I136bd7cd89f1bd54f0d1691268545850af234f18
Story: 2005859
Task: 33654
Following up on [1], I tried to replace GET.getall() with GET.get() for
'limit' and 'group_policy' in the GET /allocation_candidates handler.
However, it turns out that this actually changes behavior, because
.get() picks up the *last* value, whereas we were previously picking up
the first.
Rather than spin a whole microversion to change this behavior (if we do
that, we should just change the schema to disallow multiples) this
change set just adds tests proving that we pick up the first value, so
that if future me decides to come along and make such a change again,
we'll catch it.
(NB: copied from the nova change set with the same Change-Id)
[1] https://review.openstack.org/#/c/517757/37/nova/api/openstack/placement/handlers/allocation_candidate.py@232
Change-Id: I3075e16fb33b2c7fd3be6bead492faf9114d18dc
To help test the new ?in_tree<N> syntax, add a second shared storage
provider to the SharedStorageFixture used in the allocation-candidates
gabbits.
Change-Id: If6d6373d4068be047d81c6c75cdf1266c9ef08a2
This patch adds microversion 1.31 supporting the `in_tree`/`in_tree<N>`
query parameters to the `GET /allocation_candidates` API. It accepts a
UUID for a resource provider. If this parameter is provided, the only
resource providers returned will be those with the same tree with the
given resource provider.
Change-Id: I24d333d1437168f27aaaac6d894a18271cb6ab91
Blueprint: alloc-candidates-in-tree
To prepare for tests of the new ?in_tree<N> syntax, this patch adds
DISK_GB inventory to the second compute node provider in the
SharedStorageFixture used in the allocation-candidates gabbits.
Change-Id: I4eb504ad1f0ef8d5caa096460dbd990cc04a8b1f
While in Nova, placement functional test code was relegated to the
'nova/tests/functional/api/openstack/placement/' directory. This commit
moves the contents of that directory to 'placement/tests/functional/',
and removes the unnecesary directories. It also removes the files
related to Nova aggregates that were preserved in the filter_history.sh
script.
Change-Id: I5af2e074f2e1bcb90f32589fce819bd4872b6871