64b6c9261e
Current folder name New folder name Book title ---------------------------------------------------------- basic-install DELETE cli-guide DELETE common common NEW admin-guide-cloud Cloud Administrators Guide docbkx-example DELETE openstack-block-storage-admin DELETE openstack-compute-admin DELETE openstack-config config-reference OpenStack Configuration Reference openstack-ha high-availability-guide OpenStack High Availabilty Guide openstack-image image-guide OpenStack Virtual Machine Image Guide openstack-install install-guide OpenStack Installation Guide openstack-network-connectivity-admin admin-guide-network OpenStack Networking Administration Guide openstack-object-storage-admin DELETE openstack-security security-guide OpenStack Security Guide openstack-training training-guide OpenStack Training Guide openstack-user user-guide OpenStack End User Guide openstack-user-admin user-guide-admin OpenStack Admin User Guide glossary NEW OpenStack Glossary bug: #1220407 Change-Id: Id5ffc774b966ba7b9a591743a877aa10ab3094c7 author: diane fleming
38 lines
2.7 KiB
XML
38 lines
2.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<section xmlns="http://docbook.org/ns/docbook"
|
|
xmlns:xi="http://www.w3.org/2001/XInclude"
|
|
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
|
xml:id="example-usage">
|
|
<title>keystone command-line client example usage</title>
|
|
<para>Before you can use keystone client commands, you must
|
|
download and source an OpenStack RC file. For information, see
|
|
the <citetitle>OpenStack Admin User Guide</citetitle>.</para>
|
|
<para>The keystone command-line client uses the following
|
|
syntax:</para>
|
|
<screen><prompt>$</prompt> <userinput>keystone <replaceable>PARAMETER</replaceable> <replaceable>COMMAND</replaceable> <replaceable>ARGUMENT</replaceable></userinput></screen>
|
|
<para>For example, you can run the <command>user-list</command>
|
|
and <command>tenant-create</command> commands, as
|
|
follows:</para>
|
|
<screen><computeroutput># Using OS_SERVICE_ENDPOINT and OS_SERVICE_TOKEN environment variables</computeroutput>
|
|
<prompt>$</prompt> <userinput>export OS_SERVICE_ENDPOINT=http://127.0.0.1:5000/v2.0/</userinput>
|
|
<prompt>$</prompt> <userinput>export OS_SERVICE_TOKEN=secrete_token</userinput>
|
|
<prompt>$</prompt> <userinput>keystone user-list</userinput>
|
|
<prompt>$</prompt> <userinput>keystone tenant-create --name demo</userinput>
|
|
<computeroutput># Using --os-token and os-endpoint parameters</computeroutput>
|
|
<prompt>$</prompt> <userinput>keystone --os-token <replaceable>token</replaceable> --os-endpoint <replaceable>endpoint</replaceable> user-list</userinput>
|
|
<prompt>$</prompt> <userinput>keystone --os-token <replaceable>token</replaceable> --os-endpoint <replaceable>endpoint</replaceable> tenant-create --name demo</userinput>
|
|
<computeroutput># Using OS_USERNAME, OS_PASSWORD, and OS_TENANT_NAME environment variables</computeroutput>
|
|
<prompt>$</prompt> <userinput>export OS_USERNAME=admin</userinput>
|
|
<prompt>$</prompt> <userinput>export OS_PASSWORD=secrete</userinput>
|
|
<prompt>$</prompt> <userinput>export OS_TENANT_NAME=admin</userinput>
|
|
<prompt>$</prompt> <userinput>keystone user-list</userinput>
|
|
<prompt>$</prompt> <userinput>keystone tenant-create --name demo</userinput>
|
|
<computeroutput># Using tenant_id parameter</computeroutput>
|
|
<prompt>$</prompt> <userinput>keystone user-list --tenant_id <replaceable>id</replaceable></userinput>
|
|
<computeroutput># Using --name, --description, and --enabled parameters</computeroutput>
|
|
<prompt>$</prompt> <userinput>keystone tenant-create --name demo --description "demo tenant" --enabled true</userinput></screen>
|
|
<para>For information about using the keystone client commands to
|
|
create and manage users, roles, and projects, see the
|
|
<citetitle>OpenStack Admin User Guide</citetitle>.</para>
|
|
</section>
|