summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/iosxr.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model/iosxr.rb')
-rw-r--r--lib/oxidized/model/iosxr.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/model/iosxr.rb b/lib/oxidized/model/iosxr.rb
index 1129a0c..25c1318 100644
--- a/lib/oxidized/model/iosxr.rb
+++ b/lib/oxidized/model/iosxr.rb
@@ -8,6 +8,12 @@ class IOSXR < 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! /secret (\d+) (\S+).*/, '<secret hidden>'
+ cfg
+ end
+
cmd 'show inventory' do |cfg|
comment cfg
end