summaryrefslogtreecommitdiff
path: root/data/templates/snmp/var.snmpd.conf.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-04-11 20:57:16 +0200
committerChristian Poessinger <christian@poessinger.com>2022-04-11 20:57:16 +0200
commit7e946dc26f628ac716a1d6a75664781e5685cb66 (patch)
tree6f61be1dde66f8a75eab5345221fbd11831d3b91 /data/templates/snmp/var.snmpd.conf.tmpl
parent47838b888aa3e7378ca0270a774cb77635b7f092 (diff)
downloadvyos-1x-7e946dc26f628ac716a1d6a75664781e5685cb66.tar.gz
vyos-1x-7e946dc26f628ac716a1d6a75664781e5685cb66.zip
snmp: T4333: migrate to new vyos_defined Jinja2 test
Diffstat (limited to 'data/templates/snmp/var.snmpd.conf.tmpl')
-rw-r--r--data/templates/snmp/var.snmpd.conf.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/snmp/var.snmpd.conf.tmpl b/data/templates/snmp/var.snmpd.conf.tmpl
index 5871a8234..16d39db89 100644
--- a/data/templates/snmp/var.snmpd.conf.tmpl
+++ b/data/templates/snmp/var.snmpd.conf.tmpl
@@ -1,7 +1,7 @@
### Autogenerated by snmp.py ###
# user
-{% if v3 is defined and v3 is not none %}
-{% if v3.user is defined and v3.user is not none %}
+{% if v3 is vyos_defined %}
+{% if v3.user is vyos_defined %}
{% for user, user_config in v3.user.items() %}
usmUser 1 3 0x{{ v3.engineid }} "{{ user }}" "{{ user }}" NULL {{ user_config.auth.type | snmp_auth_oid }} 0x{{ user_config.auth.encrypted_password }} {{ user_config.privacy.type | snmp_auth_oid }} 0x{{ user_config.privacy.encrypted_password }} 0x
{% endfor %}
@@ -10,7 +10,7 @@ usmUser 1 3 0x{{ v3.engineid }} "{{ user }}" "{{ user }}" NULL {{ user_config.au
# VyOS default user
createUser {{ vyos_user }} MD5 "{{ vyos_user_pass }}" DES
-{% if v3.engineid is defined and v3.engineid is not none %}
+{% if v3.engineid is vyos_defined %}
oldEngineID 0x{{ v3.engineid }}
{% endif %}
{% endif %}