summaryrefslogtreecommitdiff
path: root/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml
diff options
context:
space:
mode:
authorChris Dent <cdent@anticdent.org>2018-06-13 14:38:23 +0100
committerStephen Finucane <stephenfin@redhat.com>2020-09-11 14:15:54 +0100
commitdf1542686349a97ab1527f80c81861d89aaf4f78 (patch)
tree73849317231a77d0abe727ffc3447cbd08397dca /nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml
parent8f7dc3d8700a37956abf567d170ad42863baa4d7 (diff)
downloadnova-df1542686349a97ab1527f80c81861d89aaf4f78.tar.gz
[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. Changes: placement-api-ref/source/get-root.json NOTE(stephenfin): Modified the root API sample to reflect the max placement API version in Queens. [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 (cherry picked from commit 1a5a3a9bc8409349ab817b4858ee54bf2a036dab)
Diffstat (limited to 'nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml')
-rw-r--r--nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml2
1 files changed, 2 insertions, 0 deletions
diff --git a/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml b/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml
index 2a40d4f5cc..27f81ca8c0 100644
--- a/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml
+++ b/nova/tests/functional/api/openstack/placement/gabbits/microversion.yaml
@@ -22,6 +22,8 @@ tests:
$.versions[0].max_version: /^\d+\.\d+$/
$.versions[0].min_version: /^\d+\.\d+$/
$.versions[0].id: v1.0
+ $.versions[0].status: CURRENT
+ $.versions[0].links[?rel = 'self'].href: ''
- name: unavailable microversion raises 406
GET: /