def resolve(self, value):
     if len(value.split(":"))==2:
         (wwwn, lun)=value.split(":")
         return ComSCSI.getBlockDeviceForWWWNLun(wwwn, lun)
     else:
         (wwwn, lun, other)=value.split(":")
         return "%s%s" %(ComSCSI.getBlockDeviceForWWWNLun(wwwn, lun), other)
 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)
 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 resolve(self, value):
     return ComSCSI.getBlockDeviceForUID(value)
 def testSCSIHosts(self):
     ComSCSI.getSCSIHosts()
 def testFCRescan(self):
     for host in ComSCSI.getFCHosts():
         ComSCSI.rescan(host)
 def testFCHosts(self):
     ComSCSI.getFCHosts()