Update exported variables for openstack client

When using openstack client to populate an initial keystone
deployment, instead of the former keystone client, the env.
variables needed are OS_TOKEN and OS_URL instead of the
previous OS_SERVICE_TOKEN and OS_SERVICE_ENDPOINT

Change-Id: I79dcd56896945267cf1c8ff4378ffff63048e155
This commit is contained in:
Ghe Rivero
2015-08-01 05:11:07 +02:00
parent 4ff9e969a8
commit e614b29940
2 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ data for use with keystone:
.. code-block:: bash
$ OS_SERVICE_TOKEN=ADMIN tools/with_venv.sh tools/sample_data.sh
$ OS_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``
+7 -7
View File
@@ -19,9 +19,9 @@
# This script is based on the original DevStack keystone_data.sh script.
#
# It demonstrates how to bootstrap Keystone with an administrative user
# 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.
# using the OS_TOKEN and OS_URL environment variables and the administrative
# API. It will get the admin_token (OS_TOKEN) and admin_port from
# keystone.conf if available.
#
# Disable creation of endpoints by setting DISABLE_ENDPOINTS environment variable.
# Use this with the Catalog Templated backend.
@@ -85,14 +85,14 @@ if [[ -r "$KEYSTONE_CONF" ]]; then
fi
fi
export OS_SERVICE_TOKEN=${OS_SERVICE_TOKEN:-$CONFIG_SERVICE_TOKEN}
if [[ -z "$OS_SERVICE_TOKEN" ]]; then
export OS_TOKEN=${OS_TOKEN:-$CONFIG_SERVICE_TOKEN}
if [[ -z "$OS_TOKEN" ]]; then
echo "No service token found."
echo "Set OS_SERVICE_TOKEN manually from keystone.conf admin_token."
echo "Set OS_TOKEN manually from keystone.conf admin_token."
exit 1
fi
export OS_SERVICE_ENDPOINT=${OS_SERVICE_ENDPOINT:-http://$CONTROLLER_PUBLIC_ADDRESS:${CONFIG_ADMIN_PORT:-35357}/v2.0}
export OS_URL=${OS_URL:-http://$CONTROLLER_PUBLIC_ADDRESS:${CONFIG_ADMIN_PORT:-35357}/v2.0}
function get_id () {
echo `"$@" | grep ' id ' | awk '{print $4}'`