@Override public Map<String,Set<URI>> findExportMasks(StorageSystem storage,List<String> initiatorNames,boolean mustHaveAllPorts) throws DeviceControllerException {
  _log.info("{} findExportMasks START...",storage.getLabel());
  Map<String,Set<URI>> result=new HashMap<String,Set<URI>>();
  List<Initiator> initiators=new ArrayList<Initiator>();
  for (  String name : initiatorNames) {
    initiators.add(ExportUtils.getInitiator(Initiator.toPortNetworkId(name),_dbClient));
  }
  if (_restAPIHelper.isClusteredHost(storage,initiators)) {
    _log.debug("Executing findExportMasks using REST on Storage {}",storage.getLabel());
    result=_restAPIHelper.findRESTExportMasks(storage,initiatorNames,mustHaveAllPorts);
  }
 else {
    _log.debug("Executing findExportMasks using SMIS on Storage {}",storage.getLabel());
    result=findSMISExportMasks(storage,initiatorNames,mustHaveAllPorts);
  }
  _log.info("{} findExportMasks END...",storage.getLabel());
  return result;
}

@ Override public Map < String , Set < URI > > findExportMasks ( StorageSystem storage , List < String > initiatorNames , boolean mustHaveAllPorts ) throws DeviceControllerException { _log . info ( "{} findExportMasks START..." , storage . getLabel ( ) ) ; Map < String , Set < URI > > result = new HashMap < String , Set < URI > > ( ) ; List < Initiator > initiators = new ArrayList < Initiator > ( ) ; for ( String name : initiatorNames ) { initiators . add ( ExportUtils . getInitiator ( Initiator . toPortNetworkId ( name ) , _dbClient ) ) ; } if ( _restAPIHelper . isClusteredHost ( storage , initiators ) ) { _log . debug ( "Executing findExportMasks using REST on Storage {}" , storage . getLabel ( ) ) ; result = _restAPIHelper . findRESTExportMasks ( storage , initiatorNames , mustHaveAllPorts ) ; } else { _log . debug ( "Executing findExportMasks using SMIS on Storage {}" , storage . getLabel ( ) ) ; result = findSMISExportMasks ( storage , initiatorNames , mustHaveAllPorts ) ; } _log . info ( "{} findExportMasks END..." , storage . getLabel ( ) ) ; return result ; }
this call can be used to look up the passed in initiator / port names and find ( if any ) to which export masks they belong on the ' storage ' array .
