Merge "Change deprecated CLI arguments"
This commit is contained in:
commit
58ff2bc511
@ -724,7 +724,7 @@ To test this, you should now be able to start ``keystone-all`` and use the
|
||||
Keystone Client to list your tenants (which should successfully return an
|
||||
empty list from your new database)::
|
||||
|
||||
$ keystone --token ADMIN --endpoint http://127.0.0.1:35357/v2.0/ tenant-list
|
||||
$ keystone --os-token ADMIN --os-endpoint http://127.0.0.1:35357/v2.0/ tenant-list
|
||||
+----+------+---------+
|
||||
| id | name | enabled |
|
||||
+----+------+---------+
|
||||
@ -732,10 +732,10 @@ empty list from your new database)::
|
||||
|
||||
.. NOTE::
|
||||
|
||||
We're providing the default SERVICE_TOKEN and SERVICE_ENDPOINT values from
|
||||
``keystone.conf`` to connect to the Keystone service. If you changed those
|
||||
values, or deployed Keystone to a different endpoint, you will need to
|
||||
change the provided command accordingly.
|
||||
We're providing the default OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT values
|
||||
from ``keystone.conf`` to connect to the Keystone service. If you changed
|
||||
those values, or deployed Keystone to a different endpoint, you will need
|
||||
to change the provided command accordingly.
|
||||
|
||||
Initializing Keystone
|
||||
=====================
|
||||
@ -773,9 +773,9 @@ Authenticating with a Token
|
||||
|
||||
To use Keystone with a token, set the following flags:
|
||||
|
||||
* ``--endpoint SERVICE_ENDPOINT``: allows you to specify the Keystone endpoint
|
||||
* ``--os-endpoint OS_SERVICE_ENDPOINT``: allows you to specify the Keystone endpoint
|
||||
to communicate with. The default endpoint is ``http://localhost:35357/v2.0``
|
||||
* ``--token SERVICE_TOKEN``: your service token
|
||||
* ``--os-token OS_SERVICE_TOKEN``: your service token
|
||||
|
||||
To administer a Keystone endpoint, your token should be either belong to a user
|
||||
with the ``admin`` role, or, if you haven't created one yet, should be equal to
|
||||
@ -784,8 +784,8 @@ the value defined by ``[DEFAULT] admin_token`` in your ``keystone.conf``.
|
||||
You can also set these variables in your environment so that they do not need
|
||||
to be passed as arguments each time::
|
||||
|
||||
$ export SERVICE_ENDPOINT=http://localhost:35357/v2.0
|
||||
$ export SERVICE_TOKEN=ADMIN
|
||||
$ export OS_SERVICE_ENDPOINT=http://localhost:35357/v2.0
|
||||
$ export OS_SERVICE_TOKEN=ADMIN
|
||||
|
||||
Authenticating with a Password
|
||||
------------------------------
|
||||
@ -880,14 +880,14 @@ provide additional (often optional) information. For example, the command
|
||||
``user-list`` and ``tenant-create`` can be invoked as follows::
|
||||
|
||||
# Using token auth env variables
|
||||
export SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/
|
||||
export SERVICE_TOKEN=secrete_token
|
||||
export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/
|
||||
export OS_SERVICE_TOKEN=secrete_token
|
||||
keystone user-list
|
||||
keystone tenant-create --name=demo
|
||||
|
||||
# Using token auth flags
|
||||
keystone --token=secrete --endpoint=http://127.0.0.1:35357/v2.0/ user-list
|
||||
keystone --token=secrete --endpoint=http://127.0.0.1:35357/v2.0/ tenant-create --name=demo
|
||||
keystone --os-token=secrete --os-endpoint=http://127.0.0.1:35357/v2.0/ user-list
|
||||
keystone --os-token=secrete --os-endpoint=http://127.0.0.1:35357/v2.0/ tenant-create --name=demo
|
||||
|
||||
# Using user + password + tenant_name env variables
|
||||
export OS_USERNAME=admin
|
||||
|
@ -109,7 +109,7 @@ Initial Sample Data
|
||||
There is an included script which is helpful in setting up some initial sample
|
||||
data for use with keystone::
|
||||
|
||||
$ SERVICE_TOKEN=ADMIN tools/with_venv.sh tools/sample_data.sh
|
||||
$ OS_SERVICE_TOKEN=ADMIN tools/with_venv.sh tools/sample_data.sh
|
||||
|
||||
Notice it requires a service token read from an environment variable for
|
||||
authentication. The default value "ADMIN" is from the ``admin_token``
|
||||
@ -118,7 +118,7 @@ option in the ``[DEFAULT]`` section in ``etc/keystone.conf``.
|
||||
Once run, you can see the sample data that has been created by using the
|
||||
`python-keystoneclient`_ command-line interface::
|
||||
|
||||
$ tools/with_venv.sh keystone --token ADMIN --endpoint http://127.0.0.1:35357/v2.0/ user-list
|
||||
$ tools/with_venv.sh keystone --os-token ADMIN --os-endpoint http://127.0.0.1:35357/v2.0/ user-list
|
||||
|
||||
Running Tests
|
||||
=============
|
||||
|
@ -19,8 +19,8 @@
|
||||
# This script is based on the original DevStack keystone_data.sh script.
|
||||
#
|
||||
# It demonstrates how to bootstrap Keystone with an administrative user
|
||||
# using the SERVICE_TOKEN and SERVICE_ENDPOINT environment variables
|
||||
# and the administrative API. It will get the admin_token (SERVICE_TOKEN)
|
||||
# using the OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT environment variables
|
||||
# and the administrative API. It will get the admin_token (OS_SERVICE_TOKEN)
|
||||
# and admin_port from keystone.conf if available.
|
||||
#
|
||||
# Disable creation of endpoints by setting DISABLE_ENDPOINTS environment variable.
|
||||
@ -71,14 +71,14 @@ if [[ -r "$KEYSTONE_CONF" ]]; then
|
||||
CONFIG_ADMIN_PORT=$(sed 's/[[:space:]]//g' $KEYSTONE_CONF | grep ^admin_port= | cut -d'=' -f2)
|
||||
fi
|
||||
|
||||
export SERVICE_TOKEN=${SERVICE_TOKEN:-$CONFIG_SERVICE_TOKEN}
|
||||
if [[ -z "$SERVICE_TOKEN" ]]; then
|
||||
export OS_SERVICE_TOKEN=${OS_SERVICE_TOKEN:-$CONFIG_SERVICE_TOKEN}
|
||||
if [[ -z "$OS_SERVICE_TOKEN" ]]; then
|
||||
echo "No service token found."
|
||||
echo "Set SERVICE_TOKEN manually from keystone.conf admin_token."
|
||||
echo "Set OS_SERVICE_TOKEN manually from keystone.conf admin_token."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SERVICE_ENDPOINT=${SERVICE_ENDPOINT:-http://$CONTROLLER_PUBLIC_ADDRESS:${CONFIG_ADMIN_PORT:-35357}/v2.0}
|
||||
export OS_SERVICE_ENDPOINT=${OS_SERVICE_ENDPOINT:-http://$CONTROLLER_PUBLIC_ADDRESS:${CONFIG_ADMIN_PORT:-35357}/v2.0}
|
||||
|
||||
function get_id () {
|
||||
echo `"$@" | grep ' id ' | awk '{print $4}'`
|
||||
|
Loading…
Reference in New Issue
Block a user