コード例 #1
0
ファイル: objects.py プロジェクト: jschairb/holland
 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)
コード例 #2
0
ファイル: base.py プロジェクト: yodermk/holland
 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)
コード例 #3
0
ファイル: objects.py プロジェクト: jschairb/holland
 def find_one(cls, name):
     """Find the first logical volume matching name"""
     for lvinfo in lvs(name):
         return LogicalVolume(**lvinfo)
コード例 #4
0
ファイル: objects.py プロジェクト: jschairb/holland
 def find_all(cls, name):
     """Find all logical volumes matching name"""
     result = []
     for lvinfo in lvs(name):
         result.append(LogicalVolume(**lvinfo))
     return result
コード例 #5
0
 def find_one(cls, name):
     """Find the first logical volume matching name"""
     for lvinfo in lvs(name):
         return LogicalVolume(**lvinfo)
コード例 #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