summaryrefslogtreecommitdiff
path: root/src/conf_mode
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2024-03-11 12:32:46 +0200
committerNataliia Solomko <natalirs1985@gmail.com>2024-03-11 12:32:46 +0200
commit0364d44b4ffbcde647807c31e42c3662cc87e2e3 (patch)
tree39f6fb3ac08d2f53ed523d1b50c0a7c02b616810 /src/conf_mode
parent423a25a814ca92870399dab1c5e107732a16292d (diff)
downloadvyos-1x-0364d44b4ffbcde647807c31e42c3662cc87e2e3.tar.gz
vyos-1x-0364d44b4ffbcde647807c31e42c3662cc87e2e3.zip
snmp: T2998: SNMP v3 oid "exclude" option fix
Diffstat (limited to 'src/conf_mode')
-rwxr-xr-xsrc/conf_mode/snmp.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/conf_mode/snmp.py b/src/conf_mode/snmp.py
index 0be0da3d1..b300961ff 100755
--- a/src/conf_mode/snmp.py
+++ b/src/conf_mode/snmp.py
@@ -383,6 +383,10 @@ def get_config():
oid_cfg = {
'oid': oid
}
+ if conf.exists('v3 view {0} oid {1} exclude'.format(view, oid)):
+ oid_cfg['exclude'] = []
+ for exclude in conf.return_values('v3 view {0} oid {1} exclude'.format(view, oid)):
+ oid_cfg['exclude'].append(exclude)
view_cfg['oids'].append(oid_cfg)
snmp['v3_views'].append(view_cfg)