diff options
| author | Florian Klink <flokli@flokli.de> | 2017-06-13 22:51:12 +0200 | 
|---|---|---|
| committer | Florian Klink <flokli@flokli.de> | 2017-06-13 22:54:12 +0200 | 
| commit | e13a3175fb86eef065d0a887388da83de1b70e6b (patch) | |
| tree | 877b82767a5e939f500dc3f10cea423797dc6417 | |
| parent | dc425ce5bc3143cf4b8322602d7b7521aca37134 (diff) | |
Planet: remove temperature from output
Some Planet Switches (at least from their industrial line)
show the system temperature on the 'show version'
command, so strip it from the output, too.
| -rw-r--r-- | lib/oxidized/model/planet.rb | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/lib/oxidized/model/planet.rb b/lib/oxidized/model/planet.rb index 05a369a..9ce9cf9 100644 --- a/lib/oxidized/model/planet.rb +++ b/lib/oxidized/model/planet.rb @@ -39,9 +39,10 @@ class Planet < Oxidized::Model      cfg = cfg.each_line.to_a[0...-2] -   # Strip system time and system uptime from planet gs switches +   # Strip system (up)time and temperature      cfg = cfg.reject { |line| line.match /System Time\s*:.*/ }      cfg = cfg.reject { |line| line.match /System Uptime\s*:.*/ } +    cfg = cfg.reject { |line| line.match /Temperature\s*:.*/ }      comment cfg.join    end | 
