コード例 #1
0
 def commit(self):
    """ Method that waits for synchronized commits on underlying devices
    """
    try:
       from comoonics.tools import stabilized
       stabilized.stabilized(file=self.stabilizedfile, type=self.stabilizedtype, good=self.stabilizedgood)
    except ImportError:
       warnings.warn("Could not import a stabilization functionality to synchronized changed disk devices with depending kernel. You might think of installing comoonics-storage-py.")
コード例 #2
0
 def commit(self):
     """ Method that waits for synchronized commits on underlying devices
     """
     try:
         from comoonics.tools import stabilized
         stabilized.stabilized(file=self.stabilizedfile, type=self.stabilizedtype, good=self.stabilizedgood)
     except ImportError:
         warnings.warn("Could not import a stabilization functionality to synchronized changed disk devices with depending kernel. You might think of installing comoonics-storage-py.")
コード例 #3
0
 def _do(self):
    """
    If need be does something
    """
    from comoonics.scsi import ComSCSI
    if self.name == "rescan":
       ComSCSI.rescan(self.dest)
    elif self.name == "rescan_qla":
       ComSCSI.rescan_qla(self.dest)
    else:
       raise SCSIRequirementException("Unsupported SCSI Rescan name %s", self.name)
    ComSystem.execLocalOutput("udevsettle")
    stabilized.stabilized(file="/proc/partitions", iterations=10, type="hash")
コード例 #4
0
 def __test__(self, _type, _files, _results):
     for i in range(len(_files)):
         _file = _files[i]
         _res = _results[i]
         print "Testing stabilized.stabilized<%s> on file: %s" % (_type,
                                                                  _file)
         self.assertEqual(
             stabilized.stabilized(type=_type,
                                   file=_file,
                                   interval=120.0,
                                   iterations=11), _res)
コード例 #5
0
 def __test__(self, _type, _files, _results):
     for i in range(len(_files)):
         _file=_files[i]
         _res=_results[i]
         print "Testing stabilized.stabilized<%s> on file: %s" %(_type, _file)
         self.assertEqual(stabilized.stabilized(type=_type, file=_file, interval=120.0, iterations=11), _res)