Make a new Keytoneclient "apiclient.exceptions.Forbidden"

asked 2013-12-03 02:21:22 -0500

changzhi gravatar image

updated 2013-12-03 02:25:42 -0500

I make a new keystoneclient follow by keystoneclient/v2_0/ .

from keystoneclient.v2_0 import client as keystone_client
token = keystone_client.Client(username='username',
print token.users.list()

The result is :

    Traceback (most recent call last):
  File "", line 15, in <module>
    print token.users.list()
  File "/usr/lib/python2.6/site-packages/keystoneclient/v2_0/", line 120, in list
    return self._list("/users%s" % query, "users")
  File "/usr/lib/python2.6/site-packages/keystoneclient/", line 110, in _list
    resp, body = self.client.get(url)
  File "/usr/lib/python2.6/site-packages/keystoneclient/", line 655, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/", line 651, in _cs_request
  File "/usr/lib/python2.6/site-packages/keystoneclient/", line 610, in request
  File "/usr/lib/python2.6/site-packages/keystoneclient/", line 124, in request
    raise exceptions.from_response(resp, method, url)
keystoneclient.apiclient.exceptions.Forbidden: You are not authorized to perform the requested action,    admin_required. (HTTP 403)

I don not know why the problems happens. Could someone tell me how to deal with it ? Thanks a lot !!!!

edit retag flag offensive close merge delete