Example #1
0
 def find_all(cls, name):
     """Find all volume groups matching the given name"""
     result = []
     for vginfo in vgs(name):
         logging.debug("Creating VolumeGroup from info %r", vginfo)
         result.append(VolumeGroup(**vginfo))
     return result
Example #2
0
 def find_all(cls, name):
     """Find all volume groups matching the given name"""
     result = []
     for vginfo in vgs(name):
         logging.debug("Creating VolumeGroup from info %r", vginfo)
         result.append(VolumeGroup(**vginfo))
     return result
Example #3
0
 def find_one(cls, name):
     """Find first LVM volume group matching the given name"""
     for vginfo in vgs(name):
         logging.debug("Creating VolumeGroup from info %r", vginfo)
         return VolumeGroup(**vginfo)
Example #4
0
 def find_one(cls, name):
     """Find first LVM volume group matching the given name"""
     for vginfo in vgs(name):
         logging.debug("Creating VolumeGroup from info %r", vginfo)
         return VolumeGroup(**vginfo)