lib/oxidized/model/powerconnect.rb in oxidized-0.5.0 vs lib/oxidized/model/powerconnect.rb in oxidized-0.6.0

- old
+ new

@@ -2,11 +2,11 @@ prompt /^([\w\s.@-]+[#>]\s?)$/ # allow spaces in hostname..dell does not limit it.. # comment '! ' - expect /^\s--More--\s+.*$/ do |data, re| + expect /^\s*--More--\s+.*$/ do |data, re| send ' ' data.sub re, '' end cmd :all do |cfg| @@ -48,12 +48,12 @@ def clean cfg out = [] skip_block = false cfg.each_line do |line| if line.match /Up\sTime|Temperature|Power Supplies/i - # For 34xx, 54xx, 55xx, and 8024F we should skip this block (terminated by a blank line) - skip_block = true if @model =~ /^(34|35)(24|48)$|^(54|55)(24|48)$|^8024$/ + # For 34xx, 35xx, 54xx, 55xx, 62xx and 8024F we should skip this block (terminated by a blank line) + skip_block = true if @model =~ /^(34|35)(24|48)$|^(54|55)(24|48)$|^(62)(24|48)$|^8024$/ end # If we have lines to skip do this until we reach and empty line if skip_block skip_block = false if /\S/ !~ line next @@ -61,8 +61,7 @@ out << line.strip end out = comment out.join "\n" out << "\n" end - end