From 070656a4782508eb3c7a341a3dcf58266e783b6c Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Thu, 5 Jan 2017 18:40:52 +0900 Subject: [PATCH] api-ref: Fix path parameters in os-hypervisors.inc The hypervisor ID in path parameters have been fixed to 'integer'. In "Search Hypervisor" and "List Hypervisor Servers", the hypervisor IDs have been fixed to a string for searching hypervisor host names. Change-Id: I2260f0c4ca82d5a2ae5a46bcf8f48f9eaaf09f2f Closes-Bug: #1654197 --- api-ref/source/os-hypervisors.inc | 13 +++++++------ api-ref/source/parameters.yaml | 9 ++++++++- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/api-ref/source/os-hypervisors.inc b/api-ref/source/os-hypervisors.inc index c340c7f84343..71c6814a4c1c 100644 --- a/api-ref/source/os-hypervisors.inc +++ b/api-ref/source/os-hypervisors.inc @@ -246,9 +246,9 @@ Response Search Hypervisor ================= -.. rest_method:: GET /os-hypervisors/{hypervisor_id}/search +.. rest_method:: GET /os-hypervisors/{hypervisor_hostname_pattern}/search -Search hypervisor by given hypervisor id. +Search hypervisor by a given hypervisor host name or portion of it. Policy defaults enable only users with the administrative role to perform this operation. Cloud providers can change these permissions through @@ -263,7 +263,7 @@ Request .. rest_parameters:: parameters.yaml - - hypervisor_id: hypervisor_id + - hypervisor_hostname_pattern: hypervisor_hostname_pattern Response -------- @@ -284,9 +284,10 @@ Response List Hypervisor Servers ======================= -.. rest_method:: GET /os-hypervisors/{hypervisor_id}/servers +.. rest_method:: GET /os-hypervisors/{hypervisor_hostname_pattern}/servers -List all servers belong to given hypervisor. +List all servers belong to each hypervisor whose host name is matching +a given hypervisor host name or portion of it. Policy defaults enable only users with the administrative role to perform this operation. Cloud providers can change these permissions through @@ -301,7 +302,7 @@ Request .. rest_parameters:: parameters.yaml - - hypervisor_id: hypervisor_id + - hypervisor_hostname_pattern: hypervisor_hostname_pattern Response -------- diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 26e134c2a58f..748ca64a7154 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -127,12 +127,19 @@ host_status_body_in: in: path required: false type: string +hypervisor_hostname_pattern: + description: | + The hypervisor host name or a portion of it. + The hypervisor hosts are selected with the host name matching this pattern. + in: path + required: true + type: string hypervisor_id: description: | The ID of the hypervisor. in: path required: true - type: string + type: integer image_id: description: | The UUID of the image.