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.")
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")
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)
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)