private List<VPlexInitiatorInfo> findInitiatorsOnCluster(String clusterName,List<PortInfo> initiatorPortInfo,List<PortInfo> unfoundInitiatorPortInfo) throws VPlexApiException {
  List<VPlexInitiatorInfo> initiatorInfoList=new ArrayList<VPlexInitiatorInfo>();
  VPlexApiDiscoveryManager discoveryMgr=_vplexApiClient.getDiscoveryManager();
  List<VPlexInitiatorInfo> clusterInitiatorInfoList=discoveryMgr.getInitiatorInfoForCluster(clusterName);
  for (  PortInfo portInfo : initiatorPortInfo) {
    String portWWN=portInfo.getPortWWN();
    for (    VPlexInitiatorInfo clusterInitiatorInfo : clusterInitiatorInfoList) {
      if (portWWN.equals(clusterInitiatorInfo.getPortWwn())) {
        initiatorInfoList.add(clusterInitiatorInfo);
        if (unfoundInitiatorPortInfo != null) {
          unfoundInitiatorPortInfo.remove(portInfo);
        }
        String portName=portInfo.getName();
        if ((portName != null) && (portName.length() != 0)) {
          clusterInitiatorInfo.setRegistrationName(portName);
        }
 else {
          clusterInitiatorInfo.setRegistrationName(VPlexApiConstants.REGISTERED_INITIATOR_PREFIX + clusterInitiatorInfo.getPortWwnRaw());
        }
        Initiator_Type initiatorType=Initiator_Type.valueOfType(portInfo.getType());
        if (initiatorType == null) {
          s_logger.info("Initiator port type {} not found, using default",portInfo.getType());
          initiatorType=Initiator_Type.DEFAULT;
        }
        clusterInitiatorInfo.setInitiatorType(initiatorType);
        break;
      }
    }
  }
  return initiatorInfoList;
}

private List < VPlexInitiatorInfo > findInitiatorsOnCluster ( String clusterName , List < PortInfo > initiatorPortInfo , List < PortInfo > unfoundInitiatorPortInfo ) throws VPlexApiException { List < VPlexInitiatorInfo > initiatorInfoList = new ArrayList < VPlexInitiatorInfo > ( ) ; VPlexApiDiscoveryManager discoveryMgr = _vplexApiClient . getDiscoveryManager ( ) ; List < VPlexInitiatorInfo > clusterInitiatorInfoList = discoveryMgr . getInitiatorInfoForCluster ( clusterName ) ; for ( PortInfo portInfo : initiatorPortInfo ) { String portWWN = portInfo . getPortWWN ( ) ; for ( VPlexInitiatorInfo clusterInitiatorInfo : clusterInitiatorInfoList ) { if ( portWWN . equals ( clusterInitiatorInfo . getPortWwn ( ) ) ) { initiatorInfoList . add ( clusterInitiatorInfo ) ; if ( unfoundInitiatorPortInfo != null ) { unfoundInitiatorPortInfo . remove ( portInfo ) ; } String portName = portInfo . getName ( ) ; if ( ( portName != null ) && ( portName . length ( ) != 0 ) ) { clusterInitiatorInfo . setRegistrationName ( portName ) ; } else { clusterInitiatorInfo . setRegistrationName ( VPlexApiConstants . REGISTERED_INITIATOR_PREFIX + clusterInitiatorInfo . getPortWwnRaw ( ) ) ; } Initiator_Type initiatorType = Initiator_Type . valueOfType ( portInfo . getType ( ) ) ; if ( initiatorType == null ) { s_logger . info ( "Initiator port type {} not found, using default" , portInfo . getType ( ) ) ; initiatorType = Initiator_Type . DEFAULT ; } clusterInitiatorInfo . setInitiatorType ( initiatorType ) ; break ; } } } return initiatorInfoList ; }
tries to find initiators on the the passed cluster corresponding to the passed port information .
