summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2012-02-21 13:59:29 -0800
committerAnthony Young <sleepsonthefloor@gmail.com>2012-02-21 15:02:03 -0800
commit1fe09926c8c1523d83aa834d2b143d266fde14ad (patch)
tree72f6bb92ce159235df5f004e46e9dfed85a8d8ec /nova/api
parentadaf9049c8fb3652c0962909a3c835e1724d8a17 (diff)
Fix error that causes 400 in flavor create.
* Fixes bug 938212 * Fix style per bcwaldon's comment Change-Id: I5c4a024c29634f1b786a36ca93050b9f2de41dea
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/compute/contrib/flavorextradata.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/compute/contrib/flavorextradata.py b/nova/api/openstack/compute/contrib/flavorextradata.py
index 5c86bef90..aa9156673 100644
--- a/nova/api/openstack/compute/contrib/flavorextradata.py
+++ b/nova/api/openstack/compute/contrib/flavorextradata.py
@@ -84,8 +84,8 @@ class FlavorextradataController(wsgi.Controller):
resp_obj.attach(xml=FlavorextradatumTemplate())
try:
- flavor_ref = instance_types.\
- get_instance_type_by_flavor_id(id)
+ fid = resp_obj.obj['flavor']['id']
+ flavor_ref = instance_types.get_instance_type_by_flavor_id(fid)
except exception.FlavorNotFound:
explanation = _("Flavor not found.")
raise exception.HTTPNotFound(explanation=explanation)