public DriverTask expandVolume(StorageVolume storageVolume,long newCapacity){
  DriverTask task=new DellSCDriverTask("expandVolume");
  try {
    StorageCenterAPI api=connectionManager.getConnection(storageVolume.getStorageSystemId());
    ScVolume scVol=api.expandVolume(storageVolume.getNativeId(),SizeUtil.byteToMeg(newCapacity));
    storageVolume.setProvisionedCapacity(SizeUtil.sizeStrToBytes(scVol.configuredSize));
    task.setStatus(TaskStatus.READY);
    LOG.info("Expanded volume '{}'",scVol.name);
  }
 catch (  DellSCDriverException|StorageCenterAPIException dex) {
    String error=String.format("Error expanding volume %s: %s",storageVolume.getDisplayName(),dex);
    LOG.error(error);
    task.setMessage(error);
    task.setStatus(TaskStatus.FAILED);
  }
  return task;
}

public DriverTask expandVolume ( StorageVolume storageVolume , long newCapacity ) { DriverTask task = new DellSCDriverTask ( "expandVolume" ) ; try { StorageCenterAPI api = connectionManager . getConnection ( storageVolume . getStorageSystemId ( ) ) ; ScVolume scVol = api . expandVolume ( storageVolume . getNativeId ( ) , SizeUtil . byteToMeg ( newCapacity ) ) ; storageVolume . setProvisionedCapacity ( SizeUtil . sizeStrToBytes ( scVol . configuredSize ) ) ; task . setStatus ( TaskStatus . READY ) ; LOG . info ( "Expanded volume '{}'" , scVol . name ) ; } catch ( DellSCDriverException | StorageCenterAPIException dex ) { String error = String . format ( "Error expanding volume %s: %s" , storageVolume . getDisplayName ( ) , dex ) ; LOG . error ( error ) ; task . setMessage ( error ) ; task . setStatus ( TaskStatus . FAILED ) ; } return task ; }
expand volume to a new size . before completion of the request , set all required data for expanded volume in " volume " parameter .
