public HostScsiDisk findScsiDisk(HostSystem host,ClusterComputeResource cluster,BlockObjectRestRep volume){
  if (StringUtils.isBlank(volume.getWwn())) {
    String volumeId=ResourceUtils.stringId(volume);
    String volumeName=ResourceUtils.name(volume);
    ExecutionUtils.fail("failTask.VMwareSupport.findLun",new Object[]{volumeId},new Object[]{volumeName});
  }
  HostScsiDisk disk=execute(new FindHostScsiDiskForLun(host,volume));
  if (cluster != null) {
    HostSystem[] hosts=cluster.getHosts();
    if (hosts == null) {
      throw new IllegalStateException("Cluster '" + cluster.getName() + "' contains no hosts");
    }
    Map<HostSystem,HostScsiDisk> disks=Maps.newHashMap();
    disks.put(host,disk);
    for (    HostSystem otherHost : hosts) {
      if (StringUtils.equals(host.getName(),otherHost.getName())) {
        continue;
      }
      HostScsiDisk otherDisk=execute(new FindHostScsiDiskForLun(otherHost,volume));
      disks.put(otherHost,otherDisk);
    }
  }
  return disk;
}

public HostScsiDisk findScsiDisk ( HostSystem host , ClusterComputeResource cluster , BlockObjectRestRep volume ) { if ( StringUtils . isBlank ( volume . getWwn ( ) ) ) { String volumeId = ResourceUtils . stringId ( volume ) ; String volumeName = ResourceUtils . name ( volume ) ; ExecutionUtils . fail ( "failTask.VMwareSupport.findLun" , new Object [ ] { volumeId } , new Object [ ] { volumeName } ) ; } HostScsiDisk disk = execute ( new FindHostScsiDiskForLun ( host , volume ) ) ; if ( cluster != null ) { HostSystem [ ] hosts = cluster . getHosts ( ) ; if ( hosts == null ) { throw new IllegalStateException ( "Cluster '" + cluster . getName ( ) + "' contains no hosts" ) ; } Map < HostSystem , HostScsiDisk > disks = Maps . newHashMap ( ) ; disks . put ( host , disk ) ; for ( HostSystem otherHost : hosts ) { if ( StringUtils . equals ( host . getName ( ) , otherHost . getName ( ) ) ) { continue ; } HostScsiDisk otherDisk = execute ( new FindHostScsiDiskForLun ( otherHost , volume ) ) ; disks . put ( otherHost , otherDisk ) ; } } return disk ; }
finds the scsi disk on the host system that matches the volume .
