[openstack-dev] cinder authentication with authtoken

Kanthi P pavuluri.kanthi at gmail.com
Thu Oct 15 13:51:38 UTC 2015


Hi,

I need a way to access cinder apis using auth-token. I used below API to
get the cinder client and tried getting the availability zones.


cinder_client = cc.Client(1, auth_token=self.ctxt.auth_token,
                                     project_id=self.ctxt.tenant,
                                      auth_url=self.ctxt.auth_url)
cinder_client.availability_zones.list()

But authentication fails with the exception:
"cinderclient.exceptions.BadRequest: Expecting to find username or userId
in passwordCredentials - the server could not comply with the request since
it is either malformed or otherwise incorrect. The client is assumed to be
in error. (HTTP 400)"

It works fine when I use username and api_key instead of auth_token

cinder_client = cc.Client(1, username="admin", api_key="XXXXX",
                          project_id="admin",
                          auth_url="http://X.X.X.X:5000/v2.0")
cinder_client.availability_zones.list()

Please help me with a means of using cinder apis with auth_token.

Thanks,
Kanthi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20151015/220458de/attachment.html>


More information about the OpenStack-dev mailing list