From 6ee7d4413a947a8475ce4b6a8921034880cc20f2 Mon Sep 17 00:00:00 2001 From: Ken'ichi Ohmichi Date: Mon, 21 Mar 2016 10:22:15 -0700 Subject: [PATCH] Fix JSON format of server_concepts server_concepts.rst contains some invalid JSON formats as samples. This patch fixes them and improves the readability by adding some spaces. Change-Id: Ib51f9e1351fca51c15ffdcb98f42311b999f22f5 --- api-guide/source/server_concepts.rst | 238 ++++++++++++++------------- 1 file changed, 120 insertions(+), 118 deletions(-) diff --git a/api-guide/source/server_concepts.rst b/api-guide/source/server_concepts.rst index dc9f5bb811ad..67b248394d19 100644 --- a/api-guide/source/server_concepts.rst +++ b/api-guide/source/server_concepts.rst @@ -154,17 +154,18 @@ be used and interpreted by nova. Precondition: there are 2 servers existing in cloud with following info: - "servers":[ - { - "name": "t1", - "locked": "true", - ... - } - { - "name":"t2", - "locked": "false", - ... - } + "servers": [ + { + "name": "t1", + "locked": "true", + ... + }, + { + "name": "t2", + "locked": "false", + ... + } + ] **Example: General user query server with administrator only options** @@ -176,15 +177,15 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "t1", - ... - } - { - "name":"t2", - ... - } + "servers": [ + { + "name": "t1", + ... + }, + { + "name": "t2", + ... + } ] } @@ -197,11 +198,11 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "t1", - ... - } + "servers": [ + { + "name": "t1", + ... + } ] } @@ -224,17 +225,17 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "t1", - "OS-EXT-SRV-ATTR:host": "devstack" - ... - } - { - "name": "t2", - "OS-EXT-SRV-ATTR:host": "devstack1" - ... - } + "servers": [ + { + "name": "t1", + "OS-EXT-SRV-ATTR:host": "devstack" + ... + }, + { + "name": "t2", + "OS-EXT-SRV-ATTR:host": "devstack1" + ... + } ] } @@ -244,12 +245,12 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "t1", - "OS-EXT-SRV-ATTR:host": "devstack" - ... - } + "servers": [ + { + "name": "t1", + "OS-EXT-SRV-ATTR:host": "devstack" + ... + } ] } @@ -264,23 +265,23 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "test11", - ... - } - { - "name": "test21", - ... - } - { - "name": "t1", - ... - } - { - "name": "t14", - ... - } + "servers": [ + { + "name": "test11", + ... + }, + { + "name": "test21", + ... + }, + { + "name": "t1", + ... + }, + { + "name": "t14", + ... + } ] } @@ -290,19 +291,19 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "test11", - ... - } - { - "name": "t1", - ... - } - { - "name": "t14", - ... - } + "servers": [ + { + "name": "test11", + ... + }, + { + "name": "t1", + ... + }, + { + "name": "t14", + ... + } ] } @@ -318,22 +319,22 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "test1", - "OS-EXT-SRV-ATTR:host": "devstack" - ... - } - { - "name": "t2", - "OS-EXT-SRV-ATTR:host": "devstack1" - ... - } - { - "name": "test3", - "OS-EXT-SRV-ATTR:host": "devstack1" - ... - } + "servers": [ + { + "name": "test1", + "OS-EXT-SRV-ATTR:host": "devstack" + ... + }, + { + "name": "t2", + "OS-EXT-SRV-ATTR:host": "devstack1" + ... + }, + { + "name": "test3", + "OS-EXT-SRV-ATTR:host": "devstack1" + ... + } ] } @@ -343,12 +344,12 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "test3", - "OS-EXT-SRV-ATTR:host": "devstack1" - ... - } + "servers": [ + { + "name": "test3", + "OS-EXT-SRV-ATTR:host": "devstack1" + ... + } ] } @@ -367,17 +368,18 @@ be used and interpreted by nova. Response: { - "servers":[ - { - "name": "t1" - "updated": "2015-12-15T15:55:52Z" - ... - } - { - "name": "t2", - "updated": "2015-12-17T15:55:52Z" - ... - } + "servers": [ + { + "name": "t1" + "updated": "2015-12-15T15:55:52Z" + ... + }, + { + "name": "t2", + "updated": "2015-12-17T15:55:52Z" + ... + } + ] } GET /servers/detail?changes-since='2015-12-16T15:55:52Z' @@ -657,12 +659,12 @@ assigned at creation time. .. code:: { - "server":{ - "name":"new-server-test", - "imageRef":"52415800-8b69-11e0-9b19-734f6f006e54", - "flavorRef":"52415800-8b69-11e0-9b19-734f1195ff37", - "accessIPv4":"67.23.10.132" - } + "server": { + "name": "new-server-test", + "imageRef": "52415800-8b69-11e0-9b19-734f6f006e54", + "flavorRef": "52415800-8b69-11e0-9b19-734f1195ff37", + "accessIPv4": "67.23.10.132" + } } .. note:: Both IPv4 and IPv6 addresses may be used as access addresses and both @@ -675,13 +677,13 @@ assigned at creation time. .. code:: { - "server":{ - "name":"new-server-test", - "imageRef":"52415800-8b69-11e0-9b19-734f6f006e54", - "flavorRef":"52415800-8b69-11e0-9b19-734f1195ff37", - "accessIPv4":"67.23.10.132", - "accessIPv6":"::babe:67.23.10.132" - } + "server": { + "name": "new-server-test", + "imageRef": "52415800-8b69-11e0-9b19-734f6f006e54", + "flavorRef": "52415800-8b69-11e0-9b19-734f1195ff37", + "accessIPv4": "67.23.10.132", + "accessIPv6": "::babe:67.23.10.132" + } } Moving servers