Comment 1 for bug 2064040

Revision history for this message
Jay Jahns (jayjahns) wrote :

Looking into this further, I am wondering why we are not using v3.token here. I made a modification to the get_session_and_auth function to just do 3 things:

    auth_url = ctx.auth_uri or CONF.keystone_authtoken.www_authenticate_uri
    auth = ks_token.Token(auth_url=auth_url, project_id=ctx.project_id, token=ctx.auth_token)
    session = ks_session.Session(auth=auth, verify=_determine_verify(ctx))

This includes importing v3.token from keystoneauth.

from keystoneauth1.identity.v3 import token as ks_token

Doing this, we no longer need to override endpoints when running actions. On the core projects I was able to execute all actions where we remove the need to do endpoint overrides.

Some of the other projects require a little more work, but we are not running into any issues with this modification. It however, invalidates all of the other items inside of the keystone.py under utils.