Reducing the number of compute calls to Glance

Fixes bug 886224

Change-Id: Ibd270d24eb68cc2503fee933a2154125995d352d
This commit is contained in:
Brian Waldon
2011-11-04 12:44:30 -04:00
parent 93c0240875
commit cb05f783d0
13 changed files with 86 additions and 61 deletions

View File

@@ -74,6 +74,12 @@ class VMWareAPIVMTestCase(test.TestCase):
'mac': 'DE:AD:BE:EF:00:00',
'rxtx_cap': 3})]
self.image = {
'id': 'c1c8ce3d-c2e0-4247-890c-ccf5cc1c004c',
'disk_format': 'vhd',
'size': 512,
}
def tearDown(self):
super(VMWareAPIVMTestCase, self).tearDown()
vmwareapi_fake.cleanup()
@@ -95,7 +101,8 @@ class VMWareAPIVMTestCase(test.TestCase):
"""Create and spawn the VM."""
self._create_instance_in_the_db()
self.type_data = db.instance_type_get_by_name(None, 'm1.large')
self.conn.spawn(self.context, self.instance, self.network_info)
self.conn.spawn(self.context, self.instance, self.image,
self.network_info)
self._check_vm_record()
def _check_vm_record(self):