diff options
Diffstat (limited to 'lib/oxidized/model/eos.rb')
-rw-r--r-- | lib/oxidized/model/eos.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/model/eos.rb b/lib/oxidized/model/eos.rb index e08598b..46f44a2 100644 --- a/lib/oxidized/model/eos.rb +++ b/lib/oxidized/model/eos.rb @@ -11,6 +11,12 @@ class EOS < Oxidized::Model cfg.each_line.to_a[2..-2].join end + cmd :secret do |cfg| + cfg.gsub! /^(snmp-server community).*/, '\\1 <configuration removed>' + cfg.gsub! /username (\S+) privilege (\d+) (\S+).*/, '<secret hidden>' + cfg + end + cmd 'show inventory | no-more' do |cfg| comment cfg end |