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
This commit is contained in:
@@ -151,11 +151,11 @@ class PowerVMDriverTestCase(test.TestCase):
|
|||||||
self.assertTrue(self.powervm_connection.instance_exists(name))
|
self.assertTrue(self.powervm_connection.instance_exists(name))
|
||||||
|
|
||||||
def test_spawn(self):
|
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):
|
user_id, project_id):
|
||||||
pass
|
pass
|
||||||
self.flags(powervm_img_local_path='/images/')
|
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 = {}
|
||||||
image_meta['id'] = '666'
|
image_meta['id'] = '666'
|
||||||
fake_net_info = network_model.NetworkInfo([
|
fake_net_info = network_model.NetworkInfo([
|
||||||
@@ -173,7 +173,7 @@ class PowerVMDriverTestCase(test.TestCase):
|
|||||||
raise ex
|
raise ex
|
||||||
|
|
||||||
self.flags(powervm_img_local_path='/images/')
|
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.stubs.Set(
|
||||||
self.powervm_connection._powervm._disk_adapter,
|
self.powervm_connection._powervm._disk_adapter,
|
||||||
'create_volume_from_image',
|
'create_volume_from_image',
|
||||||
|
|||||||
Reference in New Issue
Block a user