@@ -175,6 +175,10 @@ function configure_tempest {
175175
176176 password=${ADMIN_PASSWORD:- secrete}
177177
178+ # Do we want to make a configuration where Tempest has admin on
179+ # the cloud. We don't always want to so that we can ensure Tempest
180+ # would work on a public cloud.
181+ TEMPEST_HAS_ADMIN=$( trueorfalse True TEMPEST_HAS_ADMIN)
178182 # See files/keystone_data.sh and stack.sh where admin, demo and alt_demo
179183 # user and tenant are set up...
180184 ADMIN_USERNAME=${ADMIN_USERNAME:- admin}
@@ -292,11 +296,13 @@ function configure_tempest {
292296 iniset $TEMPEST_CONFIG identity alt_username $ALT_USERNAME
293297 iniset $TEMPEST_CONFIG identity alt_password " $password "
294298 iniset $TEMPEST_CONFIG identity alt_tenant_name $ALT_TENANT_NAME
295- iniset $TEMPEST_CONFIG identity admin_username $ADMIN_USERNAME
296- iniset $TEMPEST_CONFIG identity admin_password " $password "
297- iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME
298- iniset $TEMPEST_CONFIG identity admin_tenant_id $ADMIN_TENANT_ID
299- iniset $TEMPEST_CONFIG identity admin_domain_name $ADMIN_DOMAIN_NAME
299+ if [[ " $TEMPEST_HAS_ADMIN " == " True" ]]; then
300+ iniset $TEMPEST_CONFIG identity admin_username $ADMIN_USERNAME
301+ iniset $TEMPEST_CONFIG identity admin_password " $password "
302+ iniset $TEMPEST_CONFIG identity admin_tenant_name $ADMIN_TENANT_NAME
303+ iniset $TEMPEST_CONFIG identity admin_tenant_id $ADMIN_TENANT_ID
304+ iniset $TEMPEST_CONFIG identity admin_domain_name $ADMIN_DOMAIN_NAME
305+ fi
300306 iniset $TEMPEST_CONFIG identity auth_version ${TEMPEST_AUTH_VERSION:- v2}
301307 if is_ssl_enabled_service " key" || is_service_enabled tls-proxy; then
302308 iniset $TEMPEST_CONFIG identity ca_certificates_file $SSL_BUNDLE_FILE
@@ -310,6 +316,9 @@ function configure_tempest {
310316 fi
311317
312318 # Auth
319+ #
320+ #
321+ TEMPEST_ALLOW_TENANT_ISOLATION=${TEMPEST_ALLOW_TENANT_ISOLATION:- $TEMPEST_HAS_ADMIN }
313322 iniset $TEMPEST_CONFIG auth allow_tenant_isolation ${TEMPEST_ALLOW_TENANT_ISOLATION:- True}
314323 iniset $TEMPEST_CONFIG auth tempest_roles " Member"
315324
0 commit comments