diff options
author | Bruno Brito Carvalho <brunoricardobritocarvalho@gmail.com> | 2017-12-10 21:54:32 +0100 |
---|---|---|
committer | Neil Lathwood <neil@lathwood.co.uk> | 2017-12-10 20:54:32 +0000 |
commit | 3fec19ba5b6b9cc2aabb7d57d2c0e2fb2a984cef (patch) | |
tree | 90cf019d7e0fcb77251d1c79930cb104c8a61c43 /lib | |
parent | 7e6dc8cce71d6e2753a4e865d8bfbcd347fe1f8a (diff) |
mode: Hide snmp community for IOS (#1077)
* Hide snmp community
Community is displayed next to this line (old ios versions)
* Updating as suggested
Thanks @ZacharyPuls
* Was missing a /
* Was missing the last /
I missed that one yesterday. Sorry, making those changes from browser, many useless commits.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/oxidized/model/ios.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb index 0cb2f3a..4e7d223 100644 --- a/lib/oxidized/model/ios.rb +++ b/lib/oxidized/model/ios.rb @@ -26,6 +26,7 @@ class IOS < Oxidized::Model cmd :secret do |cfg| cfg.gsub! /^(snmp-server community).*/, '\\1 <configuration removed>' + cfg.gsub! /^(snmp-server host \S+( vrf \S+)?( version (1|2c|3))?)\s+\S+((\s+\S*)*)\s*/, '\\1 <secret hidden> \\5' cfg.gsub! /^(username \S+ privilege \d+) (\S+).*/, '\\1 <secret hidden>' cfg.gsub! /^(username \S+ password \d) (\S+)/, '\\1 <secret hidden>' cfg.gsub! /^(username \S+ secret \d) (\S+)/, '\\1 <secret hidden>' |