Custom Search

SUBSCRIBE

SUBSCRIBE : 300 + Free Video Tutorials Programming (Python, golang, Julia), DevOps

Thursday, June 5, 2014

OpenStack Keystone user-role-add command automatically add the role _member_

1)
##Role List
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin role-list

2)
##User List
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-list

3)
##User Role List
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-role-list

4)
##Create New Project
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin tenant-create --name project1

5)
##Project List
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin tenant-list

6)
##Create New User
##This command will create a new user and automatically add the role "_member_" to that user with project "4da17230c6d24b7795d120943cbfd05c" (default_project_id).Please check keystone tables "user" and "user_project_metadata".
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-create --name saju5 --tenant 61f4350b33a541088b55c7a0644f0127 --pass saju5 --enabled true

7)
##List User
##I Could see saju5 in user list
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-list

8)
##Assign New Role to User
##Try to add the role "_member_" to user saju5 and project1. Got Conflict error.
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-role-add --user b10b4e738fc4477aa67fb94f86f21f7c --role 9fe2ff9ee4384b1894a90878d3e92bab --tenant 61f4350b33a541088b55c7a0644f0127
Output
-------

Conflict occurred attempting to store role grant. User b10b4e738fc4477aa67fb94f86f21f7c already has role 9fe2ff9ee4384b1894a90878d3e92bab in tenant 61f4350b33a541088b55c7a0644f0127 (HTTP 409)

9)
##List User
##I Could see saju5 in user list
keystone --os-username admin --os-password openstack --os-auth-url http://localhost:5000/v2.0/ --os-tenant-name admin user-list














No comments:

Post a Comment