[Openstack] Keystone API question

Rafael Durán Castañeda rafadurancastaneda at gmail.com
Thu May 3 06:51:46 UTC 2012


On 05/03/2012 12:06 AM, Luis Gervaso wrote:
> This is what i get.
>
> 1 > GET 
> http://192.168.1.41:35357/v2.0/users/ef1e63df85b641d7bf3c575bb8670cef/roles
> 1 > X-Auth-Token: secret0
>
> 2012-05-03 00:03:55,337 [http-bio-8080-exec-10] INFO  api.identity  - 
> 2 * LoggingFilter - Response received on thread http-bio-8080-exec-10
> 2 < 500
> 2 < Connection: close
> 2 < Content-Length: 5500
> 2 < Content-Type: text/plain
> 2 < Date: Mon, 26 Mar 2012 06:39:34 GMT
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/eventlet/wsgi.py", line 336, 
> in handle_one_response
>     result = self.application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/paste/urlmap.py", line 203, 
> in __call__
>     return app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 299, in 
> __call__
>     response = request.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, 
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, 
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 299, in 
> __call__
>     response = request.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, 
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, 
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 299, in 
> __call__
>     response = request.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, 
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, 
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 299, in 
> __call__
>     response = request.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, 
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, 
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 322, in 
> __call__
>     resp = req.get_response(self.application)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1053, 
> in get_response
>     application, catch_exc_info=False)
>   File "/usr/lib/python2.7/dist-packages/webob/request.py", line 1022, 
> in call_application
>     app_iter = application(self.environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, 
> in __call__
>     response = self.app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, 
> in __call__
>     response = self.app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, 
> in __call__
>     response = self.app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/pymodules/python2.7/routes/middleware.py", line 131, 
> in __call__
>     response = self.app(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 159, in 
> __call__
>     return resp(environ, start_response)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 147, in 
> __call__
>     resp = self.call_func(req, *args, **self.kwargs)
>   File "/usr/lib/python2.7/dist-packages/webob/dec.py", line 208, in 
> call_func
>     return self.func(req, *args, **kwargs)
>   File "/opt/stack/keystone/keystone/common/wsgi.py", line 178, in 
> __call__
>     method = getattr(self, action)
> AttributeError: 'UserController' object has no attribute 'get_user_roles'
>
>
> On Wed, May 2, 2012 at 10:44 PM, Luis Gervaso <luis at woorea.es 
> <mailto:luis at woorea.es>> wrote:
>
>     Hi,
>
>     In Diablo was:
>
>     GET /users/{user_id}/roleRefs
>
>     In Essex it is maintained for compatibility reasons. I understand
>     that this is the obsolete now.
>
>     I can find:
>
>     PUT & DELETE /users/{user_id}/roles/OS-KSADM/{role_id}
>
>     How can get all the roles having a user_id?
>
>     GET /users/{user_id}/roles (i can't find this on stable/essex)
>
>     Returning role list with tenant associated
>
>     Another option that would work for me is:
>
>     GET /users/{user_id}/tenants
>
>     Returning tenant list with role list associated per tenant
>
>
>     When i GET /user/{user_id} i obtain only this info
>
>     {"user": {"name": "admin", "enabled": true, "email":
>     "admin at example.com <mailto:admin at example.com>", "id":
>     "ef1e63df85b641d7bf3c575bb8670cef", "tenantId": null}}
>
>     Regards
>
>     -- 
>     -------------------------------------------
>     Luis Alberto Gervaso Martin
>     Woorea Solutions, S.L
>     CEO & CTO
>     mobile: (+34) 627983344 <tel:%28%2B34%29%20627983344>
>     luis@ <mailto:luis.gervaso at gmail.com>woorea.es <http://woorea.es/>
>
>
>
>
>
> -- 
> -------------------------------------------
> Luis Alberto Gervaso Martin
> Woorea Solutions, S.L
> CEO & CTO
> mobile: (+34) 627983344
> luis@ <mailto:luis.gervaso at gmail.com>woorea.es <http://woorea.es/>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : openstack at lists.launchpad.net
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
I think you are searching for:

  "/users/{user_id}/roleRefs"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20120503/08f4dbc0/attachment.html>


More information about the Openstack mailing list