diff --git a/api-ref/source/v2/arqs.inc b/api-ref/source/arqs.inc similarity index 80% rename from api-ref/source/v2/arqs.inc rename to api-ref/source/arqs.inc index 63cfc71b..cd7a81ba 100644 --- a/api-ref/source/v2/arqs.inc +++ b/api-ref/source/arqs.inc @@ -24,7 +24,7 @@ for all accelerator_requests. **Example response: list all accelerator requests** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-list-resp.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-list-resp.json :language: javascript Get One Accelerator Request @@ -43,7 +43,7 @@ Request **Example response: get details of a specific accelerator request** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-getone-resp.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-getone-resp.json Create Accelerator Requests --------------------------- @@ -60,11 +60,11 @@ Request **Example post curl** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-post-curl.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-post-curl.json **Example response: create an accelerator request** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-create-resp.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-create-resp.json Update Accelerator Requests --------------------------- @@ -90,11 +90,11 @@ Request **Example patch curl** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-patch-curl.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-patch-curl.json **Example response: update an accelerator request** -.. literalinclude:: ../../../doc/api_samples/accelerator_requests/accelerator_requests-after-update-resp.json +.. literalinclude:: ../../doc/api_samples/accelerator_requests/accelerator_requests-after-update-resp.json Delete Accelerator Requests by ARQ uuid --------------------------------------- diff --git a/api-ref/source/v2/deployables.inc b/api-ref/source/deployables.inc similarity index 85% rename from api-ref/source/v2/deployables.inc rename to api-ref/source/deployables.inc index 61431fbe..d914a06f 100644 --- a/api-ref/source/v2/deployables.inc +++ b/api-ref/source/deployables.inc @@ -22,7 +22,7 @@ Error response codes: unauthorized(401), forbidden(403) **Example response: list all deployables** -.. literalinclude:: ../../../doc/api_samples/deployables/deployables-list-resp.json +.. literalinclude:: ../../doc/api_samples/deployables/deployables-list-resp.json :language: javascript Get One Deployable @@ -44,5 +44,5 @@ Request **Example response: show details of a specific deployable** -.. literalinclude:: ../../../doc/api_samples/deployables/deployables-getone-resp.json +.. literalinclude:: ../../doc/api_samples/deployables/deployables-getone-resp.json :language: javascript diff --git a/api-ref/source/v2/device_profile.inc b/api-ref/source/device_profile.inc similarity index 85% rename from api-ref/source/v2/device_profile.inc rename to api-ref/source/device_profile.inc index ce4d0039..b8f2f3d1 100644 --- a/api-ref/source/v2/device_profile.inc +++ b/api-ref/source/device_profile.inc @@ -43,7 +43,7 @@ Response **Example response: list all device profiles** -.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-list-resp.json +.. literalinclude:: ../../doc/api_samples/device_profiles/device_profiles-list-resp.json :language: javascript Get One Device Profile @@ -78,7 +78,7 @@ Response **Example response: get details of a specific device profile** -.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-getone-resp.json +.. literalinclude:: ../../doc/api_samples/device_profiles/device_profiles-getone-resp.json :language: javascript Create Device Profile @@ -114,17 +114,17 @@ Response **Example post curl with resource/trait** -.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-post-curl.json +.. literalinclude:: ../../doc/api_samples/device_profiles/device_profiles-post-curl.json :language: javascript **Example post curl with a cyborg property when bitstream is required** -.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-post-curl-with-bitstream.json +.. literalinclude:: ../../doc/api_samples/device_profiles/device_profiles-post-curl-with-bitstream.json :language: javascript **Example response: create a device profile** -.. literalinclude:: ../../../doc/api_samples/device_profiles/device_profiles-create-resp.json +.. literalinclude:: ../../doc/api_samples/device_profiles/device_profiles-create-resp.json :language: javascript Delete One Device Profile by uuid diff --git a/api-ref/source/v2/devices.inc b/api-ref/source/devices.inc similarity index 81% rename from api-ref/source/v2/devices.inc rename to api-ref/source/devices.inc index c217d21f..fed88af0 100644 --- a/api-ref/source/v2/devices.inc +++ b/api-ref/source/devices.inc @@ -21,7 +21,7 @@ Error response codes: unauthorized(401), forbidden(403) **Example response: list all devices** -.. literalinclude:: ../../../doc/api_samples/devices/devices-list-resp.json +.. literalinclude:: ../../doc/api_samples/devices/devices-list-resp.json :language: javascript Get One Device @@ -43,5 +43,5 @@ Request **Example response: show details of a specific device** -.. literalinclude:: ../../../doc/api_samples/devices/devices-getone-resp.json +.. literalinclude:: ../../doc/api_samples/devices/devices-getone-resp.json :language: javascript diff --git a/api-ref/source/index.rst b/api-ref/source/index.rst index 82995ffb..06dd0800 100644 --- a/api-ref/source/index.rst +++ b/api-ref/source/index.rst @@ -2,10 +2,17 @@ OpenStack Acceleration APIs =========================== -This is a reference for the OpenStack Acceleration API which is provided by -the Cyborg project. +This is a reference for the OpenStack Acceleration v2 API which is provided +by the Cyborg project. Starting from Ussuri, Cyborg supports only Version 2 +REST APIs. The Version 1 APIs were deprecated in Train and shall be removed +in Ussuri. -.. toctree:: - :maxdepth: 1 +.. rest_expand_all:: - v2/index +.. include:: device_profile.inc + +.. include:: arqs.inc + +.. include:: devices.inc + +.. include:: deployables.inc diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/parameters.yaml similarity index 100% rename from api-ref/source/v2/parameters.yaml rename to api-ref/source/parameters.yaml diff --git a/api-ref/source/v2/index.rst b/api-ref/source/v2/index.rst deleted file mode 100644 index bf1c6f86..00000000 --- a/api-ref/source/v2/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -============================== -OpenStack Acceleration v2 APIs -============================== - -This is a reference for the OpenStack Acceleration v2 API which is provided -by the Cyborg project. Starting from Ussuri, Cyborg supports only Version 2 -REST APIs. The Version 1 APIs were deprecated in Train and shall be removed -in Ussuri. - -.. rest_expand_all:: - -.. include:: device_profile.inc - -.. include:: arqs.inc - -.. include:: devices.inc - -.. include:: deployables.inc