Browse code

Merge "Add support for heat resource templates"

Jenkins authored on 2013/08/30 02:12:15
Showing 1 changed files
... ...
@@ -33,6 +33,7 @@ HEAT_AUTH_CACHE_DIR=${HEAT_AUTH_CACHE_DIR:-/var/cache/heat}
33 33
 HEAT_STANDALONE=`trueorfalse False $HEAT_STANDALONE`
34 34
 HEAT_CONF_DIR=/etc/heat
35 35
 HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
36
+HEAT_TEMPLATES_DIR=$HEAT_CONF_DIR/templates
36 37
 
37 38
 # Functions
38 39
 # ---------
... ...
@@ -42,6 +43,7 @@ HEAT_ENV_DIR=$HEAT_CONF_DIR/environment.d
42 42
 function cleanup_heat() {
43 43
     sudo rm -rf $HEAT_AUTH_CACHE_DIR
44 44
     sudo rm -rf $HEAT_ENV_DIR
45
+    sudo rm -rf $HEAT_TEMPLATES_DIR
45 46
 }
46 47
 
47 48
 # configure_heat() - Set config files, create data dirs, etc
... ...
@@ -163,6 +165,12 @@ function configure_heat() {
163 163
     # copy the default environment
164 164
     cp $HEAT_DIR/etc/heat/environment.d/* $HEAT_ENV_DIR/
165 165
 
166
+    # heat template resources.
167
+    sudo mkdir -p $HEAT_TEMPLATES_DIR
168
+    sudo chown $STACK_USER $HEAT_TEMPLATES_DIR
169
+    # copy the default templates
170
+    cp $HEAT_DIR/etc/heat/templates/* $HEAT_TEMPLATES_DIR/
171
+
166 172
 }
167 173
 
168 174
 # init_heat() - Initialize database