Fetching an template object prepends the heat url when using --os-no-client-auth
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-heatclient |
Triaged
|
Low
|
Unassigned |
Bug Description
Related to bug 1408199
When using the CLI with --os-no-client-auth it uses the older HTTPClient object rather than the newer SessionClient as (I assume) it better supports handling authenticating directly to heat.
When you make a request using the heatclient HTTPClient object it will always prepend the heat url. This is useful from within the client as it means you make a request using only the path that you want to request.
However in the case of fetching a template from swift we reuse this mechanism to make a request that includes a token. This has the downside though that even though you pass a full url to this object the client will still prepend the heat url and you will end up with an invalid url to fetch from.
When not using --os-no-client-auth it goes via the SessionClient which handles this correctly.
heat -d --os-no-client-auth --heat-url http://
DEBUG (http) curl -g -i -X GET -H 'X-Auth-Token: {SHA1}fb48d3e2c
INFO (connectionpool) Starting new HTTP connection (1): 10.16.18.220
DEBUG (connectionpool) "GET /v1/3ecb536d466
summary: |
- Fetching an template object prepends the heat url when using --os-no- - client-auth + Fetching an template object prepends the heat url when using "-o", + instead of --os-no-client-auth |
summary: |
- Fetching an template object prepends the heat url when using "-o", - instead of --os-no-client-auth + Fetching an template object prepends the heat url when using --os-no- + client-auth |
I assume this is only when you are using "-o", as I use --os-no-client-auth all the time with no problem.