diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index 2fda6eb45..0a9df31e5 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -1925,7 +1925,8 @@ class LibvirtConnTestCase(test.TestCase): fake_none) try: - conn.spawn(self.context, instance, None, network_info) + conn.spawn(self.context, instance, None, [], 'herp', + network_info=network_info) except Exception, e: # assert that no exception is raised due to sha1 receiving an int self.assertEqual(-1, unicode(e).find('must be string or buffer' diff --git a/nova/tests/test_virt_drivers.py b/nova/tests/test_virt_drivers.py index 68b4fe4f2..276c1b5d4 100644 --- a/nova/tests/test_virt_drivers.py +++ b/nova/tests/test_virt_drivers.py @@ -206,9 +206,8 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase): instance_ref = test_utils.get_test_instance() network_info = test_utils.get_test_network_info() image_info = test_utils.get_test_image_info(None, instance_ref) - self.connection.spawn(self.ctxt, instance=instance_ref, - image_meta=image_info, - network_info=network_info) + self.connection.spawn(self.ctxt, instance_ref, image_info, + [], 'herp', network_info=network_info) return instance_ref, network_info @catch_notimplementederror @@ -279,7 +278,7 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase): @catch_notimplementederror def test_rescue(self): instance_ref, network_info = self._get_running_instance() - self.connection.rescue(self.ctxt, instance_ref, network_info, None) + self.connection.rescue(self.ctxt, instance_ref, network_info, None, '') @catch_notimplementederror def test_unrescue_unrescued_instance(self): @@ -289,7 +288,7 @@ class _VirtDriverTestCase(_FakeDriverBackendTestCase): @catch_notimplementederror def test_unrescue_rescued_instance(self): instance_ref, network_info = self._get_running_instance() - self.connection.rescue(self.ctxt, instance_ref, network_info, None) + self.connection.rescue(self.ctxt, instance_ref, network_info, None, '') self.connection.unrescue(instance_ref, network_info) @catch_notimplementederror diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index ec84ba077..321065657 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -552,12 +552,10 @@ class XenAPIVMTestCase(stubs.XenAPITestBase): # NOTE(tr3buchet): this is a terrible way to do this... network_info[0]['network']['subnets'][0]['dns'] = [] - # admin_pass isn't part of the DB model, but it does get set as - # an attribute for spawn to use - instance.admin_pass = 'herp' image_meta = {'id': IMAGE_VHD, 'disk_format': 'vhd'} - self.conn.spawn(self.context, instance, image_meta, network_info) + self.conn.spawn(self.context, instance, image_meta, [], 'herp', + network_info) self.create_vm_record(self.conn, os_type, instance['name']) self.check_vm_record(self.conn, check_injection) self.assertTrue(instance.os_type) @@ -790,7 +788,7 @@ class XenAPIVMTestCase(stubs.XenAPITestBase): conn = xenapi_conn.XenAPIDriver(False) image_meta = {'id': IMAGE_VHD, 'disk_format': 'vhd'} - conn.rescue(self.context, instance, [], image_meta) + conn.rescue(self.context, instance, [], image_meta, '') vm = xenapi_fake.get_record('VM', vm_ref) rescue_name = "%s-rescue" % vm["name_label"] @@ -881,8 +879,8 @@ class XenAPIVMTestCase(stubs.XenAPITestBase): image_meta = {'id': IMAGE_VHD, 'disk_format': 'vhd'} if spawn: - instance.admin_pass = 'herp' - self.conn.spawn(self.context, instance, image_meta, network_info) + self.conn.spawn(self.context, instance, image_meta, [], 'herp', + network_info) return instance