Ask Your Question
0

Getting role by name

asked 2013-07-24 00:22:58 -0500

bikramnehra gravatar image

updated 2014-01-22 15:12:55 -0500

Evgeny gravatar image

curl -s http://localhost:35357/v2.0/OS-KSADM/roles?name=admin -X GET -H "X-Auth-Token: xxxxxxxxxxxxxxxxxxx"|python -mjson.tool

`I am running the above curl command but i am getting all the available roles instead of just getting admin role. Is there any way to retrieve id of a particular role?

edit retag flag offensive close merge delete

Comments

I have also verified this API on stable/grizzly code base and it looks like the 'name' parameter is not getting considered (though the API documentation http://api.openstack.org/api-ref.html mentions the param). IMO, a bug should be filed if its not already there!

unmesh-gurjar gravatar imageunmesh-gurjar ( 2013-07-25 06:54:18 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-03-30 20:47:03 -0500

9lives gravatar image

updated 2014-03-30 20:49:21 -0500

Did you try to use keystone client to verify like this:

 #keystone --debug role-get <admin_role_name>or <admin_role_id>

and check the curl stuff for details calling the keystone api, if it is the same as what you got it might be a defect.

Hope that helps!

Vic

edit flag offensive delete link more
0

answered 2014-03-30 19:13:27 -0500

annegentle gravatar image

Looking at http://api.openstack.org/api-ref-iden... now, is it documented as you expect?

edit flag offensive delete link more

Comments

Thanks Anne, the doc looks more accurate now!

unmesh-gurjar gravatar imageunmesh-gurjar ( 2014-03-31 23:58:00 -0500 )edit

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-07-24 00:22:58 -0500

Seen: 87 times

Last updated: Mar 30 '14