Merge "Fix nits from 'HTTP constants' patch"
This commit is contained in:
commit
d9fccbd5ab
@ -478,7 +478,7 @@ class Node(base.APIBase):
|
|||||||
except exception.ChassisNotFound as e:
|
except exception.ChassisNotFound as e:
|
||||||
# Change error code because 404 (NotFound) is inappropriate
|
# Change error code because 404 (NotFound) is inappropriate
|
||||||
# response for a POST request to create a Port
|
# response for a POST request to create a Port
|
||||||
e.code = http_client.BAD_REQUEST # BadRequest
|
e.code = http_client.BAD_REQUEST
|
||||||
raise e
|
raise e
|
||||||
elif value == wtypes.Unset:
|
elif value == wtypes.Unset:
|
||||||
self._chassis_uuid = wtypes.Unset
|
self._chassis_uuid = wtypes.Unset
|
||||||
|
@ -135,6 +135,8 @@ class NoExceptionTracebackHook(hooks.PecanHook):
|
|||||||
return
|
return
|
||||||
|
|
||||||
# Do nothing if there is no error.
|
# 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 <
|
if (http_client.OK <= state.response.status_int <
|
||||||
http_client.BAD_REQUEST):
|
http_client.BAD_REQUEST):
|
||||||
return
|
return
|
||||||
|
@ -443,7 +443,7 @@ class NodeNotLocked(Invalid):
|
|||||||
class NoFreeConductorWorker(TemporaryFailure):
|
class NoFreeConductorWorker(TemporaryFailure):
|
||||||
message = _('Requested action cannot be performed due to lack of free '
|
message = _('Requested action cannot be performed due to lack of free '
|
||||||
'conductor workers.')
|
'conductor workers.')
|
||||||
code = http_client.SERVICE_UNAVAILABLE # Service Unavailable (temporary).
|
code = http_client.SERVICE_UNAVAILABLE
|
||||||
|
|
||||||
|
|
||||||
class VendorPassthruException(IronicException):
|
class VendorPassthruException(IronicException):
|
||||||
|
Loading…
Reference in New Issue
Block a user