Example usage

Contents

Example usage

The keystone client is set up to expect commands in the general form of keystone command argument, followed by flag-like keyword arguments to provide additional (often optional) information. For example, the user-list and tenant-create commands can be invoked as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
 # Using token auth env variables
 export OS_SERVICE_ENDPOINT=http://127.0.0.1:5000/v2.0/
 export OS_SERVICE_TOKEN=secrete_token
 keystone user-list
 keystone tenant-create --name demo

 # Using token auth flags
 keystone --os-token secrete --os-endpoint http://127.0.0.1:5000/v2.0/ user-list
 keystone --os-token secrete --os-endpoint http://127.0.0.1:5000/v2.0/ tenant-create --name=demo

 # Using user + password + project_name env variables
 export OS_USERNAME=admin
 export OS_PASSWORD=secrete
 export OS_PROJECT_NAME=admin
 openstack user list
 openstack project create demo

 # Using user + password + project-name flags
 openstack --os-username admin --os-password secrete --os-project-name admin user list
 openstack --os-username admin --os-password secrete --os-project-name admin project create demo
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License http://creativecommons.org/licenses/by/3.0/legalcode.

See All Legal Notices