Deleting roles
Removing roles from the OpenStack Identity is a simple one step. In this example, we will show how to delete a role named oldrole
.
Getting ready
Ensure that you are logged on to a correctly configured OpenStack client and can access the OpenStack environment as a user with admin privileges.
Refer to Chapter 2, The OpenStack Client, for details of setting up your environment to use OpenStack command-line client.
How to do it…
In order to delete a role, execute the following commands:
Get the role's name from a current role list:
openstack role list
Delete the
oldrole
role:openstack role delete oldrole
This command will have no output.
How it works…
Deleting unnecessary roles is simple when using OpenStack command-line tool. Start with a command to get an existing role:
openstack role list
Delete a role by executing the following:
openstack role delete <role>
Here the <role>
parameter can be either role ID or role name.