From 43a79746fccde7f0d92cc5d47a2d69fee3d6ba17 Mon Sep 17 00:00:00 2001 From: Jan Stodola Date: Fri, 25 Jan 2019 18:32:41 +0100 Subject: [PATCH] Export OS_PROJECT_NAME variable in openstack scripts The OS_PROJECT_NAME (or OS_TENANT_NAME) environment variable needs to be defined. Use the OS_PROJECT_NAME, since it is recommended in the documentation instead of the older OS_TENANT_NAME. (cherry picked from commit cc6fdb2fac18a215f4b5bb4d0d7f8741e9e45fb3) --- tests/cleanup/remove_old_objects_openstack.sh | 3 +++ tests/cli/test_build_and_deploy_openstack.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/cleanup/remove_old_objects_openstack.sh b/tests/cleanup/remove_old_objects_openstack.sh index 28c6714d..73925ceb 100755 --- a/tests/cleanup/remove_old_objects_openstack.sh +++ b/tests/cleanup/remove_old_objects_openstack.sh @@ -24,6 +24,9 @@ rlJournalStart rlLogInfo "OS_PASSWORD is configured" fi + export OS_PROJECT_NAME="${OS_PROJECT_NAME:-$OS_USERNAME}" + rlLogInfo "OS_PROJECT_NAME=$OS_PROJECT_NAME" + # VMs older than HOURS_LIMIT will be deleted HOURS_LIMIT="${HOURS_LIMIT:-24}" export TIMESTAMP=`date -u -d "$HOURS_LIMIT hours ago" '+%FT%T'` diff --git a/tests/cli/test_build_and_deploy_openstack.sh b/tests/cli/test_build_and_deploy_openstack.sh index d09b8c84..033a0b8b 100755 --- a/tests/cli/test_build_and_deploy_openstack.sh +++ b/tests/cli/test_build_and_deploy_openstack.sh @@ -26,8 +26,8 @@ rlJournalStart rlLogInfo "OS_USERNAME=$OS_USERNAME" fi - export OS_TENANT_NAME="${OS_TENANT_NAME:-$OS_USERNAME}" - rlLogInfo "OS_TENANT_NAME=$OS_TENANT_NAME" + export OS_PROJECT_NAME="${OS_PROJECT_NAME:-$OS_USERNAME}" + rlLogInfo "OS_PROJECT_NAME=$OS_PROJECT_NAME" if [ -z "$OS_PASSWORD" ]; then rlFail "OS_PASSWORD is empty!"