From d1bc821ee6b2eb15613bb4f58fbec84946f3511c Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 2 Jul 2018 10:38:28 -0400 Subject: [PATCH] api-ref: fix min_version for parent_provider_uuid in responses Due to a regression in I8624e194fe0173531c5aa2119c903e3c68b8c6cd, the min_version on the parent_provider_uuid response parameter was missing and is added back here. For sanity reasons, the variables are renamed and substitution anchor usage is dropped. To recap the microversions: 1.14 ---- parent_provider_uuid and root_provider_uuid were added to the responses for: * GET /resource_providers (list) * GET /resource_providers/{uuid} (show) * PUT /resource_providers/{uuid} (update) parent_provider_uuid was added to the request for: * POST /resource_providers (create) * PUT /resource_providers/{uuid} (update) 1.20 ---- We started returning a response body from POST /resource_providers (create) which included parent_provider_uuid and root_provider_uuid but the parameters are not versioned in that case since the entire response is versioned for 1.20. Change-Id: I6c9a1072fa2a59e408472f1a4b52b3a8c6a9b343 Closes-Bug: #1779700 --- placement-api-ref/source/parameters.yaml | 20 ++++++++++++------- .../source/resource_provider.inc | 6 +++--- .../source/resource_providers.inc | 6 +++--- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/placement-api-ref/source/parameters.yaml b/placement-api-ref/source/parameters.yaml index 0ca02f94f284..512ef443a971 100644 --- a/placement-api-ref/source/parameters.yaml +++ b/placement-api-ref/source/parameters.yaml @@ -453,21 +453,27 @@ resource_provider_object: required: true description: > A dictionary which contains the UUID of the resource provider. -resource_provider_parent_provider_uuid: &resource_provider_parent_provider_uuid +resource_provider_parent_provider_uuid_request: type: string in: body required: false - description: > - The UUID of the immediate parent of the resource provider. -resource_provider_parent_provider_uuid_1_14: &resource_provider_parent_provider_uuid_1_14 - <<: *resource_provider_parent_provider_uuid description: > The UUID of the immediate parent of the resource provider. Once set, the parent of a resource provider cannot be changed. min_version: 1.14 -resource_provider_parent_provider_uuid_required: - <<: *resource_provider_parent_provider_uuid +resource_provider_parent_provider_uuid_required_no_min: + type: string + in: body required: true + description: > + The UUID of the immediate parent of the resource provider. +resource_provider_parent_provider_uuid_response_1_14: + type: string + in: body + required: true + description: > + The UUID of the immediate parent of the resource provider. + min_version: 1.14 resource_provider_root_provider_uuid_no_min: &resource_provider_root_provider_uuid_no_min type: string in: body diff --git a/placement-api-ref/source/resource_provider.inc b/placement-api-ref/source/resource_provider.inc index 4c1782ddc63e..6b957caa0703 100644 --- a/placement-api-ref/source/resource_provider.inc +++ b/placement-api-ref/source/resource_provider.inc @@ -34,7 +34,7 @@ Response - uuid: resource_provider_uuid - links: resource_provider_links - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_required + - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - root_provider_uuid: resource_provider_root_provider_uuid_required Response Example @@ -64,7 +64,7 @@ Request - uuid: resource_provider_uuid_path - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_1_14 + - parent_provider_uuid: resource_provider_parent_provider_uuid_request Request example --------------- @@ -81,7 +81,7 @@ Response - uuid: resource_provider_uuid - links: resource_provider_links - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_required + - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - root_provider_uuid: resource_provider_root_provider_uuid_required Response Example diff --git a/placement-api-ref/source/resource_providers.inc b/placement-api-ref/source/resource_providers.inc index 08eca1d18f4a..8dfaad7b9df8 100644 --- a/placement-api-ref/source/resource_providers.inc +++ b/placement-api-ref/source/resource_providers.inc @@ -47,7 +47,7 @@ Response - uuid: resource_provider_uuid - links: resource_provider_links - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_required + - parent_provider_uuid: resource_provider_parent_provider_uuid_response_1_14 - root_provider_uuid: resource_provider_root_provider_uuid_required Response Example @@ -79,7 +79,7 @@ Request - name: resource_provider_name - uuid: resource_provider_uuid_opt - - parent_provider_uuid: resource_provider_parent_provider_uuid_1_14 + - parent_provider_uuid: resource_provider_parent_provider_uuid_request Request example --------------- @@ -106,7 +106,7 @@ Response (microversions 1.20 - ) - uuid: resource_provider_uuid - links: resource_provider_links_v1_20 - name: resource_provider_name - - parent_provider_uuid: resource_provider_parent_provider_uuid_required + - parent_provider_uuid: resource_provider_parent_provider_uuid_required_no_min - root_provider_uuid: resource_provider_root_provider_uuid_no_min Response Example (microversions 1.20 - )