Change in vdsm[master]: storage: Rename _share to share_to_image

alitke at redhat.com alitke at redhat.com
Mon Jul 27 20:39:07 UTC 2015


Adam Litke has uploaded a new change for review.

Change subject: storage: Rename _share to share_to_image
......................................................................

storage: Rename _share to share_to_image

When a new volume is created whose parent is a template volume, that
template must be "shared" into the new volume's image since volume
chains only link volumes in the same image.  This logic is reusable by
the SDM create volume flow but _share should be renamed to
share_to_image to remove the _ which designates this as a protected
method.

Change-Id: I44c7fe43ada38aa97bbd9c08438a0ee686680330
Signed-off-by: Adam Litke <alitke at redhat.com>
---
M vdsm/storage/blockVolume.py
M vdsm/storage/fileVolume.py
M vdsm/storage/volume.py
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/46/44046/1

diff --git a/vdsm/storage/blockVolume.py b/vdsm/storage/blockVolume.py
index 47336b9..23e636e 100644
--- a/vdsm/storage/blockVolume.py
+++ b/vdsm/storage/blockVolume.py
@@ -314,7 +314,7 @@
     def refreshVolume(self):
         lvm.refreshLVs(self.sdUUID, (self.volUUID,))
 
-    def _share(self, dstImgPath):
+    def share_to_image(self, dstImgPath):
         """
         Share this volume to dstImgPath
         """
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index 15ca05b..c5b8667 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -300,7 +300,7 @@
             os.path.join(dstImgPath, self.volUUID))
         self.oop.utils.forceLink(self._getLeaseVolumePath(), dstLeasePath)
 
-    def _share(self, dstImgPath):
+    def share_to_image(self, dstImgPath):
         """
         Share this volume to dstImgPath, including the metadata and the lease
         """
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 0d61643..951efe0 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -598,7 +598,7 @@
         self.md.removeMetadata()
 
     def _share(self, dstImgPath):
-        return self.md._share(dstImgPath)
+        return self.md.share_to_image(dstImgPath)
 
     @classmethod
     def _getModuleAndClass(cls):


-- 
To view, visit https://gerrit.ovirt.org/44046
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44c7fe43ada38aa97bbd9c08438a0ee686680330
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>


More information about the vdsm-patches mailing list