Greater flexibility to timer templating
Allows for the combining of multiple directives of the same type as the spec allows. An options value can now be specified as a list. Particularly useful for specifying multiple onCalendar directives. Change-Id: I2f0408a47861560b7813eeba7b3f2ce682823e1e
This commit is contained in:
parent
7461a113ad
commit
18a05c1a0d
@ -6,7 +6,13 @@ Description={{ item.service_name }} timer
|
|||||||
[Timer]
|
[Timer]
|
||||||
{% if item.timer.options is defined %}
|
{% if item.timer.options is defined %}
|
||||||
{% for key, values in item.timer.options.items() %}
|
{% for key, values in item.timer.options.items() %}
|
||||||
|
{% if values is iterable and values is not string %}
|
||||||
|
{% for value in values %}
|
||||||
|
{{ key }}={{ value }}
|
||||||
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
{{ key }}={{ values }}
|
{{ key }}={{ values }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% set OnCalendar = [] %}
|
{% set OnCalendar = [] %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user