Add support for heat enviroments
heat now has global environments that make it easy
to rename and customise resource behaviour. These
are yaml files that need to be in /etc/heat/environment.d/
Change-Id: I5a08c6ce8f5d7222f79aab2be0903ba783c10aa1
diff --git a/lib/heat b/lib/heat
index fb4002b..5d6c6aa 100644
--- a/lib/heat
+++ b/lib/heat
@@ -31,6 +31,8 @@
HEATCLIENT_DIR=$DEST/python-heatclient
HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
+HEAT_CONF_DIR=/etc/heat
+HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
# Functions
# ---------
@@ -39,13 +41,13 @@
# runs that a clean run would need to clean up
function cleanup_heat() {
sudo rm -rf $HEAT_AUTH_CACHE_DIR
+ sudo rm -rf $HEAT_ENV_DIR
}
# configure_heat() - Set config files, create data dirs, etc
function configure_heat() {
setup_develop $HEAT_DIR
- HEAT_CONF_DIR=/etc/heat
if [[ ! -d $HEAT_CONF_DIR ]]; then
sudo mkdir -p $HEAT_CONF_DIR
fi
@@ -155,6 +157,12 @@
iniset_rpc_backend heat $HEAT_API_CW_CONF DEFAULT
+ # heat environment
+ sudo mkdir -p $HEAT_ENV_DIR
+ sudo chown $STACK_USER $HEAT_ENV_DIR
+ # copy the default environment
+ cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/
+
}
# init_heat() - Initialize database