nova/placement-api-ref/source/root.inc
Chris Dent 1a5a3a9bc8 [placement] Add status and links fields to version document at /
According to the spec [1] the version discovery doc must have a status
and links for each version. For the primary version the status value
should be 'CURRENT'. For placement the version discovery doc and "self"
are the same thing, so the provided "self" href looks redundant, but it
makes keystoneauth1 happy when doing version discovery.

In placement, since there is only one version at the moment, set status
to CURRENT.

Add a gabbi test that verifies the presence of both fields and values.

Without these fields, use of placement with a client that follows the
documented version discovery process will fail to work.

As the version doc is not considered microversioned[2] and in any case
this is making version discovery work where it didn't before, this is
not a candidate for a microversion and can be backported to the
beginning of placement's history if we like.

I've updated the api-ref docs. In the process I made the max
microversion in the sample discovery doc a bit more realistic and
in alignment with these modern times.

[1] http://specs.openstack.org/openstack/api-wg/guidelines/microversion_specification.html#version-discovery
[2] http://eavesdrop.openstack.org/irclogs/%23openstack-sdks/%23openstack-sdks.2018-06-13.log.html#t2018-06-13T13:40:12

Change-Id: Ie602ab1768efbf103563d8f6b9d28965fc81021a
Closes-Bug: #1776668
2018-06-14 14:32:07 +00:00

52 lines
1.4 KiB
PHP

============
API Versions
============
In order to bring new features to users over time, the Placement API
supports microversioning. Microversions allow use of certain features on a
per-request basis via the ``OpenStack-API-Version`` header. For example, to
request microversion 1.10, specify the header::
OpenStack-API-Version: placement 1.10
For more details about Microversions, please reference:
`Microversions
<https://developer.openstack.org/api-guide/compute/microversions.html>`_
.. note:: The maximum microversion supported by each release varies.
Please reference:
`REST API Version History
<https://docs.openstack.org/nova/latest/user/placement.html#rest-api-version-history>`__
for API microversion history details.
List Versions
=============
.. rest_method:: GET /
Fetch information about all known major versions of the placement API,
including information about the minimum and maximum microversions.
.. note:: At this time there is only one major version of the placement API:
version 1.0.
Normal Response Codes: 200
Response
--------
.. rest_parameters:: parameters.yaml
- versions: versions
- id: version_id
- min_version: version_min
- max_version: version_max
- status: version_status
- links: version_links
Response Example
----------------
.. literalinclude:: ./samples/root/get-root.json
:language: javascript