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 /python/vyos/template.py | |
parent | 8d99fe401731c55ee6058d617101fcdaf1b2c47a (diff) | |
download | vyos-1x-566f7f2401b79a79abe5ed9597fed325540983fa.tar.gz vyos-1x-566f7f2401b79a79abe5ed9597fed325540983fa.zip |
snmp: T4124: migrate to get_config_dict()
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r-- | python/vyos/template.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py index 29c6b3882..f694b53e0 100644 --- a/python/vyos/template.py +++ b/python/vyos/template.py @@ -489,3 +489,17 @@ def get_openvpn_ncp_ciphers(ciphers): else: out.append(cipher) return ':'.join(out).upper() + +@register_filter('snmp_auth_oid') +def snmp_auth_oid(type): + if type not in ['md5', 'sha', 'aes', 'des', 'none']: + raise ValueError() + + OIDs = { + 'md5' : '.1.3.6.1.6.3.10.1.1.2', + 'sha' : '.1.3.6.1.6.3.10.1.1.3', + 'aes' : '.1.3.6.1.6.3.10.1.2.4', + 'des' : '.1.3.6.1.6.3.10.1.2.2', + 'none': '.1.3.6.1.6.3.10.1.2.1' + } + return OIDs[type] |