summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Dague <sean@dague.net>2016-05-06 07:32:21 -0400
committerSean Dague <sean@dague.net>2016-05-09 12:37:22 -0400
commitdaad02b41de943d8a649ea218733151171af5b9c (patch)
tree97f02bb0b8390d4e544f918f0b509bd06e56e081
parent1801a48cc6b529272c81687f1ffd41753e5c3e9a (diff)
downloadnova-daad02b41de943d8a649ea218733151171af5b9c.tar.gz
api-ref: method verification and fixes for servers.inc
Update the response codes for the methods based on what is in the code. This follows the pattern of updating these error codes when doing method verification that jichen has been doing. Some notes are left for the body_verification phase later, as that is going to take a while for this file. Part of bp:api-ref-in-rst Change-Id: I8d8bd09f72572caed1a45fa23f95a15d330c2f26
-rw-r--r--api-ref/source/servers.inc49
1 files changed, 34 insertions, 15 deletions
diff --git a/api-ref/source/servers.inc b/api-ref/source/servers.inc
index 391c12bcd8..ab67868f65 100644
--- a/api-ref/source/servers.inc
+++ b/api-ref/source/servers.inc
@@ -1,5 +1,4 @@
.. -*- rst -*-
-.. needs:method_verification
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
@@ -148,8 +147,8 @@ body. The possible server status values are:
Normal response codes: 200
-Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
-unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
+Error response codes: badRequest(400), unauthorized(401),
+forbidden(403), itemNotFound(404)
Request
-------
@@ -245,8 +244,22 @@ Troubleshooting
Normal response codes: 202
-Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
-unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
+Error response codes: badRequest(400), unauthorized(401),
+forbidden(403), itemNotFound(404), conflict(409), entityTooLarge(413)
+
+..
+ TODO(sdague): leave these notes for later when fixing the body
+ language. They are commented out so they won't render, but are
+ useful to not have to look this up again later.
+
+ A conflict(409) is returned in the event of trying to allocated already
+ allocated resources (such as networks) to the server in question.
+
+ entityTooLarge(413) is returned if the ``user_data`` exceeds what is
+ allowed by the backend.
+
+ All other failure conditions map to 400, and will need to be
+ disambiguated by the error string returned.
Request
-------
@@ -324,10 +337,8 @@ HostId is unique per account and is not globally unique.
Normal response codes: 200
-Error response codes: computeFault (400, 500, …), serviceUnavailable
-(503), badRequest (400), unauthorized (401), forbidden (403),
-badMethod (405)
-
+Error response codes: badRequest(400), unauthorized(401),
+forbidden(403), itemNotFound(404)
Request
-------
@@ -412,8 +423,8 @@ The server must exist.
Normal response codes: 200
-Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
-unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
+Error response codes: unauthorized(401), forbidden(403),
+itemNotFound(404)
Request
-------
@@ -482,8 +493,8 @@ You can edit the ``accessIPv4``, ``accessIPv6``, ``diskConfig`` and ``name`` att
Normal response codes: 200
-Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
-unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
+Error response codes: badRequest(400), unauthorized(401),
+forbidden(403), itemNotFound(404)
Request
-------
@@ -597,8 +608,16 @@ Troubleshooting
Normal response codes: 204
-Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
-unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
+Error response codes: unauthorized(401), forbidden(403),
+itemNotFound(404), conflict(409)
+
+..
+ TODO(sdague): for later phase of updating body.
+
+ conflict is returned under 2 conditions. When the instance is
+ locked, so can't be deleted, or if the instance is in some other
+ state which makes it not possible to delete.
+
Request
-------