From e1cf8bffdadcfa2ec64db479f1d5ea78e9e47d3f Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 7 Jun 2018 19:43:17 +0200 Subject: T652: snmp.py: support SNMPv3 write groups --- src/conf_mode/snmp.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/conf_mode') 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 %} -- cgit v1.2.3