public DriverTask discoverStorageSystem(StorageSystem storageSystem){
  DriverTask task=new DellSCDriverTask("discover");
  try {
    LOG.info("Getting information for storage system [{}] - {}",storageSystem.getIpAddress(),storageSystem.getSystemName());
    String sn=storageSystem.getSerialNumber();
    if (sn == null || sn.length() == 0) {
      sn=storageSystem.getSystemName();
      if (sn.contains("+")) {
        String[] parts=sn.split("\\+");
        sn=parts[1];
      }
    }
    int port=storageSystem.getPortNumber();
    if (port == 0) {
      port=3033;
    }
    StorageCenterAPI api=connectionManager.getConnection(storageSystem.getIpAddress(),port,storageSystem.getUsername(),storageSystem.getPassword(),false);
    StorageCenter sc=api.findStorageCenter(sn);
    util.getStorageSystemFromStorageCenter(api,sc,storageSystem);
    storageSystem.setSystemType(driverName);
    task.setStatus(DriverTask.TaskStatus.READY);
  }
 catch (  Exception e) {
    String msg=String.format("Exception encountered getting storage system information: %s",e);
    LOG.error(msg);
    task.setMessage(msg);
    task.setStatus(DriverTask.TaskStatus.FAILED);
  }
  return task;
}

public DriverTask discoverStorageSystem ( StorageSystem storageSystem ) { DriverTask task = new DellSCDriverTask ( "discover" ) ; try { LOG . info ( "Getting information for storage system [{}] - {}" , storageSystem . getIpAddress ( ) , storageSystem . getSystemName ( ) ) ; String sn = storageSystem . getSerialNumber ( ) ; if ( sn == null || sn . length ( ) == 0 ) { sn = storageSystem . getSystemName ( ) ; if ( sn . contains ( "+" ) ) { String [ ] parts = sn . split ( "\\+" ) ; sn = parts [ 1 ] ; } } int port = storageSystem . getPortNumber ( ) ; if ( port == 0 ) { port = 3033 ; } StorageCenterAPI api = connectionManager . getConnection ( storageSystem . getIpAddress ( ) , port , storageSystem . getUsername ( ) , storageSystem . getPassword ( ) , false ) ; StorageCenter sc = api . findStorageCenter ( sn ) ; util . getStorageSystemFromStorageCenter ( api , sc , storageSystem ) ; storageSystem . setSystemType ( driverName ) ; task . setStatus ( DriverTask . TaskStatus . READY ) ; } catch ( Exception e ) { String msg = String . format ( "Exception encountered getting storage system information: %s" , e ) ; LOG . error ( msg ) ; task . setMessage ( msg ) ; task . setStatus ( DriverTask . TaskStatus . FAILED ) ; } return task ; }
discover storage systems and their capabilities .
