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
JSON body examples of Placement API reference
are in the same directroy where *.inc files exist.
This patch moves JSON body examples to an isolated directory
in order to make it easier to maintain the API reference.
Change-Id: I8fd587100d22bd10dd4b2b2f1b25c5ecc7fc8537
Reviewing the Placement API, I noticed wrong OpenStack capitalization.
Fix the docs and some strings as well.
Change-Id: I14a2443687a0d517ece80e794e7ef0d4e165af6f
Briefly document in the Placement API reference:
a) the use of Content-Type: application/json
b) how to use microversion headers, including a link to the main
Microversions reference.
Change-Id: I60d7b9dfe4f1c50fc50eaf07a04848c220ffcf62