From f774d03b6f32a72275d75ac2db64e3f7ef458d04 Mon Sep 17 00:00:00 2001 From: Kevin_Zheng Date: Tue, 19 Apr 2016 20:47:03 +0800 Subject: [PATCH] Fix api ref for os-cells, os-cloudpipe and server-action-shelve This patch fix API ref for correct sample files and status code for below APIs - os-cells - os-cloudpipe - server-action-shelve Part of bp:api-ref-in-rst Change-Id: I6292f78742d7bb50882e186c97e7966721037ba4 --- api-ref/source/os-cells.inc | 26 ++++++++---------------- api-ref/source/os-cloudpipe.inc | 2 +- api-ref/source/servers-action-shelve.inc | 6 +++--- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/api-ref/source/os-cells.inc b/api-ref/source/os-cells.inc index 615ef3caa9..cd829f10d1 100644 --- a/api-ref/source/os-cells.inc +++ b/api-ref/source/os-cells.inc @@ -14,12 +14,10 @@ List Cells Lists cells. -When cells are not enabled, the call returns the ``Not Implemented (501)`` response code. - -Normal response codes: 200,501 +Normal response codes: 200 Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400), -unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404) +unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404), NotImplemented(501) Request ------- @@ -43,12 +41,10 @@ List Cells With Details Lists cells with details. -When cells are not enabled, the call returns the ``Not Implemented (501)`` response code. - -Normal response codes: 200,501 +Normal response codes: 200 Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400), -unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404) +unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404), NotImplemented(501) Request ------- @@ -72,12 +68,10 @@ Show Cell Data Shows data for a cell. -When cells are not enabled, the call returns the ``Not Implemented (501)`` response code. - -Normal response codes: 200,501 +Normal response codes: 200 Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400), -unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404) +unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404), NotImplemented(501) Request ------- @@ -92,7 +86,7 @@ Response **Example Show Cell Data: JSON request** -.. literalinclude:: ../../doc/api_samples/os-cells/cell-show-resp.json +.. literalinclude:: ../../doc/api_samples/os-cells/cells-get-resp.json :language: javascript Show Cell Capacities @@ -102,12 +96,10 @@ Show Cell Capacities Shows capacities for a cell. -When cells are not enabled, the call returns the ``Not Implemented (501)`` response code. - Normal response codes: 200,501 Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400), -unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404) +unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404), NotImplemented(501) Request ------- @@ -122,6 +114,6 @@ Response **Example Show Cell Capacities: JSON request** -.. literalinclude:: ../../doc/api_samples/os-cells/cells-capacities-show-resp.json +.. literalinclude:: ../../doc/api_samples/os-cells/cells-capacities-resp.json :language: javascript diff --git a/api-ref/source/os-cloudpipe.inc b/api-ref/source/os-cloudpipe.inc index ac926d347e..509d517a5b 100644 --- a/api-ref/source/os-cloudpipe.inc +++ b/api-ref/source/os-cloudpipe.inc @@ -30,7 +30,7 @@ Response **Example List Cloudpipes: JSON request** -.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-show-resp.json +.. literalinclude:: ../../doc/api_samples/os-cloudpipe/cloud-pipe-get-resp.json :language: javascript Create Cloudpipe diff --git a/api-ref/source/servers-action-shelve.inc b/api-ref/source/servers-action-shelve.inc index fb6a9b2a03..1cacba9021 100644 --- a/api-ref/source/servers-action-shelve.inc +++ b/api-ref/source/servers-action-shelve.inc @@ -45,7 +45,7 @@ Request **Example Shelve server: JSON request** -.. literalinclude:: ../../doc/api_samples/servers-action/shelve-req.json +.. literalinclude:: ../../doc/api_samples//os-shelve/os-shelve.json :language: javascript Response @@ -94,7 +94,7 @@ Request **Example Shelve server: JSON request** -.. literalinclude:: ../../doc/api_samples/servers-action/shelveOffload-req.json +.. literalinclude:: ../../doc/api_samples/os-shelve/os-shelve-offload.json :language: javascript Response @@ -143,7 +143,7 @@ Request **Example Unshelve server: JSON request** -.. literalinclude:: ../../doc/api_samples/servers-action/unshelve-req.json +.. literalinclude:: ../../doc/api_samples//os-shelve/os-unshelve.json :language: javascript Response