private Set<URI> filterExportMasksByVPlexRequirements(StorageSystem vplex,StorageSystem array,URI varrayURI,ExportMaskPlacementDescriptor placementDescriptor){
  Map<URI,ExportMask> maskSet=placementDescriptor.getMasks();
  Map<URI,Volume> volumeMap=placementDescriptor.getVolumesToPlace();
  Set<URI> invalidMasks=new HashSet<>();
  boolean externallyCreatedMasks=false;
  boolean viprCreatedMasks=false;
  for (  URI exportMaskURI : placementDescriptor.getPlacedMasks()) {
    ExportMask mask=maskSet.get(exportMaskURI);
    _log.info(String.format("Validating ExportMask %s (%s) %s",mask.getMaskName(),mask.getId(),(mask.getCreatedBySystem() ? "ViPR created" : "Externally created")));
    if (VPlexBackEndOrchestratorUtil.validateExportMask(varrayURI,_initiatorPortMap,mask,invalidMasks,_directorToInitiatorIds,_idToInitiatorMap,_dbClient,_coordinator,_portWwnToClusterMap)) {
      if (mask.getCreatedBySystem()) {
        viprCreatedMasks=true;
      }
 else {
        externallyCreatedMasks=true;
      }
    }
  }
  for (  URI invalidMask : invalidMasks) {
    placementDescriptor.invalidateExportMask(invalidMask);
  }
  if (!externallyCreatedMasks || viprCreatedMasks) {
    Map<ExportMask,ExportGroup> uninitializedMasks=searchDbForExportMasks(array,_initiators,false);
    for (    ExportMask mask : uninitializedMasks.keySet()) {
      if (!placementDescriptor.hasUnPlacedVolumes()) {
        break;
      }
      validateMaskAndPlaceVolumes(array,varrayURI,maskSet,invalidMasks,mask,placementDescriptor,volumeMap,String.format("Validating uninitialized ViPR ExportMask %s (%s)",mask.getMaskName(),mask.getId()));
    }
  }
  if (!invalidMasks.isEmpty()) {
    _log.info("Following masks were considered invalid: {}",CommonTransformerFunctions.collectionToString(invalidMasks));
  }
  return invalidMasks;
}

private Set < URI > filterExportMasksByVPlexRequirements ( StorageSystem vplex , StorageSystem array , URI varrayURI , ExportMaskPlacementDescriptor placementDescriptor ) { Map < URI , ExportMask > maskSet = placementDescriptor . getMasks ( ) ; Map < URI , Volume > volumeMap = placementDescriptor . getVolumesToPlace ( ) ; Set < URI > invalidMasks = new HashSet < > ( ) ; boolean externallyCreatedMasks = false ; boolean viprCreatedMasks = false ; for ( URI exportMaskURI : placementDescriptor . getPlacedMasks ( ) ) { ExportMask mask = maskSet . get ( exportMaskURI ) ; _log . info ( String . format ( "Validating ExportMask %s (%s) %s" , mask . getMaskName ( ) , mask . getId ( ) , ( mask . getCreatedBySystem ( ) ? "ViPR created" : "Externally created" ) ) ) ; if ( VPlexBackEndOrchestratorUtil . validateExportMask ( varrayURI , _initiatorPortMap , mask , invalidMasks , _directorToInitiatorIds , _idToInitiatorMap , _dbClient , _coordinator , _portWwnToClusterMap ) ) { if ( mask . getCreatedBySystem ( ) ) { viprCreatedMasks = true ; } else { externallyCreatedMasks = true ; } } } for ( URI invalidMask : invalidMasks ) { placementDescriptor . invalidateExportMask ( invalidMask ) ; } if ( ! externallyCreatedMasks || viprCreatedMasks ) { Map < ExportMask , ExportGroup > uninitializedMasks = searchDbForExportMasks ( array , _initiators , false ) ; for ( ExportMask mask : uninitializedMasks . keySet ( ) ) { if ( ! placementDescriptor . hasUnPlacedVolumes ( ) ) { break ; } validateMaskAndPlaceVolumes ( array , varrayURI , maskSet , invalidMasks , mask , placementDescriptor , volumeMap , String . format ( "Validating uninitialized ViPR ExportMask %s (%s)" , mask . getMaskName ( ) , mask . getId ( ) ) ) ; } } if ( ! invalidMasks . isEmpty ( ) ) { _log . info ( "Following masks were considered invalid: {}" , CommonTransformerFunctions . collectionToString ( invalidMasks ) ) ; } return invalidMasks ; }
routine will examine the placement descriptor to filter out any of the suggested exportmasks that do not meet the vplex requirements .
