I just installed v1.2.1 of python-cinderclient, and it doesn't work anymore:
<email address hidden>:~/projects/openstack$ cinder list
ERROR: Bad Request (HTTP 400)
The problem is that our cinder-api is behind a proxy (HTTPS terminator), and it somehow breaks the cinder client.
Here is the debug log, where you can see it tries to connect the HTTP endpoint instead of the HTTPS endpoint published in the Keystone catalog:
<email address hidden>:~/projects/openstack$ cinder --debug list
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET https://keystone.cloud.switch.ch:5000/v2.0 -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] content-length: 628 vary: X-Auth-Token server: nginx connection: keep-alive date: Thu, 11 Jun 2015 08:09:09 GMT content-type: application/json x-distribution: Ubuntu
RESP BODY: {"version": {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}, {"base": "application/xml", "type": "application/vnd.openstack.identity-v2.0+xml"}], "id": "v2.0", "links": [{"href": "https://keystone.cloud.switch.ch:5000/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/content/", "type": "text/html", "rel": "describedby"}, {"href": "http://docs.openstack.org/api/openstack-identity-service/2.0/identity-dev-guide-2.0.pdf", "type": "application/pdf", "rel": "describedby"}]}}
DEBUG:keystoneclient.auth.identity.v2:Making authentication request to https://keystone.cloud.switch.ch:5000/v2.0/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET https://api.zhdk.cloud.switch.ch:8776/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] date: Thu, 11 Jun 2015 08:09:10 GMT content-length: 318 content-type: application/json connection: keep-alive server: nginx
RESP BODY: {"versions": [{"status": "CURRENT", "updated": "2012-01-04T11:33:21Z", "id": "v1.0", "links": [{"href": "http://api.zhdk.cloud.switch.ch:8776/v1/", "rel": "self"}]}, {"status": "CURRENT", "updated": "2012-11-21T11:33:21Z", "id": "v2.0", "links": [{"href": "http://api.zhdk.cloud.switch.ch:8776/v2/", "rel": "self"}]}]}
DEBUG:keystoneclient.auth.identity.v2:Making authentication request to https://keystone.cloud.switch.ch:5000/v2.0/tokens
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET https://api.unil.cloud.switch.ch:8776/ -H "Accept: application/json" -H "User-Agent: python-keystoneclient"
DEBUG:keystoneclient.session:RESP: [200] date: Thu, 11 Jun 2015 08:09:10 GMT content-length: 318 content-type: application/json connection: keep-alive server: nginx
RESP BODY: {"versions": [{"status": "CURRENT", "updated": "2012-01-04T11:33:21Z", "id": "v1.0", "links": [{"href": "http://api.unil.cloud.switch.ch:8776/v1/", "rel": "self"}]}, {"status": "CURRENT", "updated": "2012-11-21T11:33:21Z", "id": "v2.0", "links": [{"href": "http://api.unil.cloud.switch.ch:8776/v2/", "rel": "self"}]}]}
DEBUG:keystoneclient.session:REQ: curl -g -i -X GET http://api.unil.cloud.switch.ch:8776/v1/45d76b4b42294e04886dd163dd4f20d8/volumes/detail -H "User-Agent: python-cinderclient" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}c7f7cdb12f7b6a35cf6906ae4befac7b65297f97"
DEBUG:keystoneclient.session:RESP: [400] date: Thu, 11 Jun 2015 08:09:10 GMT content-length: 264 content-type: text/html connection: close server: nginx
RESP BODY: <html>
<head><title>400 The plain HTTP request was sent to HTTPS port</title></head>
<body bgcolor="white">
<center><h1>400 Bad Request</h1></center>
<center>The plain HTTP request was sent to HTTPS port</center>
<hr><center>nginx</center>
</body>
</html>
ERROR: Bad Request (HTTP 400)
I'm seeing a similar issue with 1.2.2.
Even though there's an https entry in the catalog, the client is still trying to use http.