'Returns all LVM disks for given instance object.'

def _lvm_disks(self, instance):

    if CONF.libvirt.images_volume_group:
        vg = os.path.join('/dev', CONF.libvirt.images_volume_group)
        if (not os.path.exists(vg)):
            return []
        pattern = ('%s_' % instance.uuid)
        def belongs_to_instance(disk):
            return disk.startswith(pattern)
        def fullpath(name):
            return os.path.join(vg, name)
        logical_volumes = lvm.list_volumes(vg)
        disks = [fullpath(disk) for disk in logical_volumes if belongs_to_instance(disk)]
        return disks
    return []
