diff options
| author | Andy McCrae <andy.mccrae@gmail.com> | 2012-09-27 11:58:14 +0000 |
|---|---|---|
| committer | Andy McCrae <andy.mccrae@gmail.com> | 2012-09-27 12:36:53 +0000 |
| commit | 3db7a943bebbda5fea07fc80813cabc436fb892b (patch) | |
| tree | 066c8b358d821b63ec606fd3d6f57c92bf30f940 /nova/api | |
| parent | 32b674b0abb338c82850fc24d39f9632c71503e6 (diff) | |
| download | nova-3db7a943bebbda5fea07fc80813cabc436fb892b.tar.gz nova-3db7a943bebbda5fea07fc80813cabc436fb892b.tar.xz nova-3db7a943bebbda5fea07fc80813cabc436fb892b.zip | |
Fixes error message for flavor-create duplicate ID
Fixes bug 1056918
Change-Id: I516153211504b67f6e8b8ebb138abcef4be4d73e
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/contrib/flavormanage.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/nova/api/openstack/compute/contrib/flavormanage.py b/nova/api/openstack/compute/contrib/flavormanage.py index 69d5d6ed9..e8ac4d522 100644 --- a/nova/api/openstack/compute/contrib/flavormanage.py +++ b/nova/api/openstack/compute/contrib/flavormanage.py @@ -73,7 +73,8 @@ class FlavorManageController(wsgi.Controller): root_gb, ephemeral_gb, flavorid, swap, rxtx_factor, is_public) req.cache_db_flavor(flavor) - except exception.InstanceTypeExists as err: + except (exception.InstanceTypeExists, + exception.InstanceTypeIdExists) as err: raise webob.exc.HTTPConflict(explanation=str(err)) return self._view_builder.show(req, flavor) |
