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
This contains fixups for change
I24c2315093e07dbf25c4fb53152e6a4de7477a51 to rename a method to more
accurately convey what it does, refactor a keyword arg in a method to
increase readability, and update the reshaper request example to show
the latest available version 1.38.
Story: 2005473
Task: 36421
Change-Id: If6d8ae575400fb8d2f78c871ff7394e9fbcf5816
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
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems
Update Sphinx version as well.
Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I4e3fe772adffbd70d55ce1b73d9161a6de5b9c11
There was a note in the API reference for "List allocations" indicating
the response payload when a nonexistent consumer is queried, but the
parameter table entry for `consumer_generation` was duplicated from the
"Manage" and "Update" operations, which was confusing.
This commit clarifies that the `consumer_generation` will be entirely
absent from the response payload in this scenario. It also adds the same
clarification for the `project_id` and `user_id` fields. And tightens up
the gabbi coverage proving same.
Change-Id: I70f22b246d0c0acd1ae87a75bc438a9258b704ad
Story: #2006726
Task: #37146
I was wondering if I could list only compute node resource providers
by doing something like:
GET /resource_providers?resources=MEMORY_MB:0
The API reference does not explain the constraints on the resource
class amount value so I had to dig into the normalize_resources_qs_param
code to confirm that it must be an integer greater than 0, which is
what I assumed but it was not mentioned in the docs, so I've added
that clarification here.
Change-Id: I1478e7a9c6ffc41f0a31bdab52a04123307708b6
The docs had been using a reference within the nova docs, which
is similar to, but less generic than the API-SIG doc.
Change-Id: I7087e311209716a2907575573b9c018c352ce63d
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.
Note that redirects will be set up as well but let's point now to the
new location.
For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html
Change-Id: Iccddd4356b5d7c28977ad954654d0875972dae97
The API reference for POST /allocations [1] and PUT
/allocations/{consumer_uuid} [2] specifically mentions that you can get
a 409 on provider/inventory conflict. In microversion 1.28, it also
became possible to get a 409 on an allocation (consumer generation)
conflict.
In the process of adding that information, it became evident that we
weren't doing a good job explaining the whole generation thing in
general, so this commit also adds a descriptive section to the front
matter of the API reference.
Links are included from the updated descriptions for the two affected
allocations operations. Future commits can add links from other
appropriate sections of the reference (e.g. the parameters.yaml entries
for resource provider and consumer generation fields). Future commits
could also enhance the descriptions of error codes for other operations
to (at least) the level of detail at which these have ended up.
[1] https://developer.openstack.org/api-ref/placement/?expanded=manage-allocations-detail#manage-allocations
[2] https://developer.openstack.org/api-ref/placement/?expanded=update-allocations-detail#update-allocations
Change-Id: I42e76785e0fe456b107fe843dbb242f2c5f5b9f7
Story: #2006180
Task: #35705
This commit documents new error codes placement.query.duplicate_key and
placement.query.bad_value, which were were added via [1] but missed in
the summary table in the API reference [2].
Story: #2006194
Task: #35776
[1] I76cad83248920fa71da122711f1f763c4ebdb1ba
[2] https://developer.openstack.org/api-ref/placement/#errors
Change-Id: I024eaa38c6574f5847d585c83d527e3374031105
This patch fixes incorrect usages of fixed articles changing them to
indefinite articles in same_subtree documentation.
Change-Id: I6ba2e2f13400b4c2ae9a44cad7a1fc9a9e39b41d
Story: 2005575
Task: 30784
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
The Request IDs doc had an small error describing that in response
header the value of X-Openstack-Request-Id is generated automatically
for tracking each request to nova, but it is for tracking each request
to placement so this patch updates it.
Change-Id: I92ca8e73016c1d3a73aa1084013e4cec2382dec2
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 fixes a formatting issue in the member_of 1.21 parameter
to the GET /allocation_candidates API reference.
Change-Id: I53289e98d76c22b220066b22de7f21552dc5378a
Now in API reference, variable name `member_of` is used for
`GET /resource_providers` doc and `member_of_1_12` is used for
`GET /allocation_candidate` doc. However, since we also have
`member_of_granular` this can be confusing.
This patch renames as follows:
- `member_of` -> `resource_providers_member_of`
- `member_of_1_12` -> `allocation_candidates_member_of`
- `member_of_granular` -> `allocation_candidates_member_of_granular`
No content is changed.
Change-Id: I3a8591d9ed76eed60e11d59cff77cfbf95796478
This is a follow up patch on negative-aggregate-membership series.
- Remove allocation candidate related words in the
`GET /resource_providers` API reference
- Fix several typos in the API reference
- Additionaly write in the release note that the forbidden aggregate
is also supported in granular requests.
Change-Id: Idb187d7ef83ad65aaaa5dbf968a15c41d73057d1
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
Update doc, api-ref and releasenotes conf.py to set 'use_storyboard' to
True. According to the docs of the theme [1] bug project and tag are
not used when using StoryBoard.
doc/requirements.txt (used by all the docs-related jobs) is updated
to make openstackdocstheme>=1.24.0. That version is the most recent
one to have bug fixes related to use_storyboard.
[1] https://docs.openstack.org/openstackdocstheme/latest/#using-the-theme
Change-Id: I3b28dd1da9e8e75eda151a3025e78a5a47c971f9
Story: 2005190
Task: 29948
We had carried over the full list of pep8 whitespace ignores from nova.
Trying to address them all in the entire nova repository would have been
too big a task; but it's tenable here in placement.
Do it now rather than letting these whitespace issues compound.
This change removes the E* whitespace ignores and fixes the pep8 issues
they were masking.
Change-Id: Icbabdb9b56fd5a3e9fd14ab537abf3d0d6456fee
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
The link was to nova, to documents that are no longer there, so
update to the new location. A change will also be made in nova to
add a redirect.
Change-Id: Ibfe016f25a29b6810ea09c5d03a01dbf3c53371f
Add a section to the api-ref describing the error codes that some
responses produce.
Note in the contributor docs that this should be updated when one is
added.
The reshaper docs is adjusted so a ref can be made to it from the
errors. The implicit link to the header that would be the norm there
doesn't work as there are two headers named "Reshaper".
Change-Id: I89bbd383ba102fdd707ccc9f2fc973c6dd841fa8
Closes-Bug: #1794712
When placement picks up allocation candidates, the aggregates of
nested providers were assumed as the same as root providers. This
means that the `GET /allocation_candidates API` ignored the
aggregates on the nested providers. This could result in the lack
of allocation candidates when an aggregate is on a nested provider
but the aggregate is not on its root provider and the aggregate is
specified in the API by the `member_of` query parameter.
This patch fixes the bug changing it to consider the aggregates
not only on root rps but also on the nested rp itself and adds
a release note for this.
The document which explains the whole constraint of `member_of`
and other query parameters with nested providers, will be submitted
in a follow up patch.
Change-Id: I9a11a577174f85a1b47a9e895bb25cadd90bd2ea
Closes-Bug: #1792503
This patch does pretty much the minimum possible to get `tox -e docs`
building and gating. Much, much more needs to be done to make the
content good.
Also corrects a link in the api-ref which, once these are publishing,
would have pointed to the wrong place.
Change-Id: I5cbc3a3cceeaeaa7be5593658b6a03fa25fb69d0
As placement-api-ref is renamed to api-ref we can use the standard job
for the doc generation. This patch adds a voting api-ref generation job
for both queues
Change-Id: I0d8a2919e6af4bf41385e7d2324cbad72f7f9a7c
This commit is the result of running the following search and replace
across the project.
s/nova\.api\.openstack\.?//g
Change-Id: I4974a28de541aace043504f788cf0d100f778cae
This is the result of running the following commands:
git rm -rf api-ref/
git mv placement-api-ref api-ref
Change-Id: Iffabaa757187879773ee3e7ffaa438ab95670dea
- The type of aggegate ID is changed to 'integer' instead of 'string'.
- The uuid of aggegate is changed to 'required'
because the uuid is always shown in the response after v2.41.
- The response examples are replaced with v2.41 examples.
Change-Id: Ib106898d32dc67e414f489468e91561ab0a5eb80
Closes-Bug: #1659475
several params like metadata_xxx are used and actually they are
same, so just clean up them and use metadata_object instead
part of bp:api-ref-in-rst-pike
Change-Id: I455c02b5dcd77df43fc8c0113269f71a5207d3d5
Adds a Compute API microversion that triggers returning an aggregate's UUID
field. This field is necessary for scripts that must populate the placement API
with resource provider to aggregate relationships, which rely on UUIDs for
global identification.
APIImpact
blueprint: return-uuid-from-os-aggregates-api
Change-Id: I4112ccd508eb85403933fec8b52efd468e866772
Closes-bug: #1652642
This patch verifies that the title and introductory description
that precedes each rest method clearly reflects the context of the
respective rest method.
- Correct the Response text for delete API
- 'body verification' tag is removed for this commit.
part of bp:api-ref-in-rst
Change-Id: If189c0f0246969527635879d96daa1ba8f77b7c3
verified all sample files is correct and adjust
some format of the request Json file
part of bp:api-ref-in-rst
Change-Id: Ie9dd24858056337bcae9b03259d4f84de4fc1ab8