mistral-extra reports wrong endpoints
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
New
|
Undecided
|
Unassigned |
Bug Description
In the get_endpoint_
What happens is that when an action is ran with KeystoneAction for keystone.
This returns a 404 error, because we're supposed to be using https:/
It appears we do not perform any type of discovery in these tools. There are several other classes impacted by this.
Some classes actually run, if they don't need to do a version discovery. But a lot of them don't.
So far, I have only ran into this with KeystoneAction and DesignateAction, but there appear to be a lot more.
I believe we need to also perform a discovery before returning the endpoint back, so we have the correct versions sent back. Otherwise, these actions are DOA.
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_authenticat e_uri Token(auth_ url=auth_ url, project_ id=ctx. project_ id, token=ctx. auth_token) Session( auth=auth, verify= _determine_ verify( ctx))
auth = ks_token.
session = ks_session.
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.