From e13a3175fb86eef065d0a887388da83de1b70e6b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 13 Jun 2017 22:51:12 +0200 Subject: 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. --- lib/oxidized/model/planet.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.1