Skip to content

Commit

Permalink
Merge pull request #3299 from syn-bit/ios-remove-expression-values
Browse files Browse the repository at this point in the history
Remove constantly updating value from custom SNMP OID
  • Loading branch information
robertcheramy authored Nov 16, 2024
2 parents f6cf93d + db2c708 commit 41ad7c1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- Updated slackdiff.rb to use new files.getUploadURLExternal slack file upload API instead of deprecated files.upload (@varesa)
- Updated source/output files to reference a Source/Outputb module to avoid namespace duplication (@laf, @robertcheramy)
- ios: Hide WLAN PSK, AP profile dot1x password, AP profile mgmtuser password/secret and radius COA server-key (@devon-mar)
- ios: remove values from custom SNMP OID's, set by an EEM script (@syn-bit)

### Fixed
- fixed error for ibos when remove_secret is set (@dminuoso)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,10 @@ commands:
snmp-server host 10.42.0.35 vrf Mgmt-vrf informs version 2c AAAAAAAAAABBBBBBBBBB tty vtp
snmp-server host 10.42.0.36 vrf Mgmt-vrf informs version 3 auth oxidized bfd bridge transceiver
!
snmp mib expression owner nat name 1
expression 42
snmp mib expression owner oxidized name rocks
expression 42
!
!
!
Expand Down Expand Up @@ -485,6 +489,10 @@ oxidized_output: |
snmp-server host 10.42.0.35 vrf Mgmt-vrf informs version 2c AAAAAAAAAABBBBBBBBBB tty vtp
snmp-server host 10.42.0.36 vrf Mgmt-vrf informs version 3 auth oxidized bfd bridge transceiver
!
snmp mib expression owner nat name 1
expression <value removed>
snmp mib expression owner oxidized name rocks
expression <value removed>
!
!
!
Expand Down
2 changes: 2 additions & 0 deletions lib/oxidized/model/ios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ class IOS < Oxidized::Model
cfg.gsub! /^ tunnel mpls traffic-eng bandwidth[^\n]*\n*(
(?: [^\n]*\n*)*
tunnel mpls traffic-eng auto-bw)/mx, '\1'
# get rid of values of custom SNMP OID's
cfg.gsub! /^(\s+expression) \d+$/, '\\1 <value removed>'
cfg
end
end
Expand Down

0 comments on commit 41ad7c1

Please sign in to comment.