Skip to content

Commit 6a04d27

Browse files
authored
Merge pull request #144 from medunigraz/master
Use items() instead of iteritems() for Python3 compatibility.
2 parents 03538a8 + 1e41e30 commit 6a04d27

48 files changed

Lines changed: 75 additions & 75 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

linux/files/apt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// apt.conf file managed by salt-minion
22
// DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
33

4-
{%- for key, value in config.iteritems() %}
4+
{%- for key, value in config.items() %}
55
{{ key }} {% if value is iterable and value is not string %}{ {% for entry in value %}"{{ entry }}";{% endfor %} } {% else %}{{ value }};{% endif %}
66
{%- endfor %}
77
{#-

linux/files/cgconfig.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
##
33
## This is cgconfig configuration file is managed by Salt
44
##
5-
{%- for cgroup_name, cg in system.cgroup.group.iteritems() %}
5+
{%- for cgroup_name, cg in system.cgroup.group.items() %}
66
group {{ cgroup_name }} {
7-
{%- for controller_name, controller in cg.controller.iteritems() %}
7+
{%- for controller_name, controller in cg.controller.items() %}
88
{{ controller_name }} {
9-
{%- for v_name, v in controller.iteritems() %}
9+
{%- for v_name, v in controller.items() %}
1010
{{ controller_name }}.{{ v_name }}="{{ v.value }}";
1111
{%- endfor %}
1212

linux/files/cgrules.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
## This is cgrules configuration file is managed by Salt
44
##
55
#<user/group> <controller(s)> <cgroup>
6-
{%- for cgroup_name, cg in system.cgroup.group.iteritems() %}
6+
{%- for cgroup_name, cg in system.cgroup.group.items() %}
77
{%- for subject in cg.mapping.subjects %}
8-
{{ subject }}{% raw %} {% endraw %}{%- for controller_name, controller in cg.controller.iteritems() -%}{{ controller_name }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%}{% raw %} {% endraw %}{{ cgroup_name }}
8+
{{ subject }}{% raw %} {% endraw %}{%- for controller_name, controller in cg.controller.items() -%}{{ controller_name }}{%- if not loop.last -%},{%- endif -%}{%- endfor -%}{% raw %} {% endraw %}{{ cgroup_name }}
99
{%- endfor %}
1010
{%- endfor %}

linux/files/dhclient.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ require {{ section.require|join(",\n ") }};
9595
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
9696
{{ render_section(dhclient) }}
9797
{%- if dhclient.get("interface") -%}
98-
{%- for iface_name, options in dhclient.interface.iteritems() %}
98+
{%- for iface_name, options in dhclient.interface.items() %}
9999
{%- if network.interface.get(iface_name) and network.interface.get(iface_name).enabled == True
100100
and network.interface.get(iface_name).proto == 'dhcp' -%}
101101
interface "{{ iface_name }}" {

linux/files/dpdk_interfaces

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{%- from "linux/map.jinja" import network with context %}
2-
{%- for interface_name, interface in network.interface.iteritems() %}
2+
{%- for interface_name, interface in network.interface.items() %}
33
{%- if 'dpdk' in interface.type and interface.pci is defined %}
44
pci {{ interface.pci }} {{ interface.driver }}
55
{%- endif %}

linux/files/etc_environment

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
{%- for name,value in variables.iteritems() if not name.lower().endswith('_proxy') %}
2+
{%- for name,value in variables.items() if not name.lower().endswith('_proxy') %}
33

44
{%- if value is sequence and value is not string %}
55
{{ name }}="{{ value|join(':') }}"

linux/files/grub_hugepages

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
{%- from "linux/map.jinja" import system with context %}
2-
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT {%- for hugepages_type, hugepages in system.kernel.hugepages.iteritems() %}{%- if hugepages.get('default', False) %} default_hugepagesz={{ hugepages.size }} {%- endif %} hugepagesz={{ hugepages.size }} hugepages={{ hugepages.count }} {%- endfor %}"
2+
GRUB_CMDLINE_LINUX_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT {%- for hugepages_type, hugepages in system.kernel.hugepages.items() %}{%- if hugepages.get('default', False) %} default_hugepagesz={{ hugepages.size }} {%- endif %} hugepagesz={{ hugepages.size }} hugepages={{ hugepages.count }} {%- endfor %}"

linux/files/hosts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
'ip6-allhosts'
3232
],
3333
} -%}
34-
{%- for name, host in host_dict.iteritems() -%}
34+
{%- for name, host in host_dict.items() -%}
3535
{%- for hname in host.names -%}
3636
{%- if hname in hosts.get('127.0.1.1', []) -%}
3737
{%- do hosts.pop('127.0.1.1') -%}

linux/files/lvm.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ devices {
129129
# Example
130130
# Accept every block device:
131131

132-
filter = [ {%- for vgname, vg in storage.lvm.iteritems() %}{%- if vg.get('enabled', True) %}{%- for dev in vg.devices %}"a|{{ dev }}*|"{%- if not loop.last %},{%- endif %}{%- endfor %}{%- endif %}{%- endfor %}, "r|.*|" ]
132+
filter = [ {%- for vgname, vg in storage.lvm.items() %}{%- if vg.get('enabled', True) %}{%- for dev in vg.devices %}"a|{{ dev }}*|"{%- if not loop.last %},{%- endif %}{%- endfor %}{%- endif %}{%- endfor %}, "r|.*|" ]
133133

134134
# filter = [ "a|.*/|" ]
135135
# Reject the cdrom drive:

linux/files/motd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{%- from "linux/map.jinja" import system with context -%}
22
{%- for motd in system.motd -%}
33
{%- if loop.index == index -%}
4-
{%- for name, value in motd.iteritems() -%}
4+
{%- for name, value in motd.items() -%}
55
{%- if name == motd_name -%}{{ value }}{%- endif %}
66
{%- endfor -%}
77
{%- endif -%}

0 commit comments

Comments
 (0)