summaryrefslogtreecommitdiff
path: root/lib/oxidized
diff options
context:
space:
mode:
authorMk- <kulmala.mt@gmail.com>2017-02-27 21:22:57 +0200
committerMk- <kulmala.mt@gmail.com>2017-02-27 21:22:57 +0200
commitd0e7051eab38549d847b6f619d26cc66ce7d0b8a (patch)
treee4a063d92111f667c48a90eca6116bcb4096d5a4 /lib/oxidized
parent415c7df5c5f38d36bf5060cc84402683ba587376 (diff)
Fixed issues with HP Aruba 2530 fw 16.02.0016
Diffstat (limited to 'lib/oxidized')
-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