Commit c5736521 authored by Lisa Casino's avatar Lisa Casino Committed by Xavier Thompson

software/html5as-base: add title parameter

parent 17bc6687
...@@ -23,6 +23,13 @@ context = ...@@ -23,6 +23,13 @@ context =
section parameter_list profile-common section parameter_list profile-common
# partition_ipv6 is the random ipv6 allocated to the local partition # partition_ipv6 is the random ipv6 allocated to the local partition
key partition_ipv6 slap-configuration:ipv6-random key partition_ipv6 slap-configuration:ipv6-random
# slapparameter_dict: dictionary of all parameters
key slapparameter_dict slap-configuration:configuration
jsonkey default_parameter_dict :default-parameters
default-parameters =
{
"title": "Tutorial html5as"
}
[switch-softwaretype] [switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype recipe = slapos.cookbook:switch-softwaretype
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
# Deploy html5as instance # Deploy html5as instance
# #
############################# #############################
# parameter_dict: a dictionary with the default parameters from instance.cfg.in
# replaces the values with the parameters of the instance request if there are any
{% set parameter_dict = dict(default_parameter_dict, **slapparameter_dict) %}
[buildout] [buildout]
parts = parts =
nginx_conf nginx_conf
...@@ -129,3 +133,4 @@ command = rm -r ${html5as:docroot}/*; echo "Hello World!" > ${html5as:docroot}/ ...@@ -129,3 +133,4 @@ command = rm -r ${html5as:docroot}/*; echo "Hello World!" > ${html5as:docroot}/
[publish-connection-information] [publish-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
server_url = ${html5as:access_url} server_url = ${html5as:access_url}
title = Title {{ parameter_dict['title'] }}!
...@@ -27,7 +27,7 @@ recipe = slapos.recipe.template:jinja2 ...@@ -27,7 +27,7 @@ recipe = slapos.recipe.template:jinja2
rendered = ${buildout:directory}/template.cfg rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/${:filename} template = ${:_profile_base_location_}/${:filename}
filename = instance.cfg.in filename = instance.cfg.in
md5sum = 310aab063704794065ee3bc8f81fdc70 md5sum = d6627ddb46e3a60e0ee246ed5a5d5d72
mode = 0644 mode = 0644
context = context =
section buildout buildout section buildout buildout
...@@ -43,7 +43,7 @@ context = ...@@ -43,7 +43,7 @@ context =
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:_update_hash_filename_} url = ${:_profile_base_location_}/${:_update_hash_filename_}
_update_hash_filename_ = instance_html5as.cfg.in _update_hash_filename_ = instance_html5as.cfg.in
md5sum = 9b7ed68551cac5967915979383238669 md5sum = e51dbd14717a9499fba02e338fc3451d
mode = 0644 mode = 0644
[template_nginx_conf] [template_nginx_conf]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment