'Extend an existing volume\'s size.'

def extend_volume(self, volume, new_size):

    vol_id = volume['provider_location']
    LOG.debug('Extends    volume    :    %(id)s,    new    size    :    %(size)s.', {'id': vol_id, 'size': new_size})
    new_size_mb = (new_size * units.Ki)
    reply = self.client.volumeExtend(vol_id, new_size_mb)
    status = reply['status']
    result = reply['result']
    if status:
        msg = (_('Error    while    extending    volume    [status]    %(stat)s    -    [result]    %(res)s.'), {'stat': six.text_type(status), 'res': result})
        LOG.error(msg)
        raise exception.VolumeBackendAPIException(data=msg)
    LOG.debug('Volume    extended    :    [id]    %(vid)s    -    [status]    %(stat)s    -    [result]    %(res)s.', {'vid': vol_id, 'stat': six.text_type(status), 'res': result})
