summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMrRJ45 <couton@gmail.com>2015-04-01 09:30:32 +0100
committerMrRJ45 <couton@gmail.com>2015-04-01 09:30:32 +0100
commit63b92517346f915be76e7e53c2417d37a876c1f2 (patch)
tree1ee339b0a96df91a08842854973c400b7b13f458
parent260e050c35db0a83590b71ae9f331e9e6f1447ba (diff)
Add match for 35xx Switches, tidy up regex
Added a check for 35xx switches Also extract only on the model number, not the suffix (P or F) as we dont need that.
-rw-r--r--lib/oxidized/model/powerconnect.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb
index 17674f1..531ad0b 100644
--- a/lib/oxidized/model/powerconnect.rb
+++ b/lib/oxidized/model/powerconnect.rb
@@ -19,7 +19,7 @@ class PowerConnect < Oxidized::Model
end
cmd 'show system' do |cfg|
- @model = $1 if cfg.match /Power[C|c]onnect (\d{4}[A-Z]?)/
+ @model = $1 if cfg.match /Power[C|c]onnect (\d{4})[P|F]?/
clean cfg
end
@@ -51,7 +51,7 @@ class PowerConnect < Oxidized::Model
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(24|48)$|^54(24|48)$|^55(24|48)$|^8024F$/
+ skip_block = true if @model =~ /^(34|35)(24|48)$|^(54|55)(24|48)$|^8024$/
end
# If we have lines to skip do this until we reach and empty line
if skip_block