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:
parent
d23ec308d4
commit
43a79746fc
@ -24,6 +24,9 @@ rlJournalStart
|
|||||||
rlLogInfo "OS_PASSWORD is configured"
|
rlLogInfo "OS_PASSWORD is configured"
|
||||||
fi
|
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
|
# VMs older than HOURS_LIMIT will be deleted
|
||||||
HOURS_LIMIT="${HOURS_LIMIT:-24}"
|
HOURS_LIMIT="${HOURS_LIMIT:-24}"
|
||||||
export TIMESTAMP=`date -u -d "$HOURS_LIMIT hours ago" '+%FT%T'`
|
export TIMESTAMP=`date -u -d "$HOURS_LIMIT hours ago" '+%FT%T'`
|
||||||
|
@ -26,8 +26,8 @@ rlJournalStart
|
|||||||
rlLogInfo "OS_USERNAME=$OS_USERNAME"
|
rlLogInfo "OS_USERNAME=$OS_USERNAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
export OS_TENANT_NAME="${OS_TENANT_NAME:-$OS_USERNAME}"
|
export OS_PROJECT_NAME="${OS_PROJECT_NAME:-$OS_USERNAME}"
|
||||||
rlLogInfo "OS_TENANT_NAME=$OS_TENANT_NAME"
|
rlLogInfo "OS_PROJECT_NAME=$OS_PROJECT_NAME"
|
||||||
|
|
||||||
if [ -z "$OS_PASSWORD" ]; then
|
if [ -z "$OS_PASSWORD" ]; then
|
||||||
rlFail "OS_PASSWORD is empty!"
|
rlFail "OS_PASSWORD is empty!"
|
||||||
|
Loading…
Reference in New Issue
Block a user