summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Pray <tim.pray@displays2go.com>2017-02-07 13:20:25 -0500
committerTim Pray <tim.pray@displays2go.com>2017-02-07 13:20:25 -0500
commitf0fd88dc6f10daf060453f42259cae5ca0f1265b (patch)
treec5a03b29364753d26f5bb530cbf5ebd3594474d7 /lib
parenta1e6277280b1882757f369cb57358c5cbc6aa170 (diff)
parent2920c67dc3555c70c078bf4086b2e46d9f9d8299 (diff)
Merge branch 'master' into ArubaIAP_MAS
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/fortios.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb
index cd379b7..cdb50d5 100644
--- a/lib/oxidized/model/fortios.rb
+++ b/lib/oxidized/model/fortios.rb
@@ -14,6 +14,11 @@ class FortiOS < Oxidized::Model
new_cfg << cfg.each_line.to_a[1..-2].map { |line| line.gsub(/(conf_file_ver=)(.*)/, '\1<stripped>\3') }.join
end
+ cmd :secret do |cfg|
+ cfg.gsub! /(set (?:passwd|password)).*/, '\\1 <configuration removed>'
+ cfg
+ end
+
cmd 'get system status' do |cfg|
@vdom_enabled = cfg.include? 'Virtual domain configuration: enable'
cfg.gsub!(/(System time: )(.*)/, '\1<stripped>\3')
@@ -29,7 +34,7 @@ class FortiOS < Oxidized::Model
end
cfg << cmd('diagnose autoupdate version') do |cfg|
- comment cfg
+ comment cfg.each_line.reject { |line| line.match /Last Update|Result/ }.join
end
cfg << cmd('end') if @vdom_enabled