From 1fe09926c8c1523d83aa834d2b143d266fde14ad Mon Sep 17 00:00:00 2001 From: Anthony Young Date: Tue, 21 Feb 2012 13:59:29 -0800 Subject: Fix error that causes 400 in flavor create. * Fixes bug 938212 * Fix style per bcwaldon's comment Change-Id: I5c4a024c29634f1b786a36ca93050b9f2de41dea --- nova/api/openstack/compute/contrib/flavorextradata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/api') 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) -- cgit