public boolean isInitiatorInVarray(VirtualArray varray,String wwn) throws InternalException {
  List<Network> networks=CustomQueryUtility.queryActiveResourcesByRelation(_dbClient,varray.getId(),Network.class,"connectedVirtualArrays");
  for (  Network network : networks) {
    if (network == null || network.getInactive() == true) {
      continue;
    }
    StringMap endpointMap=network.getEndpointsMap();
    for (    String endpointKey : endpointMap.keySet()) {
      String endpointValue=endpointMap.get(endpointKey);
      if (wwn.equals(endpointValue) || wwn.equals(endpointKey)) {
        return true;
      }
    }
  }
  return false;
}

public boolean isInitiatorInVarray ( VirtualArray varray , String wwn ) throws InternalException { List < Network > networks = CustomQueryUtility . queryActiveResourcesByRelation ( _dbClient , varray . getId ( ) , Network . class , "connectedVirtualArrays" ) ; for ( Network network : networks ) { if ( network == null || network . getInactive ( ) == true ) { continue ; } StringMap endpointMap = network . getEndpointsMap ( ) ; for ( String endpointKey : endpointMap . keySet ( ) ) { String endpointValue = endpointMap . get ( endpointKey ) ; if ( wwn . equals ( endpointValue ) || wwn . equals ( endpointKey ) ) { return true ; } } } return false ; }
check if initiator being added to export - group is good .
