diff options
author | ytti <saku@ytti.fi> | 2016-02-18 22:22:20 +0200 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-02-18 22:22:20 +0200 |
commit | d2bdccba2ef9a462730e4233d36d8eadb960f6be (patch) | |
tree | 09b9c08fdbb3b5141415e6b6e43d51713f5bd770 /lib/oxidized | |
parent | 2e7dd813f8659e9418b65983b661b48a1aaf832e (diff) | |
parent | fd72acca25590f95e21b1e906683d9050a6d086e (diff) |
Merge pull request #325 from roedie/fortios-fix-more
Fix fortios more prompt
Diffstat (limited to 'lib/oxidized')
-rw-r--r-- | lib/oxidized/model/fortios.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb index 3515b46..92add0e 100644 --- a/lib/oxidized/model/fortios.rb +++ b/lib/oxidized/model/fortios.rb @@ -4,6 +4,11 @@ class FortiOS < Oxidized::Model prompt /^([-\w\.]+(\s[\(\w\-\.\)]+)?\~?\s?[#>]\s?)$/ + expect /^--More--\s$/ do |data, re| + send ' ' + data.sub re, '' + end + cmd :all do |cfg, cmdstring| new_cfg = comment "COMMAND: #{cmdstring}\n" new_cfg << cfg.each_line.to_a[1..-2].map { |line| line.gsub(/(conf_file_ver=)(.*)/, '\1<stripped>\3') }.join |