summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-02-18 22:22:20 +0200
committerytti <saku@ytti.fi>2016-02-18 22:22:20 +0200
commitd2bdccba2ef9a462730e4233d36d8eadb960f6be (patch)
tree09b9c08fdbb3b5141415e6b6e43d51713f5bd770 /lib/oxidized/model
parent2e7dd813f8659e9418b65983b661b48a1aaf832e (diff)
parentfd72acca25590f95e21b1e906683d9050a6d086e (diff)
Merge pull request #325 from roedie/fortios-fix-more
Fix fortios more prompt
Diffstat (limited to 'lib/oxidized/model')
-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