public DriverTask discoverStorageProvider(StorageProvider storageProvider,List<StorageSystem> storageSystems){
  DellSCDriverTask task=new DellSCDriverTask("discover");
  try {
    LOG.info("Getting information for storage provider [{}:{}] as user {}",storageProvider.getProviderHost(),storageProvider.getPortNumber(),storageProvider.getUsername());
    StorageCenterAPI api=connectionManager.getConnection(storageProvider.getProviderHost(),storageProvider.getPortNumber(),storageProvider.getUsername(),storageProvider.getPassword(),true);
    LOG.info("Connected to DSM {} as user {}",storageProvider.getProviderHost(),storageProvider.getUsername());
    storageProvider.setAccessStatus(AccessStatus.READ_WRITE);
    storageProvider.setManufacturer("Dell");
    storageProvider.setProviderVersion(driverVersion);
    storageProvider.setIsSupportedVersion(true);
    EmDataCollector em=api.getDSMInfo();
    if (em != null) {
      LOG.info("Connected to {} DSM version {}, Java version {}",em.type,em.version,em.javaVersion);
      storageProvider.setProviderVersion(em.version);
    }
    StorageCenter[] scs=api.getStorageCenterInfo();
    for (    StorageCenter sc : scs) {
      StorageSystem storageSystem=util.getStorageSystemFromStorageCenter(api,sc,null);
      storageSystem.setSystemType(driverName);
      storageSystems.add(storageSystem);
    }
    task.setStatus(DriverTask.TaskStatus.READY);
  }
 catch (  Exception e) {
    String msg=String.format("Exception encountered getting storage provider information: %s",e);
    LOG.error(msg);
    task.setFailed(msg);
  }
  return task;
}

public DriverTask discoverStorageProvider ( StorageProvider storageProvider , List < StorageSystem > storageSystems ) { DellSCDriverTask task = new DellSCDriverTask ( "discover" ) ; try { LOG . info ( "Getting information for storage provider [{}:{}] as user {}" , storageProvider . getProviderHost ( ) , storageProvider . getPortNumber ( ) , storageProvider . getUsername ( ) ) ; StorageCenterAPI api = connectionManager . getConnection ( storageProvider . getProviderHost ( ) , storageProvider . getPortNumber ( ) , storageProvider . getUsername ( ) , storageProvider . getPassword ( ) , true ) ; LOG . info ( "Connected to DSM {} as user {}" , storageProvider . getProviderHost ( ) , storageProvider . getUsername ( ) ) ; storageProvider . setAccessStatus ( AccessStatus . READ_WRITE ) ; storageProvider . setManufacturer ( "Dell" ) ; storageProvider . setProviderVersion ( driverVersion ) ; storageProvider . setIsSupportedVersion ( true ) ; EmDataCollector em = api . getDSMInfo ( ) ; if ( em != null ) { LOG . info ( "Connected to {} DSM version {}, Java version {}" , em . type , em . version , em . javaVersion ) ; storageProvider . setProviderVersion ( em . version ) ; } StorageCenter [ ] scs = api . getStorageCenterInfo ( ) ; for ( StorageCenter sc : scs ) { StorageSystem storageSystem = util . getStorageSystemFromStorageCenter ( api , sc , null ) ; storageSystem . setSystemType ( driverName ) ; storageSystems . add ( storageSystem ) ; } task . setStatus ( DriverTask . TaskStatus . READY ) ; } catch ( Exception e ) { String msg = String . format ( "Exception encountered getting storage provider information: %s" , e ) ; LOG . error ( msg ) ; task . setFailed ( msg ) ; } return task ; }
perform discovery for a storage provider .
