summaryrefslogtreecommitdiff
path: root/src/op_mode/snmp_v3.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
committerChristian Poessinger <christian@poessinger.com>2020-11-28 08:25:39 +0100
commitc87ad948999c28c3c9449f98d60b545481ea29d5 (patch)
tree18b188cf73266be95c62f128afe5d155a7a03bf4 /src/op_mode/snmp_v3.py
parent41f79409c742b6a020318b196cbaa52439845d6d (diff)
downloadvyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.tar.gz
vyos-1x-c87ad948999c28c3c9449f98d60b545481ea29d5.zip
vyos.template: T2720: fix remaining in-line time_block syntax
Commit a2ac9fac ("vyos.template: T2720: always enable Jinja2 trim_blocks feature") globally enabled the trim_blocks feature. Some templates still used in-line trim_blocks "{%"- or "-%}" which caused miss-placed line endings. This is fixed by removing all in-line trim_block statememnts of Jinja2 templates.
Diffstat (limited to 'src/op_mode/snmp_v3.py')
-rwxr-xr-xsrc/op_mode/snmp_v3.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/op_mode/snmp_v3.py b/src/op_mode/snmp_v3.py
index 92601f15e..a1f76f0bc 100755
--- a/src/op_mode/snmp_v3.py
+++ b/src/op_mode/snmp_v3.py
@@ -37,7 +37,7 @@ SNMPv3 Groups:
Group View
----- ----
- {% if group -%}{% for g in group -%}
+ {% if group %}{% for g in group %}
{{ "%-20s" | format(g.name) }}{{ g.view }}({{ g.mode }})
{% endfor %}{% endif %}
"""
@@ -47,7 +47,7 @@ SNMPv3 Trap-targets:
Tpap-target Port Protocol Auth Priv Type EngineID User
----------- ---- -------- ---- ---- ---- -------- ----
- {% if trap -%}{% for t in trap -%}
+ {% if trap %}{% for t in trap %}
{{ "%-20s" | format(t.name) }} {{ t.port }} {{ t.proto }} {{ t.auth }} {{ t.priv }} {{ t.type }} {{ "%-32s" | format(t.engID) }} {{ t.user }}
{% endfor %}{% endif %}
"""
@@ -57,14 +57,14 @@ SNMPv3 Users:
User Auth Priv Mode Group
---- ---- ---- ---- -----
- {% if user -%}{% for u in user -%}
+ {% if user %}{% for u in user %}
{{ "%-20s" | format(u.name) }}{{ u.auth }} {{ u.priv }} {{ u.mode }} {{ u.group }}
{% endfor %}{% endif %}
"""
VIEW_OUTP_TMPL_SRC = """
SNMPv3 Views:
- {% if view -%}{% for v in view %}
+ {% if view %}{% for v in view %}
View : {{ v.name }}
OIDs : .{{ v.oids | join("\n .")}}
{% endfor %}{% endif %}