diff options
| author | Ken Pepple <ken.pepple@gmail.com> | 2011-02-09 13:58:43 -0800 |
|---|---|---|
| committer | Ken Pepple <ken.pepple@gmail.com> | 2011-02-09 13:58:43 -0800 |
| commit | cf2db4f18dbff14fb8882a4747c607ff26b1de55 (patch) | |
| tree | 53bfe65a919e0d2c9af7b3a1d0859e1e8ed7349c | |
| parent | 99a02a7d68416c72675f7b6c554df9b682771e04 (diff) | |
fixed overlooked mandatory changes in Xen
| -rw-r--r-- | nova/virt/libvirt_conn.py | 5 | ||||
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 4 |
2 files changed, 5 insertions, 4 deletions
diff --git a/nova/virt/libvirt_conn.py b/nova/virt/libvirt_conn.py index 94fe93c40..14cc4cf39 100644 --- a/nova/virt/libvirt_conn.py +++ b/nova/virt/libvirt_conn.py @@ -612,7 +612,7 @@ class LibvirtConnection(object): user=user, project=project, size=size) - type_data = test.INSTANCE_TYPES[inst['instance_type']] + type_data = instance_types.get_instance_type([inst['instance_type']]) if type_data['local_gb']: self._cache_image(fn=self._create_local, @@ -673,7 +673,8 @@ class LibvirtConnection(object): instance['id']) # FIXME(vish): stick this in db instance_type = instance['instance_type'] - instance_type = test.INSTANCE_TYPES[instance_type] + # instance_type = test.INSTANCE_TYPES[instance_type] + instance_type = instance_types.get_instance_type(instance_type) ip_address = db.instance_get_fixed_address(context.get_admin_context(), instance['id']) # Assume that the gateway also acts as the dhcp server. diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 38a6f73ce..a9308eea1 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -31,7 +31,6 @@ import glance.client from nova import exception from nova import flags from nova import log as logging -from nova import test from nova import utils from nova.auth.manager import AuthManager from nova.compute import instance_types @@ -83,7 +82,8 @@ class VMHelper(HelperBase): the pv_kernel flag indicates whether the guest is HVM or PV """ - instance_type = test.INSTANCE_TYPES[instance.instance_type] + instance_type = instance_types.\ + get_instance_type(instance.instance_type) mem = str(long(instance_type['memory_mb']) * 1024 * 1024) vcpus = str(instance_type['vcpus']) rec = { |
