Example #1
0
 def refresh(self):
     """Refresh this LogicalVolume to match the underlying volume"""
     for lv in lvs():
         if lv['lv_uuid'] == self.lv_uuid:
             self.__dict__.update(lv)
             return
     else:
         raise LVMError("No system logical volume found with uuid %s" % self.lv_uuid)
Example #2
0
 def refresh(self):
     """Refresh this LogicalVolume to match the underlying volume"""
     for lv in lvs():
         if lv['lv_uuid'] == self.lv_uuid:
             self.__dict__.update(lv)
             return
     else:
         raise LVMError("No system logical volume found with uuid %s" % self.lv_uuid)
Example #3
0
 def find_one(cls, name):
     """Find the first logical volume matching name"""
     for lvinfo in lvs(name):
         return LogicalVolume(**lvinfo)
Example #4
0
 def find_all(cls, name):
     """Find all logical volumes matching name"""
     result = []
     for lvinfo in lvs(name):
         result.append(LogicalVolume(**lvinfo))
     return result
Example #5
0
 def find_one(cls, name):
     """Find the first logical volume matching name"""
     for lvinfo in lvs(name):
         return LogicalVolume(**lvinfo)
Example #6
0
 def find_all(cls, name):
     """Find all logical volumes matching name"""
     result = []
     for lvinfo in lvs(name):
         result.append(LogicalVolume(**lvinfo))
     return result