Jump to: navigation, search

Difference between revisions of "Operations/UseCases"

Line 5: Line 5:
 
'''Goal:''' Create several users and add them to tenant 'baz' using the nova CLI.
 
'''Goal:''' Create several users and add them to tenant 'baz' using the nova CLI.
 
'''How:'''  
 
'''How:'''  
keystone user-create --name=foo --email="foo@foo.com"; keystone user-create --name=bar --email="bar@bar.com"; etc
+
* keystone user-create --name=foo --email="foo@foo.com"; keystone user-create --name=bar --email="bar@bar.com"
keystone role-list | grep admin
+
* keystone role-list | grep admin
 
| admin | XXXX-XXXXXX-XXXXXXX-XXXAAA |
 
| admin | XXXX-XXXXXX-XXXXXXX-XXXAAA |
keystone tenant-list | grep baz
+
* keystone tenant-list | grep baz
 
| baz | XXXX-XXXXXX-XXXXXXX-XXXBBB |
 
| baz | XXXX-XXXXXX-XXXXXXX-XXXBBB |
keystone user-list | grep foo
+
* keystone user-list | grep foo
 
| foo | XXXX-XXXXXX-XXXXXXX-XXXCCC|
 
| foo | XXXX-XXXXXX-XXXXXXX-XXXCCC|
keystone user-role-add --role_id = XXXX-XXXXXX-XXXXXXX-XXXAAA --tenant_id=XXXX-XXXXXX-XXXXXXX-XXXBBB --user_id=XXXX-XXXXXX-XXXXXXX-XXXCCC
+
* keystone user-role-add --role_id = XXXX-XXXXXX-XXXXXXX-XXXAAA --tenant_id=XXXX-XXXXXX-XXXXXXX-XXXBBB --user_id=XXXX-XXXXXX-XXXXXXX-XXXCCC
  
 
Repeat the second two steps for the other users. I've done this with some seriously ugly for loops.  
 
Repeat the second two steps for the other users. I've done this with some seriously ugly for loops.  

Revision as of 00:34, 17 October 2012

What kind of things do OpenStack Operators need to do on a daily basis? Is it easy or difficult? Tracking these use cases will identify gaps in OpenStack tooling, offer valuable insight to the developers, and help improve OpenStack.

Add multiple users to a tenant using the nova CLI

Goal: Create several users and add them to tenant 'baz' using the nova CLI. How:

  • keystone user-create --name=foo --email="foo@foo.com"; keystone user-create --name=bar --email="bar@bar.com"
  • keystone role-list | grep admin

| admin | XXXX-XXXXXX-XXXXXXX-XXXAAA |

  • keystone tenant-list | grep baz

| baz | XXXX-XXXXXX-XXXXXXX-XXXBBB |

  • keystone user-list | grep foo

| foo | XXXX-XXXXXX-XXXXXXX-XXXCCC|

  • keystone user-role-add --role_id = XXXX-XXXXXX-XXXXXXX-XXXAAA --tenant_id=XXXX-XXXXXX-XXXXXXX-XXXBBB --user_id=XXXX-XXXXXX-XXXXXXX-XXXCCC

Repeat the second two steps for the other users. I've done this with some seriously ugly for loops.

How should this work?: $ keystone user-create --name=foo --email="foo@foo.com" $ keystone user-role-add --user=foo --tenant=baz --role=admin

List all roles and tenants for a given user

Goal: List all roles and tenants for a given user. How:

  1. Go into the DB. Do some queries.

How should this work?:

  1. keystone user-show --user=foo

User foo:

| Tenant |   Role   | Date Added |
|  Foo     | Admin  | Tue Oct 16 17:29:11 UTC 2012 |
|  Bar     | User  | Tue Oct 11 13:18:02 UTC 2012 |