'Extend an existing volume.'

def extend_volume(self, volume, new_size):

    volume_name = volume['name']
    LOG.info('Entering    extend_volume    volume=%(vol)s    new_size=%(size)s', {'vol': volume_name, 'size': new_size})
    vol_size = (int(new_size) * units.Ki)
    reserve = (not self.configuration.san_thin_provision)
    reserve_size = (100 if reserve else 0)
    LOG.debug('new    volume    size    in    MB    (size)s', {'size': vol_size})
    data = {'data': {'size': vol_size, 'reserve': reserve_size, 'warn_level': int(WARN_LEVEL), 'limit': 100, 'snap_limit': DEFAULT_SNAP_QUOTA}}
    self.APIExecutor.edit_vol(volume_name, data)
