summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2017-02-27 22:32:19 +0200
committerGitHub <noreply@github.com>2017-02-27 22:32:19 +0200
commit268a9381de0220cef0b510441060e9a422e81d9b (patch)
treee4a063d92111f667c48a90eca6116bcb4096d5a4 /lib
parent415c7df5c5f38d36bf5060cc84402683ba587376 (diff)
parentd0e7051eab38549d847b6f619d26cc66ce7d0b8a (diff)
Merge pull request #746 from Mk-00/master
Fixed issues with HP Aruba 2530 fw 16.02.0016
Diffstat (limited to 'lib')
-rw-r--r--lib/oxidized/model/procurve.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/oxidized/model/procurve.rb b/lib/oxidized/model/procurve.rb
index 0b8b672..7dcf1fd 100644
--- a/lib/oxidized/model/procurve.rb
+++ b/lib/oxidized/model/procurve.rb
@@ -1,13 +1,13 @@
class Procurve < Oxidized::Model
- # some models start lines with \r
+ # some models start lines with \r
# previous command is repeated followed by "\eE", which sometimes ends up on last line
- prompt /^\r?([\w -]+\eE)?([\w.-]+# )$/
+ prompt /^\r?([\w.-]+# )$/
comment '! '
# replace next line control sequence with a new line
- expect /\eE/ do |data, re|
+ expect /(\e\[1M\e\[\??\d+(;\d+)*[A-Za-z]\e\[1L)|(\eE)/ do |data, re|
data.gsub re, "\n"
end
@@ -22,7 +22,7 @@ class Procurve < Oxidized::Model
end
cmd :all do |cfg|
- cfg = cfg.each_line.to_a[1..-3].join
+ cfg = cfg.each_line.to_a[1..-2].join
cfg = cfg.gsub /^\r/, ''
end