Commit 7736231c authored by Bryton Lacquement's avatar Bryton Lacquement 🚪

template-replicated.cfg.in: add Python 3 support

parent bedd5d9e
...@@ -30,7 +30,7 @@ md5sum = 0bbe16f3d805afd880a251a4f40ecaf1 ...@@ -30,7 +30,7 @@ md5sum = 0bbe16f3d805afd880a251a4f40ecaf1
[template-replicated] [template-replicated]
filename = template-replicated.cfg.in filename = template-replicated.cfg.in
md5sum = 290b380fe3da8736642bc10a8b1163d1 md5sum = 815fd8f7c42b9cf59b286b0fe77fa76d
[template-parts] [template-parts]
filename = template-parts.cfg.in filename = template-parts.cfg.in
......
...@@ -41,7 +41,7 @@ config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}} ...@@ -41,7 +41,7 @@ config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}
config-name = {{namebase}}0 config-name = {{namebase}}0
# Bubble up all the instance parameters to the requested export instance. # Bubble up all the instance parameters to the requested export instance.
{% if slapparameter_dict is defined %} {% if slapparameter_dict is defined %}
{% for parameter_name, parameter_value in slapparameter_dict.items() %} {% for parameter_name, parameter_value in six.iteritems(slapparameter_dict) %}
{% if parameter_value is string %} {% if parameter_value is string %}
config-{{parameter_name}} = {{ parameter_value.split('\n') | join('\n ') }} config-{{parameter_name}} = {{ parameter_value.split('\n') | join('\n ') }}
{% else %} {% else %}
...@@ -49,7 +49,7 @@ config-{{parameter_name}} = {{ parameter_value }} ...@@ -49,7 +49,7 @@ config-{{parameter_name}} = {{ parameter_value }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% for key, value in monitor_dict.iteritems() -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% if sla_parameter_dict == {} -%} {% if sla_parameter_dict == {} -%}
...@@ -67,7 +67,7 @@ sla-mode = unique_by_network ...@@ -67,7 +67,7 @@ sla-mode = unique_by_network
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%} {% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%} {% endif -%}
{% endfor -%} {% endfor -%}
{% for key, value in sla_dict.iteritems() -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% endif -%} {% endif -%}
...@@ -101,7 +101,7 @@ config-number = {{id}} ...@@ -101,7 +101,7 @@ config-number = {{id}}
config-name = {{namebase}}{{id}} config-name = {{namebase}}{{id}}
config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key} config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id} config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id}
{% for key, value in monitor_dict.iteritems() -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% if sla_parameter_dict == {} -%} {% if sla_parameter_dict == {} -%}
...@@ -119,7 +119,7 @@ sla-mode = unique_by_network ...@@ -119,7 +119,7 @@ sla-mode = unique_by_network
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%} {% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%} {% endif -%}
{% endfor -%} {% endfor -%}
{% for key, value in sla_dict.iteritems() -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
{% endif %} {% endif %}
...@@ -202,7 +202,7 @@ software-type = pull-backup ...@@ -202,7 +202,7 @@ software-type = pull-backup
name = PBS ({{namebase}} / {{id}}) name = PBS ({{namebase}} / {{id}})
config-ignore-known-hosts-file = ${slap-parameter:ignore-known-hosts-file} config-ignore-known-hosts-file = ${slap-parameter:ignore-known-hosts-file}
config-monitor-title = PBS ${slap-connection:computer-id}-{{namebase}}-{{id}} config-monitor-title = PBS ${slap-connection:computer-id}-{{namebase}}-{{id}}
{% for key, value in monitor_dict.iteritems() -%} {% for key, value in six.iteritems(monitor_dict) -%}
config-{{ key }} = {{ value }} config-{{ key }} = {{ value }}
{% endfor -%} {% endfor -%}
return = ssh-key notification-url feeds-url {{ monitor_return }} return = ssh-key notification-url feeds-url {{ monitor_return }}
...@@ -222,7 +222,7 @@ sla-mode = unique_by_network ...@@ -222,7 +222,7 @@ sla-mode = unique_by_network
{% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%} {% do sla_dict.__setitem__(key[sla_key_secondary_length:], sla_parameter_dict.get(key)) -%}
{% endif -%} {% endif -%}
{% endfor -%} {% endfor -%}
{% for key, value in sla_dict.iteritems() -%} {% for key, value in six.iteritems(sla_dict) -%}
sla-{{ key }} = {{ value }} sla-{{ key }} = {{ value }}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
......
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