Provide support for glance arbitrary url

Registered by Yang Yu

The fact that nova.conf's glance_api_servers list requires those endpoints to be using the standard URI format seems lacking. For example there is nothing stopping users from running glance under some arbitrary URI (ex: http://host:port/image-service/zone1/base) however the current nova code does not allow for this flexibility but rather makes assumptions about the URI structure of the glance endpoint(s). Ideally glance url should be able to be specified on any host/port/URI scheme and nova should work fine -- not limit the URI glance scheme to some defined URI format.

# URL for connecting to neutron (string value)
neutron_url=https://9.123.106.99:9973/0bcdb4dcd6d14ed7a3dc39b1d141d1dc/public - "virtual" url for neutron

# auth url for connecting to neutron in admin context (string
# value)
neutron_admin_auth_url=https://9.123.106.99:9973/aeb337113f264e13984fda81dc165d21/admin/v2.0 - "virtual" url for keystone

glance_api_servers = http://9.123.106.99:9973/0bcdb4dcd6d14ed7a3dc39b1d141d1dc/public/

The error is that in nova glance.py code I see here:

https://github.com/openstack/nova/blob/master/nova/image/glance.py#L135

    endpoint = '%s://%s:%s' % (scheme, host, port)
    return glanceclient.Client(str(version), endpoint, **params)

From consumer perspective, could we configure all component url in same way? For neutron/keystone url, we can point a customer url, but for glance url, nova has limited it in one way.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Yang Yu
Direction:
Needs approval
Assignee:
Yang Yu
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Joe Gordon

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bug/1220131,n,z

Addressed by: https://review.openstack.org/45072
    Provide support for glance arbitrary url

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.