@@ -325,6 +325,24 @@ function configure_tempest {
325325 if [[ " $OFFLINE " != " True" ]]; then
326326 tox -revenv --notest
327327 fi
328+
329+ # Auth
330+ iniset $TEMPEST_CONFIG auth tempest_roles " Member"
331+ if [[ $TEMPEST_USE_TEST_ACCOUNTS == " True" ]]; then
332+ if [[ $TEMPEST_HAS_ADMIN == " True" ]]; then
333+ tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password " $password " --os-tenant-name $admin_tenant_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
334+ else
335+ tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password " $password " --os-tenant-name $admin_tenant_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
336+ fi
337+ iniset $TEMPEST_CONFIG auth use_dynamic_credentials False
338+ iniset $TEMPEST_CONFIG auth test_accounts_file " etc/accounts.yaml"
339+ elif [[ $TEMPEST_HAS_ADMIN == " False" ]]; then
340+ iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:- False}
341+
342+ else
343+ iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:- True}
344+ fi
345+
328346 # NOTE(mtreinish): Respect constraints on tempest verify-config venv
329347 tox -evenv -- pip install -c $REQUIREMENTS_DIR /upper-constraints.txt -r requirements.txt
330348 tox -evenv -- tempest verify-config -uro $tmp_cfg_file
@@ -553,23 +571,6 @@ function configure_tempest {
553571 iniset $TEMPEST_CONFIG service_available cinder " False"
554572 fi
555573
556- # Auth
557- iniset $TEMPEST_CONFIG auth tempest_roles " Member"
558- if [[ $TEMPEST_USE_TEST_ACCOUNTS == " True" ]]; then
559- if [[ $TEMPEST_HAS_ADMIN == " True" ]]; then
560- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password " $password " --os-tenant-name $admin_tenant_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
561- else
562- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password " $password " --os-tenant-name $admin_tenant_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
563- fi
564- iniset $TEMPEST_CONFIG auth use_dynamic_credentials False
565- iniset $TEMPEST_CONFIG auth test_accounts_file " etc/accounts.yaml"
566- elif [[ $TEMPEST_HAS_ADMIN == " False" ]]; then
567- iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:- False}
568-
569- else
570- iniset $TEMPEST_CONFIG auth use_dynamic_credentials ${TEMPEST_ALLOW_TENANT_ISOLATION:- True}
571- fi
572-
573574 # Restore IFS
574575 IFS=$ifs
575576}
0 commit comments