summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-11-27 19:10:45 +0000
committerGerrit Code Review <review@openstack.org>2012-11-27 19:10:45 +0000
commit1658fa675132f1ffac9ffdb9ec002cc1fce37bd7 (patch)
treef25387982e9e9e99fdac8dc8b89a18fbc7b65a9e /nova/api
parent47ddb8ca76fba11a6e77b12e9eeb61b5a9c78c48 (diff)
parent4e43747037058522087e6eb71ef3bcce266d55cc (diff)
downloadnova-1658fa675132f1ffac9ffdb9ec002cc1fce37bd7.tar.gz
nova-1658fa675132f1ffac9ffdb9ec002cc1fce37bd7.tar.xz
nova-1658fa675132f1ffac9ffdb9ec002cc1fce37bd7.zip
Merge "Provide better error message for aggregate-create"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/aggregates.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py
index 9435f5980..ef9679f5a 100644
--- a/nova/api/openstack/compute/contrib/aggregates.py
+++ b/nova/api/openstack/compute/contrib/aggregates.py
@@ -71,11 +71,12 @@ class AggregateController(object):
try:
aggregate = self.api.create_aggregate(context, name, avail_zone)
- except (exception.AggregateNameExists,
- exception.InvalidAggregateAction):
- LOG.info(_("Cannot create aggregate with name %(name)s and "
- "availability zone %(avail_zone)s") % locals())
+ except exception.AggregateNameExists as e:
+ LOG.info(e)
raise exc.HTTPConflict
+ except exception.InvalidAggregateAction as e:
+ LOG.info(e)
+ raise
return self._marshall_aggregate(aggregate)
def show(self, req, id):