Change in vdsm[master]: virt-sparsify: rename sparsify method to more descriptive
shavivi at redhat.com
shavivi at redhat.com
Tue Feb 23 12:09:59 UTC 2016
Shahar Havivi has uploaded a new change for review.
Change subject: virt-sparsify: rename sparsify method to more descriptive
......................................................................
virt-sparsify: rename sparsify method to more descriptive
Change-Id: Ibcef55a584b387e3c29e584027e05d41a06bb8af
Signed-off-by: Shahar Havivi <shaharh at redhat.com>
---
M lib/vdsm/virtsparsify.py
M tests/sparsifyTests.py
M vdsm/storage/image.py
3 files changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/53899/1
diff --git a/lib/vdsm/virtsparsify.py b/lib/vdsm/virtsparsify.py
index 44ed778..c4a63e5 100644
--- a/lib/vdsm/virtsparsify.py
+++ b/lib/vdsm/virtsparsify.py
@@ -30,7 +30,7 @@
"/usr/bin/virt-sparsify",)
-def sparsify(src_vol, tmp_vol, dst_vol, src_format=None, dst_format=None):
+def to_new_image(src_vol, tmp_vol, dst_vol, src_format=None, dst_format=None):
"""
Sparsify the 'src_vol' volume (src_format) to 'dst_vol' volume (dst_format)
using libguestfs virt-sparsify
diff --git a/tests/sparsifyTests.py b/tests/sparsifyTests.py
index f99b0c8..b8d58c4 100644
--- a/tests/sparsifyTests.py
+++ b/tests/sparsifyTests.py
@@ -35,7 +35,7 @@
class VirtSparsifyTests(TestCaseBase):
- @MonkeyPatch(virtsparsify, '_VIRTSPARSIFY', FakeCommand())
+ @MonkeyPatch(virtsparsify.to_new_image, '_VIRTSPARSIFY', FakeCommand())
def test_raise_error_on_failure(self):
self.assertRaises(cmdutils.Error,
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index a5c088d..4f74b0b 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -633,11 +633,11 @@
srcFormat = volume.fmt2str(srcVolume.getFormat())
dstFormat = volume.fmt2str(dstVolume.getFormat())
- virtsparsify.sparsify(srcVolume.getVolumePath(),
- tmpVolume.getVolumePath(),
- dstVolume.getVolumePath(),
- src_format=srcFormat,
- dst_format=dstFormat)
+ virtsparsify.to_new_image(srcVolume.getVolumePath(),
+ tmpVolume.getVolumePath(),
+ dstVolume.getVolumePath(),
+ src_format=srcFormat,
+ dst_format=dstFormat)
except Exception:
self.log.exception('Unexpected error sparsifying %s',
tmpVolUUID)
--
To view, visit https://gerrit.ovirt.org/53899
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcef55a584b387e3c29e584027e05d41a06bb8af
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Shahar Havivi <shavivi at redhat.com>
More information about the vdsm-patches
mailing list