private boolean applyVolumesToMasksUsingRules(StorageSystem storage,ExportGroup exportGroup,Map<URI,Map<URI,Integer>> existingMasksToUpdateWithNewVolumes,Map<URI,Map<URI,Integer>> volumesWithNoMask,Map<ExportMask,ExportMaskPolicy> masksMap,Map<URI,Set<Initiator>> maskToInitiatorsMap,Set<URI> partialMasks,String token){
  boolean isVMAX3=storage.checkIfVmax3();
  if (exportGroup.checkInternalFlags(Flag.RECOVERPOINT) || (exportGroup.checkInternalFlags(Flag.RECOVERPOINT_JOURNAL))) {
    masksMap=applyVolumesToMasksUsingRPVMAXRules(storage,exportGroup,masksMap);
    if (masksMap.isEmpty()) {
      _log.info("No masks were found for RP that aligned with the masks of the compute resource, proceeding to create new masks");
      return true;
    }
  }
  if (!applyVolumesToMasksUsingRule(exportGroup,token,existingMasksToUpdateWithNewVolumes,volumesWithNoMask,masksMap,maskToInitiatorsMap,partialMasks,1,isVMAX3)) {
    return false;
  }
  if (!applyVolumesToMasksUsingRule(exportGroup,token,existingMasksToUpdateWithNewVolumes,volumesWithNoMask,masksMap,maskToInitiatorsMap,partialMasks,2,isVMAX3)) {
    return false;
  }
  if (!applyVolumesToMasksUsingRule(exportGroup,token,existingMasksToUpdateWithNewVolumes,volumesWithNoMask,masksMap,maskToInitiatorsMap,partialMasks,3,isVMAX3)) {
    return false;
  }
  return true;
}

private boolean applyVolumesToMasksUsingRules ( StorageSystem storage , ExportGroup exportGroup , Map < URI , Map < URI , Integer > > existingMasksToUpdateWithNewVolumes , Map < URI , Map < URI , Integer > > volumesWithNoMask , Map < ExportMask , ExportMaskPolicy > masksMap , Map < URI , Set < Initiator > > maskToInitiatorsMap , Set < URI > partialMasks , String token ) { boolean isVMAX3 = storage . checkIfVmax3 ( ) ; if ( exportGroup . checkInternalFlags ( Flag . RECOVERPOINT ) || ( exportGroup . checkInternalFlags ( Flag . RECOVERPOINT_JOURNAL ) ) ) { masksMap = applyVolumesToMasksUsingRPVMAXRules ( storage , exportGroup , masksMap ) ; if ( masksMap . isEmpty ( ) ) { _log . info ( "No masks were found for RP that aligned with the masks of the compute resource, proceeding to create new masks" ) ; return true ; } } if ( ! applyVolumesToMasksUsingRule ( exportGroup , token , existingMasksToUpdateWithNewVolumes , volumesWithNoMask , masksMap , maskToInitiatorsMap , partialMasks , 1 , isVMAX3 ) ) { return false ; } if ( ! applyVolumesToMasksUsingRule ( exportGroup , token , existingMasksToUpdateWithNewVolumes , volumesWithNoMask , masksMap , maskToInitiatorsMap , partialMasks , 2 , isVMAX3 ) ) { return false ; } if ( ! applyVolumesToMasksUsingRule ( exportGroup , token , existingMasksToUpdateWithNewVolumes , volumesWithNoMask , masksMap , maskToInitiatorsMap , partialMasks , 3 , isVMAX3 ) ) { return false ; } return true ; }
this method will call the method to apply a set of business rules to the volumes required to be added to masking views . see the " applyvolumestomasksusingrule " method documentation for exact rule logic .
