Merge "Windows SMBFS: fix VHD/x resize"
This commit is contained in:
commit
4162d35286
@ -221,7 +221,8 @@ class WindowsSmbFsTestCase(test.TestCase):
|
||||
mock.sentinel.block_size)
|
||||
drv._vhdutils.resize_vhd.assert_called_once_with(
|
||||
self._FAKE_VOLUME_PATH,
|
||||
self._FAKE_VOLUME['size'] * units.Gi)
|
||||
self._FAKE_VOLUME['size'] * units.Gi,
|
||||
is_file_max_size=False)
|
||||
|
||||
def test_copy_volume_from_snapshot(self):
|
||||
drv = self._smbfs_driver
|
||||
@ -251,7 +252,8 @@ class WindowsSmbFsTestCase(test.TestCase):
|
||||
mock.sentinel.new_volume_path)
|
||||
drv._vhdutils.resize_vhd.assert_called_once_with(
|
||||
mock.sentinel.new_volume_path,
|
||||
self._FAKE_VOLUME['size'] * units.Gi)
|
||||
self._FAKE_VOLUME['size'] * units.Gi,
|
||||
is_file_max_size=False)
|
||||
|
||||
def test_rebase_img(self):
|
||||
drv = self._smbfs_driver
|
||||
|
@ -152,7 +152,8 @@ class WindowsSmbfsDriver(smbfs.SmbfsDriver):
|
||||
backing_file_full_path)
|
||||
|
||||
def _do_extend_volume(self, volume_path, size_gb, volume_name=None):
|
||||
self._vhdutils.resize_vhd(volume_path, size_gb * units.Gi)
|
||||
self._vhdutils.resize_vhd(volume_path, size_gb * units.Gi,
|
||||
is_file_max_size=False)
|
||||
|
||||
@remotefs_drv.locked_volume_id_operation
|
||||
def copy_volume_to_image(self, context, volume, image_service, image_meta):
|
||||
@ -203,7 +204,8 @@ class WindowsSmbfsDriver(smbfs.SmbfsDriver):
|
||||
self.configuration.volume_dd_blocksize)
|
||||
|
||||
self._vhdutils.resize_vhd(self.local_path(volume),
|
||||
volume['size'] * units.Gi)
|
||||
volume['size'] * units.Gi,
|
||||
is_file_max_size=False)
|
||||
|
||||
def _copy_volume_from_snapshot(self, snapshot, volume, volume_size):
|
||||
"""Copy data from snapshot to destination volume."""
|
||||
@ -230,4 +232,5 @@ class WindowsSmbfsDriver(smbfs.SmbfsDriver):
|
||||
self._delete(volume_path)
|
||||
self._vhdutils.convert_vhd(snapshot_path,
|
||||
volume_path)
|
||||
self._vhdutils.resize_vhd(volume_path, volume_size * units.Gi)
|
||||
self._vhdutils.resize_vhd(volume_path, volume_size * units.Gi,
|
||||
is_file_max_size=False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user