Skip to content

Commit

Permalink
Update fortios.rb
Browse files Browse the repository at this point in the history
Adjustments to better support FortiADC
  • Loading branch information
electrocret authored Feb 18, 2025
1 parent 87269cb commit 42bb276
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/oxidized/model/fortios.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class FortiOS < Oxidized::Model

comment '# '

prompt /^([-\w.~]+(\s[(\w\-.)]+)?~?\s?[#>$]\s?)$/
prompt /^(([-\w.~]+(\s[(\w\-.)]+)?~?\s?[#>$]\s?)|\(.\) ([^\s]+) [#$] )$/

# When a post-login-banner is enabled, you have to press "a" to log in
expect /^\(Press\s'a'\sto\saccept\):/ do |data, re|
Expand Down Expand Up @@ -39,11 +39,11 @@ class FortiOS < Oxidized::Model

cmd 'get system status' do |cfg|
@vdom_enabled = cfg.match /Virtual domain configuration: (enable|multiple)/
cfg.gsub! /(System time:).*/, '\\1 <stripped>'
cfg.gsub! /(System time:).*/i, '\\1 <stripped>'
cfg.gsub! /(Cluster (?:uptime|state change time):).*/, '\\1 <stripped>'
cfg.gsub! /(Current Time\s+:\s+)(.*)/, '\1<stripped>'
cfg.gsub! /(Uptime:\s+)(.*)/, '\1<stripped>\3'
cfg.gsub! /(Last reboot:\s+)(.*)/, '\1<stripped>\3'
cfg.gsub! /(Last reboot:\s+)(.*)/i, '\1<stripped>\3'
cfg.gsub! /(Disk Usage\s+:\s+)(.*)/, '\1<stripped>'
cfg.gsub! /(^\S+ (?:disk|DB):\s+)(.*)/, '\1<stripped>\3'
cfg.gsub! /(VM Registration:\s+)(.*)/, '\1<stripped>\3'
Expand Down

0 comments on commit 42bb276

Please sign in to comment.