summaryrefslogtreecommitdiff
path: root/ironic/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-08-24 09:45:07 +0000
committerGerrit Code Review <review@openstack.org>2015-08-24 09:45:07 +0000
commitd9fccbd5ab1445a5ab2b3eae8714d5c1c6db280f (patch)
treee8eb995c34e4307196b20c90af7ab8a7703e1618 /ironic/api
parent312bdf96d67277949dc153769021313d7c78bce2 (diff)
parent34104f79bf604418ca18bf1b2d9c71ae288895e1 (diff)
downloadironic-d9fccbd5ab1445a5ab2b3eae8714d5c1c6db280f.tar.gz
Merge "Fix nits from 'HTTP constants' patch"4.0.0
Diffstat (limited to 'ironic/api')
-rw-r--r--ironic/api/controllers/v1/node.py2
-rw-r--r--ironic/api/hooks.py2
2 files changed, 3 insertions, 1 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