oxidized: temperature patch for x-series

authored by WilliButz and committed by Robin Gloster 40048400 dc433b47

+10 -1
+10 -1
pkgs/tools/admin/oxidized/temporary-x-series.patch
··· 1 1 diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb 2 - index f602a36..3f3a0f9 100644 2 + index f602a36..3bac2d1 100644 3 3 --- a/lib/oxidized/model/powerconnect.rb 4 4 +++ b/lib/oxidized/model/powerconnect.rb 5 5 @@ -4,7 +4,7 @@ class PowerConnect < Oxidized::Model ··· 11 11 send ' ' 12 12 data.sub re, '' 13 13 end 14 + @@ -60,7 +60,7 @@ class PowerConnect < Oxidized::Model 15 + skip_blocks = 0 16 + cfg.each_line do |line| 17 + # If this is a stackable switch we should skip this block of information 18 + - if (line.match /Up\sTime|Temperature|Power Suppl(ies|y)|Fans/i and @stackable == true) 19 + + if (line.match /Up\sTime|Temperature|Power Suppl(ies|y)|Fans/i) 20 + skip_blocks = 1 21 + # Some switches have another empty line. This is identified by this line having a colon 22 + skip_blocks = 2 if line.match /:/