33 Commits

Author SHA1 Message Date
Chris Dent
fb0f6f2608 Allow [a-zA-Z0-9_-]{1,64} for request group suffix
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
2019-05-21 11:07:38 +01:00
Matt Riedemann
d921ad4bc8 api-ref: fix formatting in member_of param for 1.21
This fixes a formatting issue in the member_of 1.21 parameter
to the GET /allocation_candidates API reference.

Change-Id: I53289e98d76c22b220066b22de7f21552dc5378a
2019-04-12 12:07:22 -04:00
Tetsuro Nakamura
852294bd73 Rename api-ref parameters
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
2019-04-02 13:51:43 +00:00
Tetsuro Nakamura
e6f234fe44 FUP on negative-aggregate-membership series
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
2019-04-02 12:22:42 +00:00
Tetsuro Nakamura
0a3dcadb0a Negative member_of query with microversion 1.32
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
2019-03-29 05:14:27 +00:00
Tetsuro Nakamura
f4f98293d1 Add link to case studies in alloc_cands api-ref
This patch adds a link to case studies for
`GET /allocation_candidates` API in the api reference.

Change-Id: I21a73bd1c9056c7ea365bcef43caeee4377e9166
2019-03-16 22:10:45 +00:00
Chris Dent
2588c7b8da Update docs bug links to storyboard
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
2019-03-11 20:54:24 +00:00
Eric Fried
849c89d0e5 Remove pep8 whitespace ignores
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
2019-03-05 18:18:30 -06:00
Tetsuro Nakamura
ce10de2a29 in_tree[N] alloc_cands with microversion 1.31
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
2019-02-25 13:00:30 -06:00
Zuul
961f79dc00 Merge "Document API error codes" 2019-01-21 16:50:09 +00:00
Chris Dent
1f0826b5f0 Correct link rest api history
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
2018-12-19 11:13:02 +00:00
Chris Dent
16b29024c2 Document API error codes
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
2018-12-17 13:16:58 +00:00
Tetsuro Nakamura
c85ae69ee9 Fix aggregate members in nested alloc candidates
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
2018-09-21 11:44:58 +09:00
Eric Fried
9b584fcd1d Make docs build
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
2018-09-06 11:45:11 -05:00
Balazs Gibizer
8c2bb44181 Add api-ref job
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
2018-09-06 11:44:21 -05:00
EdLeafe
f849f668a9 Move the api-ref directories
This is the result of running the following commands:
    git rm -rf api-ref/
    git mv placement-api-ref api-ref

Change-Id: Iffabaa757187879773ee3e7ffaa438ab95670dea
2018-09-04 10:31:22 -05:00
Jenkins
f053ecc737 Merge "Clean up metadata param in doc" 2017-04-03 12:39:18 +00:00
Takashi NATSUME
0c38e0f69d api-ref: Fix parameters and examples in aggregate API
- 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
2017-03-13 04:04:39 +00:00
jichenjc
63eb25f517 Clean up metadata param in doc
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
2017-02-25 21:45:05 +08:00
Jay Pipes
8b4fd32e7b Return uuid attribute for aggregates
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
2017-01-05 14:32:43 -05:00
Hironori Shiina
cf8f6afe12 Fix a few typos in API reference
Change-Id: Ib90100f4ec6b4b03f27ed39166caeb9bdf5bc24c
2016-09-28 14:34:23 +09:00
ghanshyam
2001b99bea Body Verification of os-aggregates.inc
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
2016-09-06 19:03:52 +09:00
jichenjc
080bb81088 Verify os-aggregates.inc on sample files
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
2016-07-26 02:06:28 +08:00
Kevin_Zheng
07949967fa api-ref: parameter verification for os-aggregates
checked parameters

Part of bp:api-ref-in-rst

Change-Id: I8fe3825243f8b94d5c3f382ebc30c342bffafcac
2016-06-12 06:52:28 +00:00
Sean Dague
6ff392fe4c remove /v2.1/{tenant_id} from all urls
As discussed at summit, the version part of the URL is not really
relevant, or a thing a user should be filling out themselves, this
should instead be set by the service catalog and extracted from the
token.

This removes it's reference in all documented REST urls, and adds a
new section describing how one gets the base URL for all calls.

Change-Id: I4306b8c3de0225e54f3909dd8a1fb293c4e5944c
2016-06-03 08:47:33 -04:00
jichenjc
7b14a8c59a complete Method Verification of aggregates
This complete the Method Verification of aggregates,
adjust the sequence of GET/POST,
also, clean and correct some error return code.

Part of bp:api-ref-in-rst

Change-Id: I1536b804fbbd887fa4da2c35282add7e3994727a
2016-04-25 12:46:22 +08:00
Sean Dague
e86dd6ae91 add tags to files for the content verification phase
This adds a set of tags in comments to the beginning of files so that
we can process them according to the documentation here:
https://wiki.openstack.org/wiki/NovaAPIRef

Part of bp:api-ref-in-rst

Change-Id: I17cf584dafb5bd969c12f51b7e7185d92365bf93
2016-04-20 16:21:58 -04:00
ghanshyam
863ab31f73 Fix sample path for aggregate, certificate, console
This fix all sample file path for
-os-aggregates
-os-certificates
-os-consoles

Part of bp:api-ref-in-rst

Change-Id: I949f3625b7bad4f316ee4b5723fba8e95a205afd
2016-04-20 10:35:37 +09:00
Jenkins
6a9e664ac0 Merge "Fix json response example heading in api ref" 2016-04-19 18:01:14 +00:00
ghanshyam
c8d73cc0be Fix json response example heading in api ref
Heading for json response example is wrong,
it is json request instead of json response.

Part of bp:api-ref-in-rst

Change-Id: I709b2bf19520eb76e0264c358a2146bb0dbcee2b
2016-04-19 17:56:20 +09:00
Ken'ichi Ohmichi
9ea364321e Fix "Creates an aggregate" parameters
"Creates an aggregate" API supports multiple parameters on a request,
but api-ref doesn.t contain them at all This patch adds them.

The following JSON-Schema is for the API.
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/aggregates.py#L32

Part of bp:api-ref-in-rst

Change-Id: I3a58568662d21059bccdcf64cc30dbf3b706db58
2016-04-18 14:25:24 -07:00
Sean Dague
fea8e01552 move sphinx h3 to '-' instead of '^'
In the sphinx document h3 is supposed to be '-' not '^':

=, for sections
-, for subsections
^, for subsubsections

We have to enforce consistency here because we're processing included
files which all have to agree, otherwise it's a sphinx error.

Part of bp:api-ref-in-rst

Change-Id: Ic6eef5cacb07870f161b04b031e332f2b87aeedc
2016-04-15 07:43:06 -04:00
Sean Dague
1b0c6559e3 Import RST files for documentation
This is the results of the RST conversion from WADL. It creates a
single index plus a bunch of included files which represent sections
of the API document. This is the starting point for fixing the
documentation.

Change-Id: I7d561c2ecdcd864172dedb54a551f17ad3bdfe26
2016-04-13 07:34:45 -04:00