'Extends an existing volume.
:param volume: the volume Object
:param new_size: the new size to increase the volume to
:returns: dict -- modifiedVolumeDict - the extended volume Object
:raises: VolumeBackendAPIException:'

def extend_volume(self, volume, new_size):

    original_vol_size = volume.size
    volume_name = volume.name
    extra_specs = self._initial_setup(volume)
    device_id = self._find_device_on_array(volume, extra_specs)
    array = extra_specs[utils.ARRAY]
    self._sync_check(array, device_id, volume_name, extra_specs)
    if (device_id is None):
        exception_message = (_('Cannot    find    Volume:    %(volume_name)s.    Extend    operation.        Exiting....') % {'volume_name': volume_name})
        LOG.error(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
    (__, snapvx_src, __) = self.rest.is_vol_in_rep_session(array, device_id)
    if snapvx_src:
        exception_message = (_('The    volume:    %(volume)s    is    a    snapshot    source.    Extending    a    volume    with    snapVx    snapshots    is    not    supported.    Exiting...') % {'volume': volume_name})
        LOG.error(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
    if (int(original_vol_size) > int(new_size)):
        exception_message = (_('Your    original    size:    %(original_vol_size)s    GB    is    greater    than:    %(new_size)s    GB.    Only    Extend    is    supported.    Exiting...') % {'original_vol_size': original_vol_size, 'new_size': new_size})
        LOG.error(exception_message)
        raise exception.VolumeBackendAPIException(data=exception_message)
    LOG.info('Extending    volume    %(volume)s    to    %(new_size)d    GBs', {'volume': volume_name, 'new_size': int(new_size)})
    if self.utils.is_replication_enabled(extra_specs):
        self.extend_volume_is_replicated(array, volume, device_id, volume_name, new_size, extra_specs)
    else:
        self.provision.extend_volume(array, device_id, new_size, extra_specs)
    LOG.debug('Leaving    extend_volume:    %(volume_name)s.    ', {'volume_name': volume_name})
