summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordevicenull <devicenull@users.noreply.github.com>2017-01-18 17:17:09 -0500
committerGitHub <noreply@github.com>2017-01-18 17:17:09 -0500
commit34725454fe631bdd3ca790bb7ce0c71fa679f3ff (patch)
tree005d0507e12d95b384151d8bbd15221721d35512
parent1b7b5e63037465774c126223ec2f63b1cc88dc5d (diff)
Update ironware.rb
Some Brocade devices only have two possible fan speeds. Previously, this only handled three levels of fan speeds. Updated regex will handle both of these cases: Fan 1 ok, speed (auto): 1<->[[2]] Fan 1 ok, speed (auto): 1<->[[2]]<->3
-rw-r--r--lib/oxidized/model/ironware.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/oxidized/model/ironware.rb b/lib/oxidized/model/ironware.rb
index e1c6da1..5b58f22 100644
--- a/lib/oxidized/model/ironware.rb
+++ b/lib/oxidized/model/ironware.rb
@@ -34,7 +34,7 @@ class IronWare < Oxidized::Model
cfg.gsub! /(^((.*)Current temp(.*))$)/, '' #remove unwanted lines current temperature
cfg.gsub! /Speed = [A-Z-]{2,6} \(\d{2,3}\%\)/, '' #remove unwanted lines Speed Fans
cfg.gsub! /current speed is [A-Z]{2,6} \(\d{2,3}\%\)/, ''
- cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)<->([\[]*)3([\]]*)/, ''
+ cfg.gsub! /([\[]*)1([\]]*)<->([\[]*)2([\]]*)(<->([\[]*)3([\]]*))*/, ''
cfg.gsub! /\d{2}\.\d deg-C/, 'XX.X deg-C'
if cfg.include? "TEMPERATURE"
sc = StringScanner.new cfg