Merge "Windows iSCSI: properly handle config option"

This commit is contained in:
Jenkins 2016-05-23 05:02:23 +00:00 committed by Gerrit Code Review
commit 2d7d81df5d
2 changed files with 2 additions and 2 deletions

View File

@ -322,7 +322,7 @@ class TestWindowsDriver(test.TestCase):
fake_image_meta = db_fakes.get_fake_image_meta()
fake_volume = db_fakes.get_fake_volume_info()
fake_img_conv_dir = 'fake_img_conv_dir'
self._driver.configuration.image_conversion_dir = fake_img_conv_dir
self.flags(image_conversion_dir=fake_img_conv_dir)
tgt_utils.get_supported_disk_format.return_value = disk_format
mock_tmp_snap.return_value.__enter__.return_value = (

View File

@ -246,7 +246,7 @@ class WindowsDriver(driver.ISCSIDriver):
def copy_volume_to_image(self, context, volume, image_service, image_meta):
"""Copy the volume to the specified image."""
disk_format = self._tgt_utils.get_supported_disk_format()
temp_vhd_path = os.path.join(self.configuration.image_conversion_dir,
temp_vhd_path = os.path.join(CONF.image_conversion_dir,
str(image_meta['id']) + '.' + disk_format)
try: