From 2c144fccad21f60fd1e34436527c44abdba345dd Mon Sep 17 00:00:00 2001 From: Johannes Erdfelt Date: Mon, 2 Jul 2012 20:35:09 +0000 Subject: Pass vdi_ref to fake.create_vbd() not a string This would not cause a problem since vdi_ref wasn't used internally in the fake xenapi module. At least not yet... Change-Id: I2fe094b9c3a7d478fe20149a368af132f3258bda --- nova/tests/test_xenapi.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index c4b3262f5..26618601c 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -756,8 +756,11 @@ class XenAPIVMTestCase(test.TestCase): session = xenapi_conn.XenAPISession('test_url', 'root', 'test_pass') vm_ref = vm_utils.lookup(session, instance.name) - xenapi_fake.create_vbd(vm_ref, "swap", userdevice=1) - xenapi_fake.create_vbd(vm_ref, "rootfs", userdevice=0) + swap_vdi_ref = xenapi_fake.create_vdi('swap', None) + root_vdi_ref = xenapi_fake.create_vdi('root', None) + + xenapi_fake.create_vbd(vm_ref, swap_vdi_ref, userdevice=1) + xenapi_fake.create_vbd(vm_ref, root_vdi_ref, userdevice=0) conn = xenapi_conn.XenAPIDriver(False) image_meta = {'id': IMAGE_VHD, -- cgit