Ask Your Question
0

keystone API V3 issues

asked 2013-11-21 08:21:01 -0500

sajuptpm gravatar image
  • client.projects.list() and client.domanis.list() are not working . Getting following errors keystoneclient.apiclient.exceptions.NotFound: The resource could not be found. (HTTP 404)

*note: client.users.list() is working fine

I an using latest openstack havana

===== Code ===

from keystoneclient.v3 import client

conn = client.Client(user_domain_name="Default", username="admin", password="password", project_domain_name="Default", project_name="admin", auth_url="http://192.168.56.101:35357/v3")

conn.users.list() [<user email="cinder@example.com," enabled="True," id="13bd02f29edd41fe92c80c60b6fa67e3," name="cinder," tenantid="02fc3e670e2a4bbf9101e7bb0d2b027c">, <user email="glance@example.com," enabled="True," id="143f18e77a40447f917a74bbb45a21c9," name="glance," tenantid="02fc3e670e2a4bbf9101e7bb0d2b027c">, <user email="sam2@dd.com," enabled="False," id="398df7f686464373bd60042f3a630210," name="sam2," tenantid="d3d06dee1d0c48d185fb6cd00f0d50a4">, <user email="demo@example.com," enabled="True," id="47f98cadd39947c3aea4da44f42c8e61," name="demo">, <user email="alt_demo@example.com," enabled="True," id="78591df2583c4d94b4bcaf2995e20cce," name="alt_demo">, <user email="nova@example.com," enabled="True," id="93ab6827bf2b4c0c899d14adecd7e7ea," name="nova," tenantid="02fc3e670e2a4bbf9101e7bb0d2b027c">, <user email="admin@example.com," enabled="True," id="e3c91a9b029a4b22bbefa9fe2d33634f," name="admin">, <user email="sam1@dd.com," enabled="False," id="edfea2a2e725405c8ac6ce418a7e4799," name="sam1," tenantid="d3d06dee1d0c48d185fb6cd00f0d50a4">]</user></user></user></user></user></user></user></user>

conn.projects.list() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/v3/projects.py", line 75, in list *kwargs) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/base.py", line 70, in func return f(args, *kwargs) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/base.py", line 340, in list self.collection_key) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/base.py", line 110, in _list resp, body = self.client.get(url) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/httpclient.py", line 655, in get return self._cs_request(url, 'GET', *kwargs) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/httpclient.py", line 651, in _cs_request *kwargs) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/httpclient.py", line 610, in request *request_kwargs) File "/home/saju/test/myenv/local/lib/python2.7/site-packages/python_keystoneclient-0.4.1-py2.7.egg/keystoneclient/httpclient.py", line 124, in request raise exceptions.from_response(resp, method, url) keystoneclient.apiclient.exceptions.NotFound: The resource could not be found. (HTTP 404)</module></stdin>

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-28 17:16:51 -0500

edmondsw gravatar image

If other keystone requests are working, check that you have a role that is allowed to list projects and domains (defined in /etc/keystone/policy.json).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-11-21 08:21:01 -0500

Seen: 397 times

Last updated: Nov 21 '13