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 cc6fdb2fac)
This commit is contained in:
Jan Stodola 2019-01-25 18:32:41 +01:00 committed by Brian C. Lane
parent d23ec308d4
commit 43a79746fc
2 changed files with 5 additions and 2 deletions

View File

@ -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'`

View File

@ -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!"