summaryrefslogtreecommitdiff
path: root/lib/oxidized/model
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r--lib/oxidized/model/powerconnect.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb
index 8c677b3..6a743db 100644
--- a/lib/oxidized/model/powerconnect.rb
+++ b/lib/oxidized/model/powerconnect.rb
@@ -18,8 +18,9 @@ class PowerConnect < Oxidized::Model
end
cmd 'show system' do |cfg|
- cfg = cfg.each_line.take_while { |line| not line.match(/uptime/i) }
- comment cfg.join "\n"
+ cfg = cfg.split("\n").select { |line| not line[/Up Time/] }
+ cfg = cfg[0..-28]<<" "
+ comment cfg.join("\n")
end
cmd 'show running-config'