Change in vdsm[master]: Reimplement hsm.getVolumesList().
ewarszaw at redhat.com
ewarszaw at redhat.com
Sun Jun 16 11:54:52 UTC 2013
Eduardo has uploaded a new change for review.
Change subject: Reimplement hsm.getVolumesList().
......................................................................
Reimplement hsm.getVolumesList().
It is not pool dependant anymore.
Related to BZ#960952.
Change-Id: Ib810ca24818fa4a77905032694a05c0d86ef75e2
Signed-off-by: Eduardo <ewarszaw at redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 5 insertions(+), 11 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/66/15766/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 7b9ed70..33338a0 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -3205,7 +3205,7 @@
:param spUUID: The UUID of the storage pool that manages the storage
domain you want to query.
- :type spUUID: UUID
+ :type spUUID: Use BLANK_UUID or anything if not connected to SP.
:param sdUUID: The UUID of the storage domain you want to query.
:type sdUUID: UUID
:param imgUUID: The UUID of the an image you want to filter the
@@ -3215,18 +3215,12 @@
"""
vars.task.getSharedLock(STORAGE, sdUUID)
dom = sdCache.produce(sdUUID=sdUUID)
+ vols = dom.getAllVolumes()
if imgUUID == volume.BLANK_UUID:
- images = dom.getAllImages()
+ volUUIDs = vols.keys()
else:
- images = [imgUUID]
-
- uuidlist = []
- repoPath = os.path.join(self.storage_repository, spUUID)
- for img in images:
- uuidlist += (dom.getVolumeClass().
- getImageVolumes(repoPath, sdUUID, img))
- self.log.info("List of volumes is %s", uuidlist)
- return dict(uuidlist=uuidlist)
+ volUUIDs = [k for k, v in vols.itervalues() if imgUUID in v.images]
+ return dict(uuidlist=volUUIDs)
@public
def getImagesList(self, sdUUID, options=None):
--
To view, visit http://gerrit.ovirt.org/15766
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib810ca24818fa4a77905032694a05c0d86ef75e2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw at redhat.com>
More information about the vdsm-patches
mailing list