session endpoint lookup doesn't handle endpoints with paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack SDK |
New
|
Undecided
|
Unassigned |
Bug Description
We have a service catalog that looks like this:
+------
| Name | Type | Endpoints |
+------
| Compute Service | compute | RegionOne |
| | | publicURL: http://
| | | internalURL: http://
| | | adminURL: http://
| | | |
| Network Service | network | RegionOne |
| | | publicURL: http://
| | | internalURL: http://
| | | adminURL: http://
| | | |
| Image Service | image | RegionOne |
| | | publicURL: http://
| | | internalURL: http://
| | | adminURL: http://
| | | |
| Block Storage Service | volume | RegionOne |
| | | publicURL: http://
| | | internalURL: http://
| | | adminURL: http://
| | | |
| Identity Service | identity | RegionOne |
| | | publicURL: http://
| | | internalURL: http://
| | | adminURL: http://
| | | |
+------
When using openstackclient + openstacksdk>9.1.0, openstack network list fails because the SDK is not properly parsing the network endpoint.
That's because of this change:
https:/
The code assumes you have an endpoint of the form: scheme:
But we have: scheme:
So when doing a network list operation from openstackclient, the sdk isn't able to figure out the version of the network API to use (v2.0), and makes the request against http://
Note that before https:/ /review. openstack. org/#/c/ 351398/ things work because the SDK is using the service catalog. I can see why it was changed, and getting the versions from the actual services is better, but the SDK is making assumptions on how the endpoints are formed in the service catalog which is the bug.