Reorganized api-ref folder

Now Mogan has his own V1 api-ref folder, but
the documents in here are not be organized
very well like other projects.

So this patch wants to improve it better.

Change-Id: Ia2cd8dd99b617c64550e50c96c49aa1e323862bd
Closes-Bug: #1653616
This commit is contained in:
sxmatch 2017-01-03 14:40:16 +08:00
parent b3ff846a92
commit 02a6f560f0
26 changed files with 43 additions and 26 deletions

View File

@ -1,12 +1,17 @@
:tocdepth: 2
======================
Baremetal Compute API
======================
.. rest_expand_all::
Contents:
.. include:: urls.inc
.. include:: instances.inc
.. include:: types.inc
.. include:: availability_zones.inc
.. toctree::
:maxdepth: 1
v1/index
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -28,5 +28,5 @@ Response
**Example List availability zone information**
.. literalinclude:: ../../doc/api_samples/availability_zones/availability-zone-list-resp.json
.. literalinclude:: samples/availability_zones/availability-zone-list-resp.json
:language: javascript

View File

@ -0,0 +1,12 @@
:tocdepth: 2
==================================
Baremetal Compute API V1 (CURRENT)
==================================
.. rest_expand_all::
.. include:: urls.inc
.. include:: instances.inc
.. include:: types.inc
.. include:: availability_zones.inc

View File

@ -41,7 +41,7 @@ Request
**Example Create Instance: JSON request**
.. literalinclude:: ../../doc/api_samples/instances/instance-create-req.json
.. literalinclude:: samples/instances/instance-create-req.json
:language: javascript
Response
@ -67,7 +67,7 @@ Response
**Example Create Instance: JSON response**
.. literalinclude:: ../../doc/api_samples/instances/instance-create-resp.json
.. literalinclude:: samples/instances/instance-create-resp.json
:language: javascript
@ -108,7 +108,7 @@ Response
**Example List of Instances: JSON response**
.. literalinclude:: ../../doc/api_samples/instances/instance-list-resp.json
.. literalinclude:: samples/instances/instance-list-resp.json
:language: javascript
@ -153,7 +153,7 @@ Response
**Example Detailed list of Instances: JSON response**
.. literalinclude:: ../../doc/api_samples/instances/instance-list-detail-resp.json
.. literalinclude:: samples/instances/instance-list-detail-resp.json
:language: javascript
@ -203,7 +203,7 @@ Response
**Example Instance Details: JSON response**
.. literalinclude:: ../../doc/api_samples/instances/instance-detail-resp.json
.. literalinclude:: samples/instances/instance-detail-resp.json
:language: javascript
@ -231,7 +231,7 @@ The BODY of the PATCH request must be a JSON PATCH document, adhering to
**Example Update Instance: JSON request**
.. literalinclude:: ../../doc/api_samples/instances/instance-update-req.json
.. literalinclude:: samples/instances/instance-update-req.json
:language: javascript
Response
@ -257,7 +257,7 @@ Response
**Example Update Instance: JSON response**
.. literalinclude:: ../../doc/api_samples/instances/instance-update-resp.json
.. literalinclude:: samples/instances/instance-update-resp.json
:language: javascript
@ -326,7 +326,7 @@ Response
**Example instance state:**
.. literalinclude:: ../../doc/api_samples/instances/instance-get-state-response.json
.. literalinclude:: samples/instances/instance-get-state-response.json
Change Instance Power State
@ -353,4 +353,4 @@ Request
**Example request to power off a Instance:**
.. literalinclude:: ../../doc/api_samples/instances/instance-set-power-off.json
.. literalinclude:: samples/instances/instance-set-power-off.json

View File

@ -42,7 +42,7 @@ Response
**Example List types**
.. literalinclude:: ../../doc/api_samples/types/types-list-resp.json
.. literalinclude:: samples/types/types-list-resp.json
:language: javascript
Create Type
@ -72,7 +72,7 @@ Request
**Example Create Type**
.. literalinclude:: ../../doc/api_samples/types/type-create-post-req.json
.. literalinclude:: samples/types/type-create-post-req.json
:language: javascript
Response
@ -91,7 +91,7 @@ Response
**Example Create type**
.. literalinclude:: ../../doc/api_samples/types/type-create-post-resp.json
.. literalinclude:: samples/types/type-create-post-resp.json
:language: javascript
Update Type
@ -120,7 +120,7 @@ Request
**Example Update Type**
.. literalinclude:: ../../doc/api_samples/types/type-update-put-req.json
.. literalinclude:: samples/types/type-update-put-req.json
:language: javascript
Response
@ -139,7 +139,7 @@ Response
**Example Update type**
.. literalinclude:: ../../doc/api_samples/types/type-update-put-resp.json
.. literalinclude:: samples/types/type-update-put-resp.json
:language: javascript
Show Type Details
@ -176,7 +176,7 @@ Response
**Example Show type Details**
.. literalinclude:: ../../doc/api_samples/types/type-get-resp.json
.. literalinclude:: samples/types/type-get-resp.json
:language: javascript
@ -235,7 +235,7 @@ Response
**Example List Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-list-resp.json
.. literalinclude:: samples/types/type-extra-specs-list-resp.json
:language: javascript
@ -260,7 +260,7 @@ Request
**Example Create Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-patch-req.json
.. literalinclude:: samples/types/type-extra-specs-patch-req.json
:language: javascript
Response
@ -272,7 +272,7 @@ Response
**Example Create Extra Specs**
.. literalinclude:: ../../doc/api_samples/types/type-extra-specs-patch-resp.json
.. literalinclude:: samples/types/type-extra-specs-patch-resp.json
:language: javascript