From d4f1e57257a67d5d5b082ee82bd01fe8f428553e Mon Sep 17 00:00:00 2001 From: zhufl Date: Thu, 22 Aug 2019 09:39:33 +0800 Subject: [PATCH] [api-ref]Fix values of service-status in list-hosts In "List all hosts for a project", service-status should take the values of ['available', 'unavailable'], (service-state takes the value of ['enabled', 'disabled']), and because os-services API uses service_status which requires returning `enabled` and `disabled`, we need add a new parameter host_service_status for os-hosts API. https://docs.openstack.org/api-ref/block-storage/v3/index.html#list-all-hosts-for-a-project partially-implements: blueprint volume-response-schema-validation Change-Id: Idde4a63f00862599a13bcfcdadc1d4459f27d3a4 --- api-ref/source/v2/hosts.inc | 2 +- api-ref/source/v2/parameters.yaml | 8 +++++++- api-ref/source/v3/hosts.inc | 2 +- api-ref/source/v3/parameters.yaml | 6 ++++++ 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/api-ref/source/v2/hosts.inc b/api-ref/source/v2/hosts.inc index 181505680f2..a77b58de0ca 100644 --- a/api-ref/source/v2/hosts.inc +++ b/api-ref/source/v2/hosts.inc @@ -41,7 +41,7 @@ Response Parameters .. rest_parameters:: parameters.yaml - - service-status: service_status + - service-status: host_service_status - service: host_service - zone: availability_zone_3 - service-state: service_state diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index 170a19cda5b..477b3348b24 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -687,6 +687,12 @@ host_service: in: body required: true type: string +host_service_status: + description: | + The status of the service. One of ``available`` or ``unavailable``. + in: body + required: true + type: string id: description: | The UUID of the volume transfer. @@ -1539,7 +1545,7 @@ service_state: type: string service_status: description: | - The status of the service. One of ``available`` or ``unavailable``. + The status of the service. One of ``enabled`` or ``disabled``. in: body required: true type: string diff --git a/api-ref/source/v3/hosts.inc b/api-ref/source/v3/hosts.inc index 273138b7567..8e9e421291e 100644 --- a/api-ref/source/v3/hosts.inc +++ b/api-ref/source/v3/hosts.inc @@ -42,7 +42,7 @@ Response Parameters .. rest_parameters:: parameters.yaml - hosts: hosts - - service-status: service_status + - service-status: host_service_status - service: host_service - zone: availability_zone_required - service-state: service_state diff --git a/api-ref/source/v3/parameters.yaml b/api-ref/source/v3/parameters.yaml index 400cd2a7b46..bea29d7dc4d 100644 --- a/api-ref/source/v3/parameters.yaml +++ b/api-ref/source/v3/parameters.yaml @@ -1355,6 +1355,12 @@ host_service: in: body required: true type: string +host_service_status: + description: | + The status of the service. One of ``available`` or ``unavailable``. + in: body + required: true + type: string hosts: description: | A OpenStack Block Storage host.