diff options
author | ytti <saku@ytti.fi> | 2016-05-27 11:12:48 +0300 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-05-27 11:12:48 +0300 |
commit | f16660a2113321c4f0a1a5eaa7ef51048d25fa7c (patch) | |
tree | dd09e7cc909d99a776d3502ecc790596491590c3 /lib/oxidized/model | |
parent | 54322b866942bee47a9a907f22c2ba1a8ac295cd (diff) | |
parent | cc2c47f7bd38a3df72f4f8a97e7d8a08cd727271 (diff) |
Merge pull request #447 from broxio/patch-3
Strip out dynamic value from CLI
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/acos.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/oxidized/model/acos.rb b/lib/oxidized/model/acos.rb index 7db8b00..bb9846e 100644 --- a/lib/oxidized/model/acos.rb +++ b/lib/oxidized/model/acos.rb @@ -7,6 +7,14 @@ class ACOS < Oxidized::Model prompt /^([-\w.\/:?\[\]\(\)]+[#>]\s?)$/ cmd 'show version' do |cfg| + cfg.gsub! /\s(Last configuration saved at).*/, ' \\1 <removed>' + cfg.gsub! /\s(Memory).*/, ' \\1 <removed>' + cfg.gsub! /\s(Current time is).*/, ' \\1 <removed>' + cfg.gsub! /\s(The system has been up).*/, ' \\1 <removed>' + comment cfg + end + + cmd 'show bootimage' do |cfg| comment cfg end @@ -14,7 +22,12 @@ class ACOS < Oxidized::Model comment cfg end - cmd 'show running-config all-partitions' + cmd 'show running-config all-partitions' do |cfg| + cfg.gsub! /(Current configuration).*/, '\\1 <removed>' + cfg.gsub! /(Configuration last updated at).*/, '\\1 <removed>' + cfg.gsub! /(Configuration last saved at).*/, '\\1 <removed>' + cfg.gsub! /(Configuration last synchronized at).*/, '\\1 <removed>' + end cmd 'show aflex all-partitions' do |cfg| comment cfg |