Exemple #1
0
 def getImageVolumes(cls, repoPath, sdUUID, imgUUID):
     """
     Fetch the list of the Volumes UUIDs, not including the shared base
     (template)
     """
     lvs = lvm.lvsByTag(sdUUID, "%s%s" % (TAG_PREFIX_IMAGE, imgUUID))
     return [lv.name for lv in lvs]
Exemple #2
0
 def getImageVolumes(cls, repoPath, sdUUID, imgUUID):
     """
     Fetch the list of the Volumes UUIDs, not including the shared base
     (template)
     """
     lvs = lvm.lvsByTag(sdUUID, "%s%s" % (sc.TAG_PREFIX_IMAGE, imgUUID))
     return [lv.name for lv in lvs]
Exemple #3
0
    def getChildren(self):
        """ Return children volume UUIDs.

        Children can be found in any image of the volume SD.
        """
        lvs = lvm.lvsByTag(self.sdUUID,
                           "%s%s" % (TAG_PREFIX_PARENT, self.volUUID))
        return tuple(lv.name for lv in lvs)
Exemple #4
0
    def getChildren(self):
        """ Return children volume UUIDs.

        Children can be found in any image of the volume SD.
        """
        lvs = lvm.lvsByTag(self.sdUUID,
                           "%s%s" % (sc.TAG_PREFIX_PARENT, self.volUUID))
        return tuple(lv.name for lv in lvs)
Exemple #5
0
    def getAllChildrenList(cls, repoPath, sdUUID, imgUUID, pvolUUID):
        """
        Fetch the list of children volumes (across the all images in domain)
        """
        chList = []

        volumes = lvm.lvsByTag(sdUUID, "%s%s" % (TAG_PREFIX_PARENT, pvolUUID))
        for vol in volumes:
            for tag in vol.tags:
                if tag.startswith(TAG_PREFIX_IMAGE):
                    chList.append({'imgUUID':tag[3:], 'volUUID':vol.name})

        return chList
Exemple #6
0
    def getAllChildrenList(cls, repoPath, sdUUID, imgUUID, pvolUUID):
        """
        Fetch the list of children volumes (across the all images in domain)
        """
        chList = []

        volumes = lvm.lvsByTag(sdUUID, "%s%s" % (TAG_PREFIX_PARENT, pvolUUID))
        for vol in volumes:
            for tag in vol.tags:
                if tag.startswith(TAG_PREFIX_IMAGE):
                    chList.append({'imgUUID': tag[3:], 'volUUID': vol.name})

        return chList