Files
training-labs/labs/osbash/scripts/test/get_auth_token.sh
Julen Larrucea b8fecd235b Made get_auth_token.sh executable.
This is a trivial change. If the file is not executable, the test-once
script does not work.

Change-Id: I1aa99e262e96a2aa88e542b57070331a5a0f29c8
2016-11-03 20:43:01 +00:00

34 lines
904 B
Bash
Executable File

#!/usr/bin/env bash
set -o errexit -o nounset
TOP_DIR=$(cd "$(dirname "$0")/.." && pwd)
source "$TOP_DIR/config/paths"
source "$CONFIG_DIR/credentials"
source "$CONFIG_DIR/openstack"
source "$LIB_DIR/functions.guest.sh"
exec_logfile
indicate_current_auto
#------------------------------------------------------------------------------
# Use OpenStack client environment script
# http://docs.openstack.org/mitaka/install-guide-ubuntu/keystone-openrc.html
#------------------------------------------------------------------------------
# Test in subshell enviroment to keep our environment clean
(
echo "Sourcing the admin credentials."
source "$CONFIG_DIR/admin-openstackrc.sh"
echo "Requesting an authentication token."
openstack token issue
)
(
echo "Sourcing the demo user credentials."
source "$CONFIG_DIR/demo-openstackrc.sh"
echo "Requesting an authentication token."
openstack token issue
)