Skip to content

Commit

Permalink
Merge pull request ytti#536 from funzoneq/master
Browse files Browse the repository at this point in the history
A10 and ASA fixes
  • Loading branch information
ytti authored Aug 24, 2016
2 parents 2da8494 + e2fa16b commit 1f1672f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions lib/oxidized/model/acos.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ class ACOS < Oxidized::Model
##ACOS prompt changes depending on the state of the device
prompt /^([-\w.\/:?\[\]\(\)]+[#>]\s?)$/

cmd :secret do |cfg|
cfg.gsub!(/community read encrypted (\S+)/, 'community read encrypted <hidden>') # snmp
cfg.gsub!(/secret encrypted (\S+)/, 'secret encrypted <hidden>') # tacacs-server
cfg.gsub!(/password encrypted (\S+)/, 'password encrypted <hidden>') # user
cfg
end

cmd 'show version' do |cfg|
cfg.gsub! /\s(Last configuration saved at).*/, ' \\1 <removed>'
cfg.gsub! /\s(Memory).*/, ' \\1 <removed>'
Expand All @@ -22,11 +29,20 @@ class ACOS < Oxidized::Model
comment cfg
end

cmd 'show partition-config all' 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>'
cfg
end

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>'
cfg
end

cmd 'show aflex all-partitions' do |cfg|
Expand Down
2 changes: 1 addition & 1 deletion lib/oxidized/model/asa.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ASA < Oxidized::Model
cfg.gsub! /username (\S+) password (\S+) (.*)/, 'username \1 password <secret hidden> \3'
cfg.gsub! /ikev2 pre-shared-key (\S+)/, 'ikev2 pre-shared-key <secret hidden>'
cfg.gsub! /ikev2 (remote|local)-authentication pre-shared-key (\S+)/, 'ikev2 \1-authentication pre-shared-key <secret hidden>'
cfg.gsub! /^(aaa-server TACACS\+ \(\S+\) host.*\n\skey) \S+$/m, '\1 <secret hidden>'
cfg.gsub! /^(aaa-server TACACS\+? \(\S+\) host.*\n\skey) \S+$/mi, '\1 <secret hidden>'
cfg
end

Expand Down

0 comments on commit 1f1672f

Please sign in to comment.