diff options
author | Samer Abdel-Hafez <sam@arahant.net> | 2014-06-11 09:31:25 +0200 |
---|---|---|
committer | Samer Abdel-Hafez <sam@arahant.net> | 2014-06-11 09:31:25 +0200 |
commit | c19cc681e14977bf741359346fe18b8da5c51355 (patch) | |
tree | 0c270490e08586807fb95321bbef1b8c55f885a4 /lib/oxidized/model/ios.rb | |
parent | b893ec78e10de9d29fcfc62e1cf67d6a72c7dfd0 (diff) |
add secrets removal code + bump version
Diffstat (limited to 'lib/oxidized/model/ios.rb')
-rw-r--r-- | lib/oxidized/model/ios.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/oxidized/model/ios.rb b/lib/oxidized/model/ios.rb index e557469..a9c2d3b 100644 --- a/lib/oxidized/model/ios.rb +++ b/lib/oxidized/model/ios.rb @@ -22,6 +22,12 @@ class IOS < Oxidized::Model cfg.each_line.to_a[1..-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' do |cfg| comment cfg end |