diff options
author | David Peraza <dperaza@linux.vnet.ibm.com> | 2013-02-21 23:42:14 +0000 |
---|---|---|
committer | David Peraza <dperaza@linux.vnet.ibm.com> | 2013-02-22 01:29:16 +0000 |
commit | edf15fdd38c670482848d2407a013a2ec4addd17 (patch) | |
tree | 4087480cea311cc9edda6c1e7d795f293f9f5d6e | |
parent | a42845e455c74f41852babbbd09a3514021ea71d (diff) | |
download | nova-edf15fdd38c670482848d2407a013a2ec4addd17.tar.gz nova-edf15fdd38c670482848d2407a013a2ec4addd17.tar.xz nova-edf15fdd38c670482848d2407a013a2ec4addd17.zip |
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
-rw-r--r-- | nova/tests/test_powervm.py | 6 | ||||
-rw-r--r-- | nova/virt/powervm/blockdev.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/nova/tests/test_powervm.py b/nova/tests/test_powervm.py index ad0e4539c..640497fb0 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', diff --git a/nova/virt/powervm/blockdev.py b/nova/virt/powervm/blockdev.py index 58ad29099..6c8e4b9a5 100644 --- a/nova/virt/powervm/blockdev.py +++ b/nova/virt/powervm/blockdev.py @@ -159,9 +159,9 @@ class PowerVMLocalVolumeAdapter(PowerVMDiskAdapter): if not os.path.isfile(file_path): LOG.debug(_("Fetching image '%s' from glance") % image_id) - images.fetch_to_raw(context, image_id, file_path, - instance['user_id'], - project_id=instance['project_id']) + images.fetch(context, image_id, file_path, + instance['user_id'], + instance['project_id']) else: LOG.debug((_("Using image found at '%s'") % file_path)) |