Fix iteritems() (#5)
fix: replace deprecated `iteritems` with `items` * Add files via upload Adjusted *.iteritems() to *.items() which will work for Python 3 aswell as Python 2 (since iteritems is outdated for python3 and breaks the salt-state). * Delete Alerts * Delete Probes * Delete Targets * Update Alerts * Update Probes * Update Targets
This commit is contained in:
parent
1cfbec0d38
commit
65b2c516ec
|
@ -4,10 +4,10 @@
|
|||
to = {{ salt['pillar.get']('smokeping:alerts:to', 'alertee@address.somewhere') }}
|
||||
from = {{ salt['pillar.get']('smokeping:alerts:from', 'smokealert@company.xy') }}
|
||||
|
||||
{% for alert, options in smokeping.alerts.iteritems() -%}
|
||||
{% for alert, options in smokeping.alerts.items() -%}
|
||||
{% if options is mapping() %}
|
||||
+ {{ alert }}
|
||||
{% for key, value in options.iteritems() -%}
|
||||
{% for key, value in options.items() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{%- from "smokeping/map.jinja" import smokeping with context -%}
|
||||
*** Probes ***
|
||||
|
||||
{% for probe, settings in smokeping.probes.iteritems() %}
|
||||
{% for probe, settings in smokeping.probes.items() %}
|
||||
+ {{ probe }}
|
||||
{% for key, value in settings.items() %}
|
||||
{{ key }} = {{ value }}
|
||||
|
|
|
@ -8,11 +8,11 @@ title = {{ smokeping.targets.title }}
|
|||
remark = {{ salt['pillar.get']('smokeping:targets:remark', '') }}
|
||||
alerts = {{ salt['pillar.get']('smokeping:targets:alerts', '') }}
|
||||
|
||||
{% for target, options in smokeping.targets.iteritems() -%}
|
||||
{% for target, options in smokeping.targets.items() -%}
|
||||
{% if options is mapping() -%}
|
||||
+ {{ target }}
|
||||
|
||||
{% for key, value in options.iteritems() -%}
|
||||
{% for key, value in options.items() -%}
|
||||
{{ key }} = {{ value }}
|
||||
{% endfor %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue