summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <jogo@cloudscaling.com>2012-09-19 22:27:20 +0000
committerJoe Gordon <jogo@cloudscaling.com>2012-09-19 22:34:13 +0000
commit6ebe7fd5f0c3fbe9b409f643237be837c5266dea (patch)
treeba733efad9b9ea79b0917d63de0b5443cb787f23
parent2934799fda4ca62337833a3ed736da5dce1210ae (diff)
downloadnova-6ebe7fd5f0c3fbe9b409f643237be837c5266dea.tar.gz
nova-6ebe7fd5f0c3fbe9b409f643237be837c5266dea.tar.xz
nova-6ebe7fd5f0c3fbe9b409f643237be837c5266dea.zip
No stack trace on bad nova aggregate-* command
When a 'nova aggregate-*; command is run with a bad parameter, Nova-api should not throw a stack trace. For example: 'nova aggregate-details badID' shouldn't cause a stack trace fix bug 1053150 Change-Id: Iab6059f44b7cfb5428a2b55cea53d63809d7a575
-rw-r--r--nova/api/openstack/compute/contrib/aggregates.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py
index 54eca8288..9435f5980 100644
--- a/nova/api/openstack/compute/contrib/aggregates.py
+++ b/nova/api/openstack/compute/contrib/aggregates.py
@@ -73,7 +73,7 @@ class AggregateController(object):
aggregate = self.api.create_aggregate(context, name, avail_zone)
except (exception.AggregateNameExists,
exception.InvalidAggregateAction):
- LOG.exception(_("Cannot create aggregate with name %(name)s and "
+ LOG.info(_("Cannot create aggregate with name %(name)s and "
"availability zone %(avail_zone)s") % locals())
raise exc.HTTPConflict
return self._marshall_aggregate(aggregate)
@@ -85,7 +85,7 @@ class AggregateController(object):
try:
aggregate = self.api.get_aggregate(context, id)
except exception.AggregateNotFound:
- LOG.exception(_("Cannot show aggregate: %(id)s") % locals())
+ LOG.info(_("Cannot show aggregate: %(id)s") % locals())
raise exc.HTTPNotFound
return self._marshall_aggregate(aggregate)
@@ -111,7 +111,7 @@ class AggregateController(object):
try:
aggregate = self.api.update_aggregate(context, id, updates)
except exception.AggregateNotFound:
- LOG.exception(_("Cannot update aggregate: %(id)s") % locals())
+ LOG.info(_("Cannot update aggregate: %(id)s") % locals())
raise exc.HTTPNotFound
return self._marshall_aggregate(aggregate)
@@ -123,7 +123,7 @@ class AggregateController(object):
try:
self.api.delete_aggregate(context, id)
except exception.AggregateNotFound:
- LOG.exception(_("Cannot delete aggregate: %(id)s") % locals())
+ LOG.info(_("Cannot delete aggregate: %(id)s") % locals())
raise exc.HTTPNotFound
def action(self, req, id, body):
@@ -149,12 +149,12 @@ class AggregateController(object):
try:
aggregate = self.api.add_host_to_aggregate(context, id, host)
except (exception.AggregateNotFound, exception.ComputeHostNotFound):
- LOG.exception(_("Cannot add host %(host)s in aggregate "
+ LOG.info(_("Cannot add host %(host)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPNotFound
except (exception.AggregateHostExists,
exception.InvalidAggregateAction):
- LOG.exception(_("Cannot add host %(host)s in aggregate "
+ LOG.info(_("Cannot add host %(host)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPConflict
return self._marshall_aggregate(aggregate)
@@ -167,11 +167,11 @@ class AggregateController(object):
try:
aggregate = self.api.remove_host_from_aggregate(context, id, host)
except (exception.AggregateNotFound, exception.AggregateHostNotFound):
- LOG.exception(_("Cannot remove host %(host)s in aggregate "
+ LOG.info(_("Cannot remove host %(host)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPNotFound
except exception.InvalidAggregateAction:
- LOG.exception(_("Cannot remove host %(host)s in aggregate "
+ LOG.info(_("Cannot remove host %(host)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPConflict
return self._marshall_aggregate(aggregate)
@@ -191,7 +191,7 @@ class AggregateController(object):
aggregate = self.api.update_aggregate_metadata(context,
id, metadata)
except exception.AggregateNotFound:
- LOG.exception(_("Cannot set metadata %(metadata)s in aggregate "
+ LOG.info(_("Cannot set metadata %(metadata)s in aggregate "
"%(id)s") % locals())
raise exc.HTTPNotFound