ValidVersions.path not respected

Bug #1466279 reported by Brian Curtin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack SDK
Confirmed
Critical
Unassigned

Bug Description

We're not properly detecting the right identity proxy to attach to the identity name under a connection.

>>> from openstack import connection
>>> conn = connection.Connection(auth_url="http://ipaddress:5000/v2.0", username="", password="", project_id="", project_name="")
>>> conn.identity
<openstack.identity.v3._proxy.Proxy object at 0x10d4422b0>

Tags: identity
Revision history for this message
Brian Curtin (brian.curtin) wrote :

Even if you add something like prof.set_version("identity", "v2"), you still can't get it. The endpoint is v2.0, and you can't load it if the set_version has v2.0 as the value. At least with v2 in there the identity class that gets loaded is v2, but it can't talk to the right endpoint.

Revision history for this message
Terry Howe (thowe-g) wrote :

Right now we have the concept of auth version and identity version disconnected. I kind of think it should stay that way.

I'm not sure why the set_version didn't work though.

Revision history for this message
Brian Curtin (brian.curtin) wrote :

There's some kind of mismatch here. I can get set_version(service="identity", version="v2") to load a identity.v2 as conn.identity, but the endpoint for v2 identity actually has "v2.0" in the URL so it doesn't actually work. It seems like we need something extra to say v2 is called v2 to us but v2.0 to the service, or something like that.

Also I think you're right for separating auth and identity.

Revision history for this message
Brian Curtin (brian.curtin) wrote :

Title updated to reflect what the real problem is. IdentityService needs a path=v2.0 added to the valid_versions for v2, but ServiceFilter is still not properly respecting that path.

summary: - v3 identity proxy loaded for v2 endpoint
+ ValidVersions.path not respected
Changed in python-openstacksdk:
assignee: nobody → Brian Curtin (brian.curtin)
Revision history for this message
Brian Curtin (brian.curtin) wrote :

This patch will make it work while leaving anything else unaffected: http://paste.openstack.org/show/320435/

Terry, you seemed to think that's not the right way to do this, but reading through how this is all used between the ServiceFilter, ServiceCatalog, and IdentityService classes, I'm not really sure what else would be done. You mentioned possibly having another version set on the Profile, but in this case Identity is defined as having a v2.0 in the URL, so we should code that as such, I think. From there, giving the user the ability to specify just the module version and not having to know how a URL is structured is what I'm thinking we should allow them to specify.

Revision history for this message
Brian Curtin (brian.curtin) wrote :
Changed in python-openstacksdk:
status: Confirmed → In Progress
Changed in python-openstacksdk:
milestone: 1.0 → 1.1
assignee: Brian Curtin (brian.curtin) → nobody
Changed in python-openstacksdk:
assignee: nobody → Marcellin Fom Tchassem (mf6510)
Changed in python-openstacksdk:
status: In Progress → Confirmed
Changed in python-openstacksdk:
assignee: Marcellin Fom Tchassem (mf6510) → nobody
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.