public DriverTask discoverStoragePorts(StorageSystem storageSystem,List<StoragePort> storagePorts){
  LOG.info("Discovering storage ports for [{}] {} {}",storageSystem.getSystemName(),storageSystem.getIpAddress(),storageSystem.getNativeId());
  DellSCDriverTask task=new DellSCDriverTask("discoverStoragePorts");
  try {
    String ssn=storageSystem.getNativeId();
    StorageCenterAPI api=connectionManager.getConnection(ssn);
    Map<String,List<ScControllerPort>> ports=getPortList(api,ssn);
    for (    Entry<String,List<ScControllerPort>> entry : ports.entrySet()) {
      for (      ScControllerPort scPort : entry.getValue()) {
        StoragePort port=util.getStoragePortForControllerPort(api,scPort,entry.getKey());
        LOG.info("Discovered Port {}, storageSystem {}",scPort.instanceId,scPort.scSerialNumber);
        storagePorts.add(port);
      }
    }
    task.setStatus(DriverTask.TaskStatus.READY);
  }
 catch (  Exception e) {
    String failureMessage=String.format("Error getting port information: %s",e);
    task.setFailed(failureMessage);
    LOG.warn(failureMessage);
  }
  return task;
}

public DriverTask discoverStoragePorts ( StorageSystem storageSystem , List < StoragePort > storagePorts ) { LOG . info ( "Discovering storage ports for [{}] {} {}" , storageSystem . getSystemName ( ) , storageSystem . getIpAddress ( ) , storageSystem . getNativeId ( ) ) ; DellSCDriverTask task = new DellSCDriverTask ( "discoverStoragePorts" ) ; try { String ssn = storageSystem . getNativeId ( ) ; StorageCenterAPI api = connectionManager . getConnection ( ssn ) ; Map < String , List < ScControllerPort > > ports = getPortList ( api , ssn ) ; for ( Entry < String , List < ScControllerPort > > entry : ports . entrySet ( ) ) { for ( ScControllerPort scPort : entry . getValue ( ) ) { StoragePort port = util . getStoragePortForControllerPort ( api , scPort , entry . getKey ( ) ) ; LOG . info ( "Discovered Port {}, storageSystem {}" , scPort . instanceId , scPort . scSerialNumber ) ; storagePorts . add ( port ) ; } } task . setStatus ( DriverTask . TaskStatus . READY ) ; } catch ( Exception e ) { String failureMessage = String . format ( "Error getting port information: %s" , e ) ; task . setFailed ( failureMessage ) ; LOG . warn ( failureMessage ) ; } return task ; }
discover storage ports and their capabilities .
