From 54d37451013fb60df39b8797b7555888de58b9a3 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Fri, 9 Nov 2018 15:56:18 +0900 Subject: [PATCH] Fix server query examples The 'locked' query parameter is not supported in the "List Servers Detailed" API. So replace examples using the 'locked' query parameter with examples using another query parameters. Change-Id: Ibcea6147dd6716ad544e7ac5fa0df17f8c397a28 Closes-Bug: #1801904 --- api-guide/source/server_concepts.rst | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/api-guide/source/server_concepts.rst b/api-guide/source/server_concepts.rst index 1ddf557e49c9..f1c4222fda9e 100644 --- a/api-guide/source/server_concepts.rst +++ b/api-guide/source/server_concepts.rst @@ -155,12 +155,12 @@ Precondition: there are 2 servers existing in cloud with following info:: "servers": [ { "name": "t1", - "locked": "true", + "OS-EXT-STS:vm_state": "active", ... }, { "name": "t2", - "locked": "false", + "OS-EXT-STS:vm_state": "stopped", ... } ] @@ -168,10 +168,14 @@ Precondition: there are 2 servers existing in cloud with following info:: **Example: General user query server with administrator only options** -Request with non-administrator context: ``GET /servers/detail?locked=1`` +Request with non-administrator context: ``GET /servers/detail?vm_state=active`` -Note that ``locked`` is returned through API layer starting from -microversion 2.9. +.. note:: + + The ``vm_state`` query parameter is only for administrator users and + the query parameter is ignored if specified by non-administrator users. + Thus the API returns servers of both ``active`` and ``stopped`` + in this example. Response:: @@ -190,7 +194,7 @@ Response:: **Example: Administrator query server with administrator only options** -Request with administrator context: ``GET /servers/detail?locked=1`` +Request with administrator context: ``GET /servers/detail?vm_state=active`` Response::