diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-12-30 21:37:44 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-12-30 21:38:16 +0100 |
commit | 566f7f2401b79a79abe5ed9597fed325540983fa (patch) | |
tree | f6347336c27e8a890286ca473bf7a0c829f8a999 /data/templates/snmp/var.snmpd.conf.tmpl | |
parent | 8d99fe401731c55ee6058d617101fcdaf1b2c47a (diff) | |
download | vyos-1x-566f7f2401b79a79abe5ed9597fed325540983fa.tar.gz vyos-1x-566f7f2401b79a79abe5ed9597fed325540983fa.zip |
snmp: T4124: migrate to get_config_dict()
Diffstat (limited to 'data/templates/snmp/var.snmpd.conf.tmpl')
-rw-r--r-- | data/templates/snmp/var.snmpd.conf.tmpl | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/data/templates/snmp/var.snmpd.conf.tmpl b/data/templates/snmp/var.snmpd.conf.tmpl index c779587df..5871a8234 100644 --- a/data/templates/snmp/var.snmpd.conf.tmpl +++ b/data/templates/snmp/var.snmpd.conf.tmpl @@ -1,14 +1,16 @@ ### Autogenerated by snmp.py ### # user -{% for u in v3_users %} -{% if u.authOID == 'none' %} -createUser {{ u.name }} -{% else %} -usmUser 1 3 0x{{ v3_engineid }} "{{ u.name }}" "{{ u.name }}" NULL {{ u.authOID }} 0x{{ u.authMasterKey }} {{ u.privOID }} 0x{{ u.privMasterKey }} 0x -{% endif %} -{% endfor %} +{% if v3 is defined and v3 is not none %} +{% if v3.user is defined and v3.user is not none %} +{% 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 %} +{% endif %} +# VyOS default user createUser {{ vyos_user }} MD5 "{{ vyos_user_pass }}" DES -{% if v3_engineid %} -oldEngineID 0x{{ v3_engineid }} + +{% if v3.engineid is defined and v3.engineid is not none %} +oldEngineID 0x{{ v3.engineid }} +{% endif %} {% endif %} |