From d813475bc0df48007b32bd827775e05b8fc7f026 Mon Sep 17 00:00:00 2001 From: vilobhmm Date: Wed, 4 Jun 2014 22:08:24 +0000 Subject: [PATCH] Change to add response status codes for Cinder Cinder API docs doesn't include Error responses. This change adds details about the common response status codes returned by the Block Storage Service. Changes include modification both at the v2 and v1 layer. Closes-Bug: #1244395 Change-Id: I08f4c3d32e57b56c82f35663f6aed12a706f4a8d --- pom.xml | 2 +- v1/bk_blockstorage_api_ref_v1.xml | 28 +++++++---- v2/bk_blockstorage_api_ref_v2.xml | 18 +++++-- v2/section_http_status_codes.xml | 79 +++++++++++++++++++++++++++++++ 4 files changed, 113 insertions(+), 14 deletions(-) create mode 100644 v2/section_http_status_codes.xml diff --git a/pom.xml b/pom.xml index fad1045..4498ff5 100644 --- a/pom.xml +++ b/pom.xml @@ -39,7 +39,7 @@ com.rackspace.cloud.api clouddocs-maven-plugin - 2.0.2 + 2.0.4 diff --git a/v1/bk_blockstorage_api_ref_v1.xml b/v1/bk_blockstorage_api_ref_v1.xml index 7d9c3f0..e2b9b60 100644 --- a/v1/bk_blockstorage_api_ref_v1.xml +++ b/v1/bk_blockstorage_api_ref_v1.xml @@ -68,12 +68,23 @@ format="SVG" scale="60"/> + + 2014-06-17 + + + + Added common response status codes returned by + Block Storage. + + + + 2013-02-18 - Updating v1 documentation; . + Updated v1 documentation. @@ -83,7 +94,7 @@ format="SVG" scale="60"/> - Edits to initial version; . + Edits to initial version. @@ -360,6 +371,7 @@ format="SVG" scale="60"/> +
Limits All accounts, by default, have a preconfigured set of @@ -628,9 +640,7 @@ format="SVG" scale="60"/> Content-Type: application/xml Content-Length: 121 Date: Mon, 28 Nov 2011 18:19:37 GMT - - - + Example fault: JSON response @@ -638,9 +648,7 @@ Date: Mon, 28 Nov 2011 18:19:37 GMT Content-Length: 120 Content-Type: application/json; charset=UTF-8 Date: Tue, 29 Nov 2011 00:33:48 GMT - - - + The error code (code) is returned in the body of the response for convenience. The message @@ -656,7 +664,7 @@ Date: Tue, 29 Nov 2011 00:33:48 GMT of error. The following badRequest examples show errors when the volume - size is not valie: + size is not valid: Example badRequest fault and volume size errors: XML request @@ -675,7 +683,7 @@ Content-Type: application/json; charset=UTF-8 Date: Tue, 29 Nov 2011 00:33:48 GMT - The next two examples show itemNotFound + The following examples show itemNotFound errors: Example itemNotFound fault: XML response diff --git a/v2/bk_blockstorage_api_ref_v2.xml b/v2/bk_blockstorage_api_ref_v2.xml index b640307..47cea4b 100644 --- a/v2/bk_blockstorage_api_ref_v2.xml +++ b/v2/bk_blockstorage_api_ref_v2.xml @@ -63,14 +63,25 @@ format="SVG" scale="60"/> Programming Interface (API). + + 2014-06-17 + + + + Added common response status codes returned by + Block Storage. + + + + 2014-05-01 - Add Block Storage extensions to the API operations - chapter. + Added Block Storage extensions to the API + operations chapter. @@ -400,7 +411,7 @@ Content-Length: 187 Content-Type: application/xml X-Compute-Request-Id: req-8e0295cd-a283-46e4-96da-cae05cbfd1c7 -<?xml version='1.0' encoding='UTF-8'?> +<?xml version='1.0' encoding='UTF-7'?> <volume_types> <volume_type id="1" name="SATA"> <extra_specs/> @@ -411,6 +422,7 @@ X-Compute-Request-Id: req-8e0295cd-a283-46e4-96da-cae05cbfd1c7 </volume_types>
+
Limits All accounts, by default, have a preconfigured set of diff --git a/v2/section_http_status_codes.xml b/v2/section_http_status_codes.xml new file mode 100644 index 0000000..84f2abc --- /dev/null +++ b/v2/section_http_status_codes.xml @@ -0,0 +1,79 @@ + +
+ HTTP response status codes + When an error occurs, Block Storage returns an HTTP error + response code that denotes the type of error. Some errors + returns a response body, which returns additional information + about the error. + The following table describes the possible status + codes: + + + + + + + Response status code + Description + Response body? + + + + + 200 + Generic successful response. + Yes + + + 201 + Entity created. + Yes. Expect a location header and a response + body. + + + 204 + Successful response without body. + No + + + 301 + Redirection. + Yes + + + 400 + Invalid request (syntax, value, and so on). + Yes + + + 401 + Unauthenticated client. + Yes + + + 403 + Authenticated client unable to perform + action. + Yes + + + 409 + Action cannot be completed due to situation that + is possibly permanent. + Yes + + + 415 + Unsupported type. + Yes, with type details. + + + +