Add a 1.33 microversion to move from numeric suffixes to string
suffixes that can be 64 chars longs made from '-', '_', and
mixed-case alphanumeric. The format is shared between schema
and RequestGroup parsing.
Docs, api-ref, api history and microversion upper limit are updated
to indicate the new form in the new microversion.
A release note is added.
Story: 2005575
Task: 30781
Change-Id: Ia44b0922d151695d406883262e891bd932536f38
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
A gabbi test for multiple member_of<N> was using the `query_parameters`
keyword to construct the querystring; but it was trying to test what
happens when member_of<N> is specified multiple times. In this test, N
was the same for both, but the query parameters were being entered as
separate dict keys; so the querystring was only being constructed with
the latter value, because yaml [1]. The test was passing spuriously
because it happens to be the case that the result would be the same if
only the latter value is specified. (If you reversed the order of the
two member_ofZ, the test failed.)
This change re-YAMLs the query_parameters to use list syntax for the
values of the member_of key, from which gabbi will dtrt in constructing
the querystring.
NB: It might be nice to find a test scenario where the false positive
wouldn't have been possible; but that would be a bigger effort that
could possibly entail reswizzling the GranularFixture and therefore the
whole gabbit. Done this way, we're at least sure that both values are
making it to the handler; and switching the order in the querystring has
no effect (though the order is apparently not guaranteed/deterministic
anyway [2]).
[1] https://github.com/yaml/pyyaml/issues/165
[2] https://gabbi.readthedocs.io/en/latest/example.html (search for
query_parameters)
Change-Id: I10f28d8c21643be69b67f25dcc043cd9640eac42
This patch adds a check for duplicate allocation candidates in
granular requests scenarios. To check the duplication, the __eq__ and
and the __hash__ operators are added both to AllocationRequestResource
class and to AllocationRequest class.
Change-Id: I8b5b0212077ca930ee69d3f1c349f41433bae68e
Closes-Bug: #1817458
This patch adds a test for granular single shared resource provider
request, which turned out to be broken. Namely, we get duplicate
allocation requests when shared resource is requested alone.
Change-Id: Ia89e011fb51a41db9b7296ab357c36556d7c8fba
Related-Bug: #1817458
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