From 6a75cb2ef9b423b03c0be7ddc74dc1a34cd5a4e3 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Sat, 25 Nov 2017 11:34:24 +0300 Subject: [PATCH] Fix 'all_tenants' & 'all_projects' type in api-ref 'all_tenants' and 'all_projects' are query param to list the resources for all tenants/projects. Checking of this query param in code is different in different APIs. - GET /servers and /servers/detail API checks the value of 'all_tenants' strictly as boolean if there is one present. - other APIs just checks the presence of it in req, like GET /os-server-groups, /os-fping api-ref mentioned this param types as integer, boolean or string. This commit make api-ref consistent to have type of this query param as string. Change-Id: I5297e6baa1e3d06adfc9d29d2bc56124119b9c8c Closes-Bug: #1734427 --- api-ref/source/parameters.yaml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index b8201eb0a1..9323102667 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -368,23 +368,29 @@ all_projects: If you specify a tenant ID for a non-administrative user with this query parameter, the call lists all server groups for the tenant, or project, rather than for all projects. + Value of this query parameter is not checked, only presence is considered + as request for all projects. + in: query + required: false + type: string +all_tenants: + description: | + Specify the ``all_tenants`` query parameter to ping instances + for all tenants. By default this is only allowed by admin users. + Value of this query parameter is not checked, only presence + is considered as request for all tenants. + in: query + required: false + type: string +all_tenants_query: + description: | + Specify the ``all_tenants`` query parameter to list all instances + for all projects. A value of `all_tenants`` need not be specified. + If it is specified, it must be 'boolean'. + By default this is only allowed by admin users. in: query required: false type: boolean -all_tenants: - description: | - Specify the ``all_tenants=1`` query parameter to ping instances - for all tenants. By default this is only allowed by admin users. - in: query - required: false - type: integer -all_tenants_query: - description: | - Specify the ``all_tenants=1`` query parameter to list all instances - for all projects. By default this is only allowed by admin users. - in: query - required: false - type: integer all_tenants_sec_grp_query: description: | Specify the ``all_tenants`` query parameter to list all security