'Add a backend location url to an image.
Returns a dict containing image metadata on success.'

def add_location(self, context, image_id, url, metadata):

    if (CONF.glance_api_version != 2):
        raise exception.Invalid('Image    API    version    2    is    disabled.')
    client = GlanceClientWrapper(version=2)
    try:
        return client.call(context, 'add_location', image_id, url, metadata)
    except Exception:
        _reraise_translated_image_exception(image_id)
