diff options
author | ytti <saku@ytti.fi> | 2015-04-01 12:43:08 +0300 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2015-04-01 12:43:08 +0300 |
commit | f44d0894e8591012604491d6098f5df68495ffa3 (patch) | |
tree | 1ee339b0a96df91a08842854973c400b7b13f458 | |
parent | 260e050c35db0a83590b71ae9f331e9e6f1447ba (diff) | |
parent | 63b92517346f915be76e7e53c2417d37a876c1f2 (diff) |
Merge pull request #99 from MrRJ45/patch-1
Add match for 35xx Switches, tidy up regex
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 4 |
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 |