private List<VPlexInitiatorInfo> findInitiators(VPlexClusterInfo clusterInfo,List<PortInfo> initiatorPortInfo) throws VPlexApiException {
  List<PortInfo> unfoundInitiatorList=new ArrayList<PortInfo>();
  unfoundInitiatorList.addAll(initiatorPortInfo);
  String clusterName=clusterInfo.getName();
  List<VPlexInitiatorInfo> initiatorInfoList=findInitiatorsOnCluster(clusterName,initiatorPortInfo,unfoundInitiatorList);
  if (initiatorInfoList.size() == initiatorPortInfo.size()) {
    return initiatorInfoList;
  }
  VPlexApiDiscoveryManager discoveryMgr=_vplexApiClient.getDiscoveryManager();
  discoveryMgr.discoverInitiatorsOnCluster(clusterInfo);
  initiatorInfoList.addAll(findInitiatorsOnCluster(clusterName,unfoundInitiatorList,null));
  return initiatorInfoList;
}

private List < VPlexInitiatorInfo > findInitiators ( VPlexClusterInfo clusterInfo , List < PortInfo > initiatorPortInfo ) throws VPlexApiException { List < PortInfo > unfoundInitiatorList = new ArrayList < PortInfo > ( ) ; unfoundInitiatorList . addAll ( initiatorPortInfo ) ; String clusterName = clusterInfo . getName ( ) ; List < VPlexInitiatorInfo > initiatorInfoList = findInitiatorsOnCluster ( clusterName , initiatorPortInfo , unfoundInitiatorList ) ; if ( initiatorInfoList . size ( ) == initiatorPortInfo . size ( ) ) { return initiatorInfoList ; } VPlexApiDiscoveryManager discoveryMgr = _vplexApiClient . getDiscoveryManager ( ) ; discoveryMgr . discoverInitiatorsOnCluster ( clusterInfo ) ; initiatorInfoList . addAll ( findInitiatorsOnCluster ( clusterName , unfoundInitiatorList , null ) ) ; return initiatorInfoList ; }
finds the initiator ports on the vplex corresponding to the ports specified in the passed port information . note that the functions presumes that all initiators to be found are on the same vplex cluster . this function will execute an initiator discovery if some of the initiators are not found . after the discovery it will then try to find the initiators that could not be found initially .
