summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhanshyam <ghanshyam.mann@nectechnologies.in>2014-09-12 17:01:49 +0900
committerGhanshyam <ghanshyam.mann@nectechnologies.in>2014-09-12 17:01:49 +0900
commit21baedfc3185111589535cdc24fff83603a5e3fc (patch)
tree6b0c6e690a7eeb9eb3066072d0fc2a8f2e1530b2
parent9a1abd3b6669ea455eb6e650b25948b1a311ccc4 (diff)
downloadnova-21baedfc3185111589535cdc24fff83603a5e3fc.tar.gz
Fix `confirmResize` action status code in V2
In server`s action `confirmResize` status code in @wsgi.response decorator is set as 202 but this is overridden/ignored by return statement (return exc.HTTPNoContent()) which return 204 status code. This is very confusing and we should have expected status code in @wsgi.response decorator as consistence with other APIs. NOTE- There is no change in API return status code. API returns the same 204 return code as previously. Change-Id: Id8033fb8880306babebc14b319bce5b3b8798774 Closes-Bug: #1368597
-rw-r--r--nova/api/openstack/compute/servers.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 1a850fd48c..30211f8243 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -1077,7 +1077,7 @@ class Controller(wsgi.Controller):
return self._view_builder.show(req, instance)
- @wsgi.response(202)
+ @wsgi.response(204)
@wsgi.serializers(xml=FullServerTemplate)
@wsgi.deserializers(xml=ActionDeserializer)
@wsgi.action('confirmResize')
@@ -1094,7 +1094,6 @@ class Controller(wsgi.Controller):
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'confirmResize')
- return exc.HTTPNoContent()
@wsgi.response(202)
@wsgi.serializers(xml=FullServerTemplate)