Commit 6d947f6c authored by Rafael Monnerat's avatar Rafael Monnerat

monitor-sr: Fix templates if the instance has no slave.

parent 6a0c1569
...@@ -78,7 +78,7 @@ Alias /{{ monitor_private_hash }} {{ directory.get('private-directory') }}/ ...@@ -78,7 +78,7 @@ Alias /{{ monitor_private_hash }} {{ directory.get('private-directory') }}/
</Files> </Files>
</Directory> </Directory>
{% set slave_list = json_module.loads(slave_information.get('slave_instance_list')) -%} {% set slave_list = json_module.loads(slave_information.get('slave_instance_list', '{}')) -%}
{% for slave_instance in slave_list -%} {% for slave_instance in slave_list -%}
alias /{{ slave_instance.get('slave_reference') }} {{ directory.get('private-directory') }}/network-user-logs/{{ slave_instance.get('slave_reference') }} alias /{{ slave_instance.get('slave_reference') }} {{ directory.get('private-directory') }}/network-user-logs/{{ slave_instance.get('slave_reference') }}
......
{% set slave_list = json_module.loads(slave_information.get('slave_instance_list')) -%} {% set slave_list = json_module.loads(slave_information.get('slave_instance_list', '{}')) -%}
{ {
"id" : "id" :
[ [
......
...@@ -45,7 +45,7 @@ mode = 0644 ...@@ -45,7 +45,7 @@ mode = 0644
recipe = slapos.recipe.build:download recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/json-test-template.json.in.jinja2 url = ${:_profile_base_location_}/json-test-template.json.in.jinja2
destination = ${buildout:directory}/json-test-template.json.in.jinja2 destination = ${buildout:directory}/json-test-template.json.in.jinja2
md5sum = f0f7803bfee25b051ea3432119d9e737 md5sum = ee38d92178576359deb013ca6bd22299
mode = 0644 mode = 0644
...@@ -56,7 +56,7 @@ md5sum = 876f18b159fbd9325332d0f42e9172ac ...@@ -56,7 +56,7 @@ md5sum = 876f18b159fbd9325332d0f42e9172ac
[monitor-httpd-template] [monitor-httpd-template]
url = ${:_profile_base_location_}/${:filename} url = ${:_profile_base_location_}/${:filename}
md5sum = 22133e9aa5f52d7818b2fd1fd0415a00 md5sum = e89b66a90409bb8e9099aa197803d337
[network-bench-cfg] [network-bench-cfg]
recipe = slapos.recipe.template recipe = slapos.recipe.template
......
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