summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamer Abdel-Hafez <sam@arahant.net>2014-09-26 09:57:36 +0200
committerSamer Abdel-Hafez <sam@arahant.net>2014-09-26 09:57:36 +0200
commitf389555535348970d3c8ac6a0008cf9cdb4d71d0 (patch)
tree2217bad2308fb8faea8a46d363b4b6ebc1e755e0
parente23a62d098e29b6f2303690daca0f9ef7e0af6e1 (diff)
parent49b7ec647b3050d35e8162afb63c7c43333f0ee5 (diff)
Merge pull request #48 from emjemj/master
Removed ever-changing output from powerconnect model, thanks @artmann
-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'