glanceclient.common.utils.strip_version doesn't handle a service type in the path

Bug #1748009 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
In Progress
Undecided
Cyril Roelandt

Bug Description

In trying to workaround bug 1707995, where we have a URL like:

http://23.253.94.203/image/v2

We tried using glanceclient.common.utils.strip_version() but that doesn't work with the 'image' in the path:

>>> from glanceclient.common import utils
>>> url = 'http://23.253.94.203/image/v2'
>>> utils.strip_version(url)
('http://23.253.94.203/image/v2', None)
>>> url = 'http://23.253.94.203/v2'
>>> url_parts = urlparse.urlparse(url)
>>> url_parts
ParseResult(scheme='http', netloc='23.253.94.203', path='/v2', params='', query='', fragment='')
>>> utils.strip_version(url)
('http://23.253.94.203', 2.0)
>>>

Changed in python-glanceclient:
status: New → Triaged
assignee: nobody → Abhishek Kekane (abhishek-kekane)
Changed in python-glanceclient:
assignee: Abhishek Kekane (abhishek-kekane) → Cyril Roelandt (cyril-roelandt)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-glanceclient (master)
Changed in python-glanceclient:
status: Triaged → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.