From 5ca7c9201a844f9428b59a0dd6cbf0c628f607b4 Mon Sep 17 00:00:00 2001 From: David Peraza Date: Thu, 21 Feb 2013 23:42:14 +0000 Subject: [PATCH] Removes unnecessary qemu-img dependency on powervm driver Fixes bug 1131033 Power VM driver is using qemu-img through the fetch_to_raw call No need to attempt a conversion since power images can only be represented with the raw format, removing thus the need for any conversions by calling fetch instead of fetch_to_raw. Change-Id: I94b46e184cb87924a4754a0a48d9c2013a3eb756 --- nova/tests/test_powervm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nova/tests/test_powervm.py b/nova/tests/test_powervm.py index ad0e4539..640497fb 100644 --- a/nova/tests/test_powervm.py +++ b/nova/tests/test_powervm.py @@ -151,11 +151,11 @@ class PowerVMDriverTestCase(test.TestCase): self.assertTrue(self.powervm_connection.instance_exists(name)) def test_spawn(self): - def fake_image_fetch_to_raw(context, image_id, file_path, + def fake_image_fetch(context, image_id, file_path, user_id, project_id): pass self.flags(powervm_img_local_path='/images/') - self.stubs.Set(images, 'fetch_to_raw', fake_image_fetch_to_raw) + self.stubs.Set(images, 'fetch', fake_image_fetch) image_meta = {} image_meta['id'] = '666' fake_net_info = network_model.NetworkInfo([ @@ -173,7 +173,7 @@ class PowerVMDriverTestCase(test.TestCase): raise ex self.flags(powervm_img_local_path='/images/') - self.stubs.Set(images, 'fetch_to_raw', lambda *x, **y: None) + self.stubs.Set(images, 'fetch', lambda *x, **y: None) self.stubs.Set( self.powervm_connection._powervm._disk_adapter, 'create_volume_from_image',