The new microversion adds support for the ``in:`` syntax in the ``required``
query parameter in the ``GET /resource_providers`` API as well as to the
``required`` and ``requiredN`` query params of the
``GET /allocation_candidates`` API. Also adds support for repeating the
``required`` and ``requiredN`` parameters in the respective APIs. So
required=in:T3,T4&required=T1,!T2
is supported and it means T1 and not T2 and (T3 or T4).
Story: 2005345
Story: 2005346
Change-Id: I66543c0c5509739d1461af2fb2c327a003202d74
Update allocations, reshaper and usage APIs to accept and present
consumer_type in microversion 1.38.
ensure_consumer in placement/handlers/util.py is updated to be consumer
type aware.
allocation, usage and reshaper schema and handlers are updated
gabbits/consumer-types-1.38.yaml adds tests across the various URIs
A TODO is left in placement/handlers/allocation.py where the database
is being accessed in a way that is not ideal. This will be cleared
up in a followup patch (to add use of an AttributeCache).
Co-Authored-By: Surya Seetharaman <suryaseetharaman.9@gmail.com>
Co-Authored-By: melanie witt <melwittt@gmail.com>
Story: 2005473
Task: 36421
Change-Id: I24c2315093e07dbf25c4fb53152e6a4de7477a51
This patch adds the new microversion 1.37 in which changing the
parent_provider_uuid of a resource provider to any other provider
(except in the same subtree to avoid loops) or to null (un-parenting /
orphaning) is supported.
Story: 2008764
Task: 42131
Change-Id: I9d16ab7944d7e6ce725a892827b9508b7ba52d7c
A new same_subtree query parameter will be accepted. The value is
a comma-separated list of request group suffix strings $S. Each must
exactly match a suffix on a granular group somewhere else in the
request. Importantly, the identified request groups need not have
a resources$S.
If this is provided, at least one of the resource providers satisfying
the specified request group must be an ancestor of the rest.
The same_subtree query parameter can be repeated and each repeat group
is treated independently.
Co-Authored-By: Chris Dent <cdent@anticdent.org>
Change-Id: I7fdeac24606359d37f1a7405d22c5797840e1a9e
Story: 2005575
Task: 30784
Microversion 1.35_ adds support for the ``root_required`` query
parameter to the ``GET /allocation_candidates`` API. It accepts a
comma-delimited list of trait names, each optionally prefixed with ``!``
to indicate a forbidden trait, in the same format as the ``required``
query parameter. This restricts allocation requests in the response to
only those whose (non-sharing) tree's root resource provider satisfies
the specified trait requirements.
This is to support use cases like, "Land my VM on a host that is capable
of multi-attach," or, "Reserve my Windows-licensed hosts for special
use."
Story: #2005575
Task: #33753
Change-Id: I76cad83248920fa71da122711f1f763c4ebdb1ba
In microversion 1.34 add a 'mappings' key to each allocation
request. Its value is dict keyed by resource group suffixes
with values of a list of resource providers satisfying that
group.
To preserve symmetry, the mappings key may be sent back when
writing allocations so the schema for POST and PUT allocations
and POST /reshaper are updated.
api history, api-ref and reno are added
Change-Id: Ie78ed7e050416d4ccb62697ba608131038bb4303
Story: 2005575
Task: 33536
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
This patch adds microversion 1.32 supporting the forbidden aggregate
expression within existing ``member_of`` queryparam both in
``GET /resource_providers`` and in ``GET /allocation_candidates``.
Forbidden aggregates are prefixed with a ``!``.
We do NOT support ``!`` within the ``in:`` list:
?member_of=in:<agg1>,<agg2>,!<agg3>
but we support ``!in:`` prefix:
?member_of=!in:<agg1>,<agg2>,<agg3>
which is equivalent to:
?member_of=!<agg1>&member_of=!<agg2>&member_of=!<agg3>
where candidate resource providers must not be in agg1, agg2, or agg3.
Change-Id: Ibba7981744c71ab5d4d0ee5d5a40709c6a5c6b5e
Story: 2005297
Task: 30183
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
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