diff options
| author | John Garbutt <john.garbutt@citrix.com> | 2012-02-28 18:14:25 +0000 |
|---|---|---|
| committer | John Garbutt <john.garbutt@citrix.com> | 2012-02-28 18:14:25 +0000 |
| commit | 9f7595aa0f464dc7344e0639951ea731dcfbeca5 (patch) | |
| tree | d811a7117d64fcdf77545a07a430fd9978c6e472 /nova/api | |
| parent | 85f844c26e1a51665891ede3e5696d13433a7c59 (diff) | |
| download | nova-9f7595aa0f464dc7344e0639951ea731dcfbeca5.tar.gz nova-9f7595aa0f464dc7344e0639951ea731dcfbeca5.tar.xz nova-9f7595aa0f464dc7344e0639951ea731dcfbeca5.zip | |
Fixes bug 942549
Ensure a more meaninful error is reported when an aggregate is created in a
non-exsistent availability zone.
Change-Id: I15ea6c884bb6f326df1d88019ee0ecf070196d1e
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/aggregates.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/aggregates.py b/nova/api/openstack/compute/contrib/aggregates.py index ea90a57d7..583fe1b51 100644 --- a/nova/api/openstack/compute/contrib/aggregates.py +++ b/nova/api/openstack/compute/contrib/aggregates.py @@ -72,7 +72,8 @@ class AggregateController(object): try: aggregate = self.api.create_aggregate(context, name, avail_zone) - except exception.AggregateNameExists: + except (exception.AggregateNameExists, + exception.InvalidAggregateAction): LOG.exception(_("Cannot create aggregate with name %(name)s and " "availability zone %(avail_zone)s") % locals()) raise exc.HTTPConflict |
