summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJosh Kearney <josh@jk0.org>2011-06-28 16:03:41 -0500
committerJosh Kearney <josh@jk0.org>2011-06-28 16:03:41 -0500
commit2916aa40f6dc0b06217ff7d3750ecdd3bb03e4fd (patch)
tree3ce38783d588e3c86b72c28111d7a3a5ae33c92f /nova
parentec1afee8399818db2ba11952a61c924da73f57a0 (diff)
downloadnova-2916aa40f6dc0b06217ff7d3750ecdd3bb03e4fd.tar.gz
nova-2916aa40f6dc0b06217ff7d3750ecdd3bb03e4fd.tar.xz
nova-2916aa40f6dc0b06217ff7d3750ecdd3bb03e4fd.zip
Review feedback.
Diffstat (limited to 'nova')
-rw-r--r--nova/api/openstack/images.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py
index 44d8c94a4..7ebf58023 100644
--- a/nova/api/openstack/images.py
+++ b/nova/api/openstack/images.py
@@ -105,7 +105,8 @@ class Controller(object):
try:
return body["image"][param]
except KeyError:
- raise webob.exc.HTTPBadRequest()
+ raise webob.exc.HTTPBadRequest(explanation="Missing required "
+ "param: %s" % param)
context = req.environ['nova.context']
content_type = req.get_content_type()
@@ -131,7 +132,8 @@ class Controller(object):
# NOTE(sirp): Unlike snapshot, backup is not a customer facing
# API call; rather, it's used by the internal backup scheduler
if not FLAGS.allow_admin_api:
- raise webob.exc.HTTPBadRequest()
+ raise webob.exc.HTTPBadRequest(
+ explanation="Admin API Required")
backup_type = get_param("backup_type")
rotation = int(get_param("rotation"))
@@ -141,7 +143,8 @@ class Controller(object):
backup_type, rotation, extra_properties=props)
else:
LOG.error(_("Invalid image_type '%s' passed") % image_type)
- raise webob.exc.HTTPBadRequest()
+ raise webob.exc.HTTPBadRequest(explanation="Invalue image_type: "
+ "%s" % image_type)
return dict(image=self.get_builder(req).build(image, detail=True))