private HashMap<String,HashSet<String>> discoverAllSMBShares(final StorageSystem storageSystem,final List<IsilonAccessZone> isilonAccessZones){
  String resumeToken=null;
  HashMap<String,HashSet<String>> allShares=new HashMap<String,HashSet<String>>();
  URI storageSystemId=storageSystem.getId();
  _log.info("discoverAllShares for storage system {} - start",storageSystemId);
  try {
    IsilonApi isilonApi=getIsilonDevice(storageSystem);
    for (    IsilonAccessZone isilonAccessZone : isilonAccessZones) {
      do {
        IsilonApi.IsilonList<IsilonSMBShare> isilonShares=isilonApi.listShares(resumeToken,isilonAccessZone.getName());
        List<IsilonSMBShare> isilonSMBShareList=isilonShares.getList();
        HashSet<String> sharesHashSet=null;
        for (        IsilonSMBShare share : isilonSMBShareList) {
          String path=share.getPath();
          String shareId=share.getId();
          sharesHashSet=allShares.get(path);
          if (null == sharesHashSet) {
            sharesHashSet=new HashSet<String>();
            sharesHashSet.add(shareId);
            allShares.put(path,sharesHashSet);
          }
 else {
            sharesHashSet.add(shareId);
            allShares.put(path,sharesHashSet);
          }
          _log.info("Discovered SMB Share name {} and path {}",shareId,path);
        }
        resumeToken=isilonShares.getToken();
      }
 while (resumeToken != null);
      _log.info("discoverd AllShares for access zone {} ",isilonAccessZone.getName());
      resumeToken=null;
    }
    return allShares;
  }
 catch (  IsilonException ie) {
    _log.error("discoverAllShares failed. Storage system: {}",storageSystemId,ie);
    IsilonCollectionException ice=new IsilonCollectionException("discoverAllShares failed. Storage system: " + storageSystemId);
    ice.initCause(ie);
    throw ice;
  }
catch (  Exception e) {
    _log.error("discoverAllShares failed. Storage system: {}",storageSystemId,e);
    IsilonCollectionException ice=new IsilonCollectionException("discoverAllShares failed. Storage system: " + storageSystemId);
    ice.initCause(e);
    throw ice;
  }
}

private HashMap < String , HashSet < String > > discoverAllSMBShares ( final StorageSystem storageSystem , final List < IsilonAccessZone > isilonAccessZones ) { String resumeToken = null ; HashMap < String , HashSet < String > > allShares = new HashMap < String , HashSet < String > > ( ) ; URI storageSystemId = storageSystem . getId ( ) ; _log . info ( "discoverAllShares for storage system {} - start" , storageSystemId ) ; try { IsilonApi isilonApi = getIsilonDevice ( storageSystem ) ; for ( IsilonAccessZone isilonAccessZone : isilonAccessZones ) { do { IsilonApi . IsilonList < IsilonSMBShare > isilonShares = isilonApi . listShares ( resumeToken , isilonAccessZone . getName ( ) ) ; List < IsilonSMBShare > isilonSMBShareList = isilonShares . getList ( ) ; HashSet < String > sharesHashSet = null ; for ( IsilonSMBShare share : isilonSMBShareList ) { String path = share . getPath ( ) ; String shareId = share . getId ( ) ; sharesHashSet = allShares . get ( path ) ; if ( null == sharesHashSet ) { sharesHashSet = new HashSet < String > ( ) ; sharesHashSet . add ( shareId ) ; allShares . put ( path , sharesHashSet ) ; } else { sharesHashSet . add ( shareId ) ; allShares . put ( path , sharesHashSet ) ; } _log . info ( "Discovered SMB Share name {} and path {}" , shareId , path ) ; } resumeToken = isilonShares . getToken ( ) ; } while ( resumeToken != null ) ; _log . info ( "discoverd AllShares for access zone {} " , isilonAccessZone . getName ( ) ) ; resumeToken = null ; } return allShares ; } catch ( IsilonException ie ) { _log . error ( "discoverAllShares failed. Storage system: {}" , storageSystemId , ie ) ; IsilonCollectionException ice = new IsilonCollectionException ( "discoverAllShares failed. Storage system: " + storageSystemId ) ; ice . initCause ( ie ) ; throw ice ; } catch ( Exception e ) { _log . error ( "discoverAllShares failed. Storage system: {}" , storageSystemId , e ) ; IsilonCollectionException ice = new IsilonCollectionException ( "discoverAllShares failed. Storage system: " + storageSystemId ) ; ice . initCause ( e ) ; throw ice ; } }
get all smb shares of storagesystem
