From 0162a42970b833c2d5d0802ff4c55f65fa253ee2 Mon Sep 17 00:00:00 2001 From: Brian Waldon Date: Wed, 12 Oct 2011 16:28:24 -0400 Subject: Convert instancetype.flavorid to string Fixes bug 861666. This also removes some direct database access in favor of using nova.compute.instance_types throughout the code. Change-Id: I572cc19454fa76f435f5672d3d6e7ed55c8817da --- nova/virt/xenapi/vm_utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'nova/virt') diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 9dbc33ba6..e3591c1df 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -633,8 +633,7 @@ w # FIXME(jk0): this was copied directly from compute.manager.py, let's # refactor this to a common area instance_type_id = instance['instance_type_id'] - instance_type = db.instance_type_get(context, - instance_type_id) + instance_type = instance_types.get_instance_type(instance_type_id) allowed_size_gb = instance_type['local_gb'] allowed_size_bytes = allowed_size_gb * 1024 * 1024 * 1024 -- cgit