Federico Simoncelli has uploaded a new change for review. Change subject: domain: unify the createVolume method ......................................................................
domain: unify the createVolume method Change-Id: I03eeaa2561fd13b4094634f5cfeee644d6396a18 Signed-off-by: Federico Simoncelli <[email protected]> --- M vdsm/storage/blockSD.py M vdsm/storage/fileSD.py M vdsm/storage/sd.py 3 files changed, 4 insertions(+), 22 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/29/13329/1 diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py index 9809bf4..8add58c 100644 --- a/vdsm/storage/blockSD.py +++ b/vdsm/storage/blockSD.py @@ -629,16 +629,6 @@ blockVolume.BlockVolume.validateCreateVolumeParams( volFormat, preallocate, srcVolUUID) - def createVolume(self, imgUUID, size, volFormat, preallocate, diskType, - volUUID, desc, srcImgUUID, srcVolUUID): - """ - Create a new volume - """ - repoPath = self._getRepoPath() - return blockVolume.BlockVolume.create( - repoPath, self.sdUUID, imgUUID, size, volFormat, preallocate, - diskType, volUUID, desc, srcImgUUID, srcVolUUID) - @classmethod def getMetaDataMapping(cls, vgName, oldMapping={}): firstDev, firstExtent = lvm.getFirstExt(vgName, sd.METADATA) diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py index be2a793..27991f9 100644 --- a/vdsm/storage/fileSD.py +++ b/vdsm/storage/fileSD.py @@ -287,17 +287,6 @@ fileVolume.FileVolume.validateCreateVolumeParams( volFormat, preallocate, srcVolUUID) - def createVolume(self, imgUUID, size, volFormat, preallocate, - diskType, volUUID, desc, srcImgUUID, srcVolUUID): - """ - Create a new volume - """ - repoPath = self._getRepoPath() - return fileVolume.FileVolume.create( - repoPath, self.sdUUID, - imgUUID, size, volFormat, preallocate, diskType, - volUUID, desc, srcImgUUID, srcVolUUID) - def getVolumeLease(self, imgUUID, volUUID): """ Return the volume lease (leasePath, leaseOffset) diff --git a/vdsm/storage/sd.py b/vdsm/storage/sd.py index 48ee7d5..249f076 100644 --- a/vdsm/storage/sd.py +++ b/vdsm/storage/sd.py @@ -397,7 +397,10 @@ """ Create a new volume """ - pass + volClass = getVolumeClass() + return volClass.create(self._getRepoPath(), self.sdUUID, imgUUID, + size, volFormat, preallocate, diskType, volUUID, desc, srcImgUUID, + srcVolUUID) def getMDPath(self): if self.domaindir: -- To view, visit http://gerrit.ovirt.org/13329 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I03eeaa2561fd13b4094634f5cfeee644d6396a18 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Federico Simoncelli <[email protected]> _______________________________________________ vdsm-patches mailing list [email protected] https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
