Federico Simoncelli has posted comments on this change.

Change subject: image: do not delete the template on deleteImage
......................................................................


Patch Set 1: (1 inline comment)

....................................................
File vdsm/storage/sd.py
Line 154:     allVols: The getAllVols() return dict.
Line 155:     """
Line 156: 
Line 157:     return dict((volName, vol) for volName, vol in allVols.iteritems()
Line 158:                 if (vol.imgs[0] == imgUUID or
I will put this in the docstring but for now: getVolsOfImage returns the list 
of volumes of an image, withTemplate lets you specify if you want also the 
template volume on top of which the image is eventually based upon. E.g. given 
(bear with the notation):

 (vol1, [img1, img2]) <- (vol1, [img2]) <- (vol2, [img2])

 getVolsOfImage(allVols, "img2", withTemplate=True)

would return them all.

 getVolsOfImage(allVols, "img2", withTemplate=False)

would return only:

 (vol1, [img2]) <- (vol2, [img2])

and

 getVolsOfImage(allVols, "img1", withTemplate=True|False)

should return:

 (vol1, [img1, img2])

This can be added as a test too... but that would have been a rather optimistic 
expectation for an urgent friday night patch :-)
Line 159:                     (withTemplate and imgUUID in vol.imgs)))
Line 160: 
Line 161: 
Line 162: def supportsUnicode(version):


--
To view, visit http://gerrit.ovirt.org/12105
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I06c7e6402b901fab6277cd768ce82591e8c21e51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com>
Gerrit-Reviewer: Eduardo <ewars...@redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com>
Gerrit-Reviewer: Lee Yarwood <lyarw...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to