Eduardo has posted comments on this change.
Change subject: getAllVolumes returns partially deleted volumes too.
......................................................................
Patch Set 2: (2 inline comments)
....................................................
File vdsm/storage/blockSD.py
Line 170: for volName, vImg, parentVol in vols.itervalues():
Line 171: res[volName]['parent'] = parentVol
Line 172: if vImg not in res[volName]['imgs']:
Line 173: res[volName]['imgs'].insert(0, vImg)
Line 174: if parentVol != sd.BLANK_UUID:
Because partially deleted images is a property of the BlockStorageDomain object. I thought
thas is clearer this way.
I wanted to separate a the functionality of marked volumes and the possibility of getting
all the volumes in the SD.
Line 175: try:
Line 176: newImg = vImg not in res[parentVol]['imgs']
Line 177: except KeyError:
Line 178: log.warning("Orphan volume %s/%s: img: %s, parent
%s",
Line 1025: ip.imgs[0].startswith(sd.REMOVED_IMAGE_PREFIX)):
Line 1026: remnants[volName] = ip
Line 1027: else:
Line 1028: vols[volName] = ip
Line 1029: return vols, remnants
I wanted to separate a the functionality of marked volumes and the possibility of getting
all the volumes in the SD.
Line 1030:
Line 1031: def getAllVolumes(self):
Line 1032: vols, rems = self.getAllVolumesImages()
Line 1033: return vols
--
To view, visit
http://gerrit.ovirt.org/12546
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8514236a5d4793f66709e9daf546fb46047414f
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Daniel Paikov <paikov(a)gmail.com>
Gerrit-Reviewer: Eduardo <ewarszaw(a)redhat.com>
Gerrit-Reviewer: Gadi Ickowicz <gickowic(a)redhat.com>
Gerrit-Reviewer: Haim Ateya <hateya(a)redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server