diff options
author | Nataliia Solomko <natalirs1985@gmail.com> | 2024-03-11 12:32:46 +0200 |
---|---|---|
committer | Nataliia Solomko <natalirs1985@gmail.com> | 2024-03-11 12:32:46 +0200 |
commit | 0364d44b4ffbcde647807c31e42c3662cc87e2e3 (patch) | |
tree | 39f6fb3ac08d2f53ed523d1b50c0a7c02b616810 /src | |
parent | 423a25a814ca92870399dab1c5e107732a16292d (diff) | |
download | vyos-1x-0364d44b4ffbcde647807c31e42c3662cc87e2e3.tar.gz vyos-1x-0364d44b4ffbcde647807c31e42c3662cc87e2e3.zip |
snmp: T2998: SNMP v3 oid "exclude" option fix
Diffstat (limited to 'src')
-rwxr-xr-x | src/conf_mode/snmp.py | 4 |
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) |