Unauthorized exception in cinder-client [closed]
Hello,
I am getting basic authorization error from cinder client on volume listing. The keystone service-list and endpoint-list are checked. Those are fine.
>>> from cinderclient import client >>> cinder = client.Client('2', 'admin', pw, 'demo', 'http://10.72.xx.yyyy:8776/v2') >>> cinder.volumes.list() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/stack/python-cinderclient/cinderclient/v2/volumes.py", line 291, in list "volumes", limit=limit) File "/opt/stack/python-cinderclient/cinderclient/base.py", line 65, in _list resp, body = self.api.client.get(url) File "/opt/stack/python-cinderclient/cinderclient/client.py", line 288, in get return self._cs_request(url, 'GET', **kwargs) File "/opt/stack/python-cinderclient/cinderclient/client.py", line 245, in _cs_request self.authenticate() File "/opt/stack/python-cinderclient/cinderclient/client.py", line 400, in authenticate auth_url = self._v1_auth(auth_url) File "/opt/stack/python-cinderclient/cinderclient/client.py", line 423, in _v1_auth resp, body = self.request(url, 'GET', headers=headers) File "/opt/stack/python-cinderclient/cinderclient/client.py", line 234, in request raise exceptions.from_response(resp, body) cinderclient.exceptions.Unauthorized: Unauthorized (HTTP 401)
However 'cinder list' or the horizon works fine.
Any such clue will be helpful.