summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorroedie <github@roedie.nl>2016-02-18 16:02:59 +0100
committerroedie <github@roedie.nl>2016-02-18 16:02:59 +0100
commitfd72acca25590f95e21b1e906683d9050a6d086e (patch)
tree09b9c08fdbb3b5141415e6b6e43d51713f5bd770 /lib/oxidized
parent2e7dd813f8659e9418b65983b661b48a1aaf832e (diff)
Fix fortios more prompt
To make this work, the timeout must be high as wel. About 120 sec in my tests
Diffstat (limited to 'lib/oxidized')
-rw-r--r--lib/oxidized/model/fortios.rb5
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