diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-08-24 09:45:07 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-08-24 09:45:07 +0000 |
commit | d9fccbd5ab1445a5ab2b3eae8714d5c1c6db280f (patch) | |
tree | e8eb995c34e4307196b20c90af7ab8a7703e1618 | |
parent | 312bdf96d67277949dc153769021313d7c78bce2 (diff) | |
parent | 34104f79bf604418ca18bf1b2d9c71ae288895e1 (diff) | |
download | ironic-d9fccbd5ab1445a5ab2b3eae8714d5c1c6db280f.tar.gz |
Merge "Fix nits from 'HTTP constants' patch"4.0.0
-rw-r--r-- | ironic/api/controllers/v1/node.py | 2 | ||||
-rw-r--r-- | ironic/api/hooks.py | 2 | ||||
-rw-r--r-- | ironic/common/exception.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/ironic/api/controllers/v1/node.py b/ironic/api/controllers/v1/node.py index f176a523f..65d0c347f 100644 --- a/ironic/api/controllers/v1/node.py +++ b/ironic/api/controllers/v1/node.py @@ -478,7 +478,7 @@ class Node(base.APIBase): except exception.ChassisNotFound as e: # Change error code because 404 (NotFound) is inappropriate # response for a POST request to create a Port - e.code = http_client.BAD_REQUEST # BadRequest + e.code = http_client.BAD_REQUEST raise e elif value == wtypes.Unset: self._chassis_uuid = wtypes.Unset diff --git a/ironic/api/hooks.py b/ironic/api/hooks.py index 6861ad6aa..90c1a2f96 100644 --- a/ironic/api/hooks.py +++ b/ironic/api/hooks.py @@ -135,6 +135,8 @@ class NoExceptionTracebackHook(hooks.PecanHook): return # Do nothing if there is no error. + # Status codes in the range 200 (OK) to 399 (400 = BAD_REQUEST) are not + # an error. if (http_client.OK <= state.response.status_int < http_client.BAD_REQUEST): return diff --git a/ironic/common/exception.py b/ironic/common/exception.py index 129bb71ab..580d955f7 100644 --- a/ironic/common/exception.py +++ b/ironic/common/exception.py @@ -443,7 +443,7 @@ class NodeNotLocked(Invalid): class NoFreeConductorWorker(TemporaryFailure): message = _('Requested action cannot be performed due to lack of free ' 'conductor workers.') - code = http_client.SERVICE_UNAVAILABLE # Service Unavailable (temporary). + code = http_client.SERVICE_UNAVAILABLE class VendorPassthruException(IronicException): |