Merge "Fix account rc files creation for Swift users"

This commit is contained in:
Jenkins 2014-10-13 15:20:46 +00:00 committed by Gerrit Code Review
commit f854c730a5
2 changed files with 7 additions and 4 deletions

View File

@ -557,9 +557,11 @@ function create_swift_disk {
function create_swift_accounts {
# Defines specific passwords used by tools/create_userrc.sh
local swiftusertest1_password=testing
local swiftusertest2_password=testing2
local swiftusertest3_password=testing3
# As these variables are used by create_userrc.sh, they must be exported
# The _password suffix is expected by create_userrc.sh
export swiftusertest1_password=testing
export swiftusertest2_password=testing2
export swiftusertest3_password=testing3
KEYSTONE_CATALOG_BACKEND=${KEYSTONE_CATALOG_BACKEND:-sql}

View File

@ -254,7 +254,8 @@ if [ $MODE != "create" ]; then
# Checks for a specific password defined for an user.
# Example for an username johndoe: JOHNDOE_PASSWORD=1234
eval SPECIFIC_UPASSWORD="\$${USER_NAME^^}_PASSWORD"
# This mechanism is used by lib/swift
eval SPECIFIC_UPASSWORD="\$${user_name}_password"
if [ -n "$SPECIFIC_UPASSWORD" ]; then
USER_PASS=$SPECIFIC_UPASSWORD
fi