replace all occurrences of iteritems() with items() as it was removed in Python 3

This commit is contained in:
Julian Labus 2018-08-07 10:32:23 +02:00
parent 30b5a5e4eb
commit 1af52aad51
No known key found for this signature in database
GPG key ID: 8AF209F2C6B3572A
9 changed files with 9 additions and 9 deletions

View file

@ -60,7 +60,7 @@ ip -6 rule add from all iif {{ mesh.id }}br type unreachable priority 61
{% endfor %}
ip -4 rule add from all iif icvpn type unreachable priority 61
ip -4 rule add from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
{% for server_id, server_value in ffrl_exit_server.iteritems() %}
{% for server_id, server_value in ffrl_exit_server.items() %}
ip -4 rule add from all iif {{ server_id }} type unreachable priority 61
ip -6 rule add from all iif {{ server_id }} type unreachable priority 61
{% endfor %}

View file

@ -60,7 +60,7 @@ ip -6 rule del from all iif {{ mesh.id }}br type unreachable priority 61
{% endfor %}
ip -4 rule del from all iif icvpn type unreachable priority 61
ip -4 rule del from all iif {{ ansible_default_ipv4.interface }} type unreachable priority 61
{% for server_id, server_value in ffrl_exit_server.iteritems() %}
{% for server_id, server_value in ffrl_exit_server.items() %}
ip -4 rule del from all iif {{ server_id }} type unreachable priority 61
ip -6 rule del from all iif {{ server_id }} type unreachable priority 61
{% endfor %}

View file

@ -18,7 +18,7 @@ function is_ffrl_nat() {
function is_ffrl_tunnel_nets() {
return net ~ [
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
{% for peer_id, peer_value in ffrl_exit_server.items() %}
{{ peer_value.tunnel_ipv4_network }}{{ "," if not loop.last else "" }}
{% endfor %}
];

View file

@ -2,7 +2,7 @@
# {{ ansible_managed }}
#
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
{% for peer_id, peer_value in ffrl_exit_server.items() %}
protocol bgp '{{ peer_id }}' from ffrl_uplink {
source address {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }};
neighbor {{ peer_value.tunnel_ipv4_network | ipaddr('net') | ipaddr('address') }} as ffrl_as;

View file

@ -20,7 +20,7 @@ function is_ffrl_public_nets() {
function is_ffrl_tunnel_nets() {
return net ~ [
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
{% for peer_id, peer_value in ffrl_exit_server.items() %}
{{ peer_value.tunnel_ipv6_network }}{{ "," if not loop.last else "" }}
{% endfor %}
];

View file

@ -2,7 +2,7 @@
# {{ ansible_managed }}
#
{% for peer_id, peer_value in ffrl_exit_server.iteritems() %}
{% for peer_id, peer_value in ffrl_exit_server.items() %}
protocol bgp '{{ peer_id }}' from ffrl_uplink {
source address {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }};
neighbor {{ peer_value.tunnel_ipv6_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }} as ffrl_as;

View file

@ -10,7 +10,7 @@ protocol bgp mwu_{{ gateway.rsplit('.freifunk-mwu.de')[0] }} from ibgp_mwu {
{% endif %}
{% endfor %}
{% for item, value in bgp_mwu_servers.iteritems() %}
{% for item, value in bgp_mwu_servers.items() %}
{% if item != inventory_hostname_short %}
protocol bgp mwu_{{ item }} from ibgp_mwu {
neighbor {{ value.ipv4 }} as mwu_as;

View file

@ -10,7 +10,7 @@ protocol bgp mwu_{{ gateway.rsplit('.freifunk-mwu.de')[0] }} from ibgp_mwu {
{% endif %}
{% endfor %}
{% for item, value in bgp_mwu_servers.iteritems() %}
{% for item, value in bgp_mwu_servers.items() %}
{% if item != inventory_hostname_short %}
protocol bgp mwu_{{ item }} from ibgp_mwu {
neighbor {{ value.ipv6 }} as mwu_as;

View file

@ -11,7 +11,7 @@ global:
{% if prometheus_rule_files is defined %}
# Rule files specifies a list of files from which rules are read.
rule_files:
{% for (key, value) in prometheus_rule_files.iteritems() %}
{% for (key, value) in prometheus_rule_files.items() %}
- {{ prometheus_rule_path }}/{{ value.dest }}
{% endfor %}
{% endif %}