Fixes LP #996571 - Alternate Tempest user
Adds an alternate user to Keystone for Tempest
Tempest has a number of tests that are skipped if
the compute.alt_username is the same as compute.username
or None. Here, we modify files/keystone_data.sh to add
an additional regular user called alt_demo if Tempest
is enabled in stackrc. We also make corresponding changes
to the tools/configure_tempest.sh script to make use
of this alternate user credential
Change-Id: I551f3b378f843c62fffcf6effa916056708d54d3
diff --git a/tools/configure_tempest.sh b/tools/configure_tempest.sh
index a84c42b..2c06934 100755
--- a/tools/configure_tempest.sh
+++ b/tools/configure_tempest.sh
@@ -93,6 +93,10 @@
# copy every time, because the image UUIDS are going to change
cp $TEMPEST_CONF.tpl $TEMPEST_CONF
+ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
+ADMIN_PASSWORD=${ADMIN_PASSWORD:-secrete}
+ADMIN_TENANT_NAME=${ADMIN_TENANT:-admin}
+
IDENTITY_USE_SSL=${IDENTITY_USE_SSL:-False}
IDENTITY_HOST=${IDENTITY_HOST:-127.0.0.1}
IDENTITY_PORT=${IDENTITY_PORT:-5000}
@@ -107,22 +111,18 @@
# OS_USERNAME et all should be defined in openrc.
OS_USERNAME=${OS_USERNAME:-demo}
OS_TENANT_NAME=${OS_TENANT_NAME:-demo}
-OS_PASSWORD=${OS_PASSWORD:-secrete}
+OS_PASSWORD=${OS_PASSWORD:$ADMIN_PASSWORD}
-# TODO(jaypipes): Support multiple regular user accounts instead
-# of using the same regular user account for the alternate user...
-ALT_USERNAME=$OS_USERNAME
+# See files/keystone_data.sh where alt_demo user
+# and tenant are set up...
+ALT_USERNAME=${ALT_USERNAME:-alt_demo}
+ALT_TENANT_NAME=${ALT_TENANT_NAME:-alt_demo}
ALT_PASSWORD=$OS_PASSWORD
-ALT_TENANT_NAME=$OS_TENANT_NAME
# TODO(jaypipes): Support configurable flavor refs here...
FLAVOR_REF=1
FLAVOR_REF_ALT=2
-ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
-ADMIN_PASSWORD=${ADMIN_PASSWORD:-secrete}
-ADMIN_TENANT_NAME=${ADMIN_TENANT:-admin}
-
# Do any of the following need to be configurable?
COMPUTE_CATALOG_TYPE=compute
COMPUTE_CREATE_IMAGE_ENABLED=True