diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index e7f612918..e7f701add 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -1298,7 +1298,8 @@ class XenAPIAutoDiskConfigTestCase(stubs.XenAPITestBase): vdi_uuid = session.call_xenapi('VDI.get_record', vdi_ref)['uuid'] vdis = {'root': {'uuid': vdi_uuid, 'ref': vdi_ref}} - self.conn._vmops._attach_disks(instance, disk_image_type, vm_ref, vdis) + self.conn._vmops._attach_disks(instance, vm_ref, instance['name'], + disk_image_type, vdis) self.assertEqual(marker["partition_called"], called) @@ -1383,7 +1384,8 @@ class XenAPIGenerateLocal(stubs.XenAPITestBase): vdis = {'root': {'uuid': vdi_uuid, 'ref': vdi_ref}} self.called = False - self.conn._vmops._attach_disks(instance, disk_image_type, vm_ref, vdis) + self.conn._vmops._attach_disks(instance, vm_ref, instance['name'], + disk_image_type, vdis) self.assertTrue(self.called) def test_generate_swap(self): diff --git a/nova/tests/xenapi/stubs.py b/nova/tests/xenapi/stubs.py index b7de16e9c..4813bfa57 100644 --- a/nova/tests/xenapi/stubs.py +++ b/nova/tests/xenapi/stubs.py @@ -39,7 +39,7 @@ def stubout_firewall_driver(stubs, conn): def stubout_instance_snapshot(stubs): - def fake_fetch_image(context, session, instance, image, type): + def fake_fetch_image(context, session, instance, name_label, image, type): return {'root': dict(uuid=_make_fake_vdi(), file=None), 'kernel': dict(uuid=_make_fake_vdi(), file=None), 'ramdisk': dict(uuid=_make_fake_vdi(), file=None)} @@ -117,8 +117,8 @@ def stubout_lookup_image(stubs): def stubout_fetch_disk_image(stubs, raise_failure=False): """Simulates a failure in fetch image_glance_disk.""" - def _fake_fetch_disk_image(context, session, instance, image, - image_type): + def _fake_fetch_disk_image(context, session, instance, name_label, image, + image_type): if raise_failure: raise fake.Failure("Test Exception raised by " "fake fetch_image_glance_disk")