summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAndrew Laski <andrew.laski@rackspace.com>2013-04-18 14:36:26 -0400
committerAndrew Laski <andrew.laski@rackspace.com>2013-04-18 16:28:45 -0400
commit7e006ca39fc57e35244f471c0f0bb6773fdbbc28 (patch)
treeb3ff33cfab07c5363b408a20c75c80b37fdc39e4 /nova/api
parent3572a07311788b17f3645a2e4d89cd338907d24c (diff)
downloadnova-7e006ca39fc57e35244f471c0f0bb6773fdbbc28.tar.gz
nova-7e006ca39fc57e35244f471c0f0bb6773fdbbc28.tar.xz
nova-7e006ca39fc57e35244f471c0f0bb6773fdbbc28.zip
Don't swallow PolicyNotAuthorized for resize/reboot actions
Removes 'except Exception' lines in the api which were preventing PolicyNotAuthorized exceptions from bubbling up and returning 403 to the caller. This addresses policy exceptions in confirmResize, revertResize, and reboot. The try block calls into the compute api which sends a cast to perform to bulk of the work, so there is little chance of an exception bubbling up which is not already being caught. Removes a unit test for a condition that should not exist. Bug 1170453 Change-Id: I516a19894ab3d183057c774e84c4faa7053a6463
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/servers.py9
1 files changed, 0 insertions, 9 deletions
diff --git a/nova/api/openstack/compute/servers.py b/nova/api/openstack/compute/servers.py
index 12efa5eb4..cf200e50a 100644
--- a/nova/api/openstack/compute/servers.py
+++ b/nova/api/openstack/compute/servers.py
@@ -1031,9 +1031,6 @@ class Controller(wsgi.Controller):
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'confirmResize')
- except Exception, e:
- LOG.exception(_("Error in confirm-resize %s"), e)
- raise exc.HTTPBadRequest()
return exc.HTTPNoContent()
@wsgi.response(202)
@@ -1054,9 +1051,6 @@ class Controller(wsgi.Controller):
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'revertResize')
- except Exception, e:
- LOG.exception(_("Error in revert-resize %s"), e)
- raise exc.HTTPBadRequest()
return webob.Response(status_int=202)
@wsgi.response(202)
@@ -1084,9 +1078,6 @@ class Controller(wsgi.Controller):
except exception.InstanceInvalidState as state_error:
common.raise_http_conflict_for_instance_invalid_state(state_error,
'reboot')
- except Exception, e:
- LOG.exception(_("Error in reboot %s"), e, instance=instance)
- raise exc.HTTPUnprocessableEntity()
return webob.Response(status_int=202)
def _resize(self, req, instance_id, flavor_id, **kwargs):