diff options
author | Saku Ytti <saku@ytti.fi> | 2014-07-14 10:17:59 +0300 |
---|---|---|
committer | Saku Ytti <saku@ytti.fi> | 2014-07-14 10:17:59 +0300 |
commit | 28eb67d7751e804df0c5d68e96a0f5717370e802 (patch) | |
tree | 753e9251dae1c9ce64b627adb575a4ab93e01e35 | |
parent | a000a599d3c181d664fcb80d46d87a67cf3848b8 (diff) |
Fix powerconnect model
a) put metainformation on top, rancid style
b) remove changing data from 'show system'
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 5 |
1 files 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:/ |