Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

the python thing didnt help

Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information.

from keystoneclient.v2.0 import client File "<stdin>", line 1 from keystoneclient.v2.0 import client ^ SyntaxError: invalid syntax from keystoneclient.v2_0 import client token = '4f87d15d7fae4325653b' endpoint = 'http://controller:35357/v2.0' keystone = client.Client(token=token, endpoint=endpoint) keystone.tenants.list() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/tenants.py", line 123, in list tenant_list = self._list('/tenants%s' % query, 'tenants') File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py", line 124, in _list resp, body = self.client.get(url, *kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 170, in get return self.request(url, 'GET', *kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 206, in request resp = super(LegacyJsonAdapter, self).request(args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 95, in request return self.session.request(url, method, *kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 337, in inner return func(args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 402, in request raise exceptions.from_response(resp, method, url) keystoneclient.exceptions.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-09ef6fdc-d177-4da1-94c1-7a6702006253)

the python thing didnt help

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

information. >>> from keystoneclient.v2.0 import client File "<stdin>", line 1 from keystoneclient.v2.0 import client ^ SyntaxError: invalid syntax >>> from keystoneclient.v2_0 import client >>> token = '4f87d15d7fae4325653b' >>> endpoint = 'http://controller:35357/v2.0' >>> keystone = client.Client(token=token, endpoint=endpoint) >>> keystone.tenants.list() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/tenants.py", line 123, in list tenant_list = self._list('/tenants%s' % query, 'tenants') File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py", line 124, in _list resp, body = self.client.get(url, *kwargs) **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 170, in get return self.request(url, 'GET', *kwargs) **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 206, in request resp = super(LegacyJsonAdapter, self).request(args, *kwargs) self).request(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 95, in request return self.session.request(url, method, *kwargs) **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 337, in inner return func(args, **kwargs) func(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 402, in request raise exceptions.from_response(resp, method, url) keystoneclient.exceptions.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-09ef6fdc-d177-4da1-94c1-7a6702006253)

req-09ef6fdc-d177-4da1-94c1-7a6702006253)

UPDATE

After (pip install --upgrade python-openstackclient) and now the openstack cli works fine.

But Keystone still has the same trouble as mentioned.

the python thing didnt help

Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from keystoneclient.v2.0 import client
  File "<stdin>", line 1
    from keystoneclient.v2.0 import client
                           ^
SyntaxError: invalid syntax
>>> from keystoneclient.v2_0 import client
>>> token = '4f87d15d7fae4325653b'
>>> endpoint = 'http://controller:35357/v2.0'
>>> keystone = client.Client(token=token, endpoint=endpoint)
>>> keystone.tenants.list()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/v2_0/tenants.py", line 123, in list
    tenant_list = self._list('/tenants%s' % query, 'tenants')
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/base.py", line 124, in _list
    resp, body = self.client.get(url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 170, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 206, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/adapter.py", line 95, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 337, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 402, in request
    raise exceptions.from_response(resp, method, url)
keystoneclient.exceptions.Unauthorized: The request you have made requires authentication. (HTTP 401) (Request-ID: req-09ef6fdc-d177-4da1-94c1-7a6702006253)