'Extend the size of an existing volume.'

@cinder_utils.trace
def extend_volume(self, volume, new_size):

    client = self._login()
    try:
        volume_info = client.getVolumeByName(volume['name'])
        options = {'size': (int(new_size) * units.Gi)}
        client.modifyVolume(volume_info['id'], options)
    except Exception as ex:
        raise exception.VolumeBackendAPIException(ex)
    finally:
        self._logout(client)
