From c87ad948999c28c3c9449f98d60b545481ea29d5 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 28 Nov 2020 08:25:39 +0100 Subject: 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. --- src/op_mode/snmp_v3.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/op_mode/snmp_v3.py') 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 %} -- cgit v1.2.3