From 61045ca58a89f9ce3a2c905450885700119a8a6f Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 14 May 2015 11:20:39 -0400 Subject: [PATCH] Write out a clouds.yaml file os-client-config consumes clouds.yaml files, which is now supported in python-openstackclient and shade. It also makes for a non-envvar way of getting config info into functional tests. Change-Id: I1150b943f52f10d19f8434b27e8dde73a14d7843 --- clean.sh | 2 +- stack.sh | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/clean.sh b/clean.sh index 7db519b0dc..86e3d4bec8 100755 --- a/clean.sh +++ b/clean.sh @@ -130,7 +130,7 @@ if [[ -n "$SCREEN_LOGDIR" ]] && [[ -d "$SCREEN_LOGDIR" ]]; then fi # Clean up venvs -DIRS_TO_CLEAN="$WHEELHOUSE ${PROJECT_VENV[@]}" +DIRS_TO_CLEAN="$WHEELHOUSE ${PROJECT_VENV[@]} .config/openstack" rm -rf $DIRS_TO_CLEAN # Clean up files diff --git a/stack.sh b/stack.sh index f20af219a6..dea56437dd 100755 --- a/stack.sh +++ b/stack.sh @@ -1294,6 +1294,29 @@ for i in BASE_SQL_CONN ENABLED_SERVICES HOST_IP LOGFILE \ echo $i=${!i} >>$TOP_DIR/.stackenv done +# Write out a clouds.yaml file +# putting the location into a variable to allow for easier refactoring later +# to make it overridable. There is current no usecase where doing so makes +# sense, so I'm not actually doing it now. +CLOUDS_YAML=~/.config/openstack/clouds.yaml +if [ ! -e $CLOUDS_YAML ]; then + mkdir -p $(dirname $CLOUDS_YAML) + cat >"$CLOUDS_YAML" <>"$CLOUDS_YAML" + fi +fi + # Wrapup configuration # ====================