From d0e7051eab38549d847b6f619d26cc66ce7d0b8a Mon Sep 17 00:00:00 2001 From: Mk- Date: Mon, 27 Feb 2017 21:22:57 +0200 Subject: Fixed issues with HP Aruba 2530 fw 16.02.0016 --- lib/oxidized/model/procurve.rb | 8 ++++---- 1 file 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 -- cgit v1.2.1