From 28eb67d7751e804df0c5d68e96a0f5717370e802 Mon Sep 17 00:00:00 2001 From: Saku Ytti Date: Mon, 14 Jul 2014 10:17:59 +0300 Subject: Fix powerconnect model a) put metainformation on top, rancid style b) remove changing data from 'show system' --- lib/oxidized/model/powerconnect.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index 304fc86..4f90b77 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -13,16 +13,17 @@ class PowerConnect < Oxidized::Model cfg.each_line.to_a[1..-3].join end - cmd 'show running-config' - cmd 'show version' do |cfg| comment cfg end cmd 'show system' do |cfg| + cfg = cfg.each_line.take_while { |line| not line.match(/uptime/i) } comment cfg end + cmd 'show running-config' + cfg :telnet do username /^User( Name)?:/ password /^\r?Password:/ -- cgit v1.2.1