summaryrefslogtreecommitdiff
path: root/src/conf_mode/snmp.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2018-06-07 19:43:17 +0200
committerChristian Poessinger <christian@poessinger.com>2018-06-07 19:43:17 +0200
commite1cf8bffdadcfa2ec64db479f1d5ea78e9e47d3f (patch)
tree0e75123db610d740ccb1450e849a7049b6543a1c /src/conf_mode/snmp.py
parenta9f57961008800f45ac96fc67e55fdba4d9943f9 (diff)
downloadvyos-1x-e1cf8bffdadcfa2ec64db479f1d5ea78e9e47d3f.tar.gz
vyos-1x-e1cf8bffdadcfa2ec64db479f1d5ea78e9e47d3f.zip
T652: snmp.py: support SNMPv3 write groups
Diffstat (limited to 'src/conf_mode/snmp.py')
-rwxr-xr-xsrc/conf_mode/snmp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index 3b02ffc3b..7623206b4 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -191,8 +191,13 @@ view {{ v.name }} included .{{ oid.oid }}
# context sec.model sec.level match read write notif
{% if v3_groups -%}
{% for g in v3_groups %}
+{% if g.mode == 'ro' %}
access {{ g.name }} "" usm {{ g.seclevel }} exact {{ g.view }} none none
access {{ g.name }} "" tsm {{ g.seclevel }} exact {{ g.view }} none none
+{% elif g.mode == 'rw' %}
+access {{ g.name }} "" usm {{ g.seclevel }} exact {{ g.view }} {{ g.view }} none
+access {{ g.name }} "" tsm {{ g.seclevel }} exact {{ g.view }} {{ g.view }} none
+{% endif %}
{% endfor -%}
{% endif %}