protected void suggestExportMasksForPlacement(StorageSystem storage,BlockStorageDevice device,List<Initiator> initiators,ExportMaskPlacementDescriptor descriptor){
  descriptor.setPlacementHint(ExportMaskPlacementDescriptor.PlacementHint.VOLUMES_TO_SINGLE_MASK);
  Map<URI,ExportMask> matchingMasks=readExistingExportMasks(storage,device,initiators);
  descriptor.setMasks(matchingMasks);
  for (  URI exportMaskURI : matchingMasks.keySet()) {
    descriptor.placeVolumes(exportMaskURI,descriptor.getVolumesToPlace());
  }
}

protected void suggestExportMasksForPlacement ( StorageSystem storage , BlockStorageDevice device , List < Initiator > initiators , ExportMaskPlacementDescriptor descriptor ) { descriptor . setPlacementHint ( ExportMaskPlacementDescriptor . PlacementHint . VOLUMES_TO_SINGLE_MASK ) ; Map < URI , ExportMask > matchingMasks = readExistingExportMasks ( storage , device , initiators ) ; descriptor . setMasks ( matchingMasks ) ; for ( URI exportMaskURI : matchingMasks . keySet ( ) ) { descriptor . placeVolumes ( exportMaskURI , descriptor . getVolumesToPlace ( ) ) ; } }
searches the storage device for any exportmask ( e . g . , maskingview ) that contains any of the initiators . for any exportmasks that it finds , it will map the set of volumes that are appropriate for the exportmask . placement of the volume to an exportmask will be array dependent . it is up to the client to determine if one or more of the exportmasks are preferable for the actual volume placement . the default implementation will map all the volumes into each matched exportmask , but give a placementhint that only a single exportmask should take all the volumes . this puts the onus on the caller of suggestexportmasksforplacement to look at the hint to determine if one or more exportmasks are appropriate for the volumes .
