From 98939fcc35faa0caf2ea3866f03122e85ba1fa68 Mon Sep 17 00:00:00 2001 From: Vipin Balachandran Date: Tue, 28 Jun 2016 16:11:03 +0530 Subject: [PATCH] VMware: Fix create vol from streamOptimized image Change I247bf2a072e195c3918f222a9770f8018690db16 renamed a keyword argument in get_create_spec. The _fetch_stream_optimized_image method which creates a volume from streamOptimized image uses this method, but it was not updated to use the new keyword argument. The VMware CI couldn't catch this because we use preallocated image for tempest tests. This patch updates the keyword argument to fix the issue. Change-Id: I20cbc8f137fe31302770cc0b2f5dde1f23339191 Closes-bug: #1596907 --- cinder/tests/unit/test_vmware_vmdk.py | 2 +- cinder/volume/drivers/vmware/vmdk.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/tests/unit/test_vmware_vmdk.py b/cinder/tests/unit/test_vmware_vmdk.py index 7f0c3013671..472a2e3caf4 100644 --- a/cinder/tests/unit/test_vmware_vmdk.py +++ b/cinder/tests/unit/test_vmware_vmdk.py @@ -787,7 +787,7 @@ class VMwareVcVmdkDriverTestCase(test.TestCase): select_ds_for_volume.assert_called_once_with(volume) vops.get_create_spec.assert_called_once_with( - volume['name'], 0, disk_type, summary.name, profileId=profile_id, + volume['name'], 0, disk_type, summary.name, profile_id=profile_id, adapter_type=adapter_type, extra_config=extra_config) self.assertEqual(vm_create_spec, import_spec.configSpec) download_image.assert_called_with( diff --git a/cinder/volume/drivers/vmware/vmdk.py b/cinder/volume/drivers/vmware/vmdk.py index 7c3aa76633e..1496b291820 100644 --- a/cinder/volume/drivers/vmware/vmdk.py +++ b/cinder/volume/drivers/vmware/vmdk.py @@ -1020,7 +1020,7 @@ class VMwareVcVmdkDriver(driver.VolumeDriver): dummy_disk_size, disk_type, summary.name, - profileId=profile_id, + profile_id=profile_id, adapter_type=adapter_type, extra_config=extra_config) # convert vm_create_spec to vm_import_spec