From 10ef623e5cf57de70f31063e9efde23e6d00ef75 Mon Sep 17 00:00:00 2001 From: devicenull Date: Tue, 10 Jan 2017 15:58:41 -0500 Subject: Mask out configuration date for fiberdriver Our fiberdriver devices report a timestamp during 'show running-config', which results in a config diff on every run. This patch removes the '+! Configuration saved on 2017/01/10 14:21:20' line from the config, as well as a couple other useless status messages --- lib/oxidized/model/fiberdriver.rb | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/oxidized/model/fiberdriver.rb b/lib/oxidized/model/fiberdriver.rb index 8f8eb07..c8a7f6a 100644 --- a/lib/oxidized/model/fiberdriver.rb +++ b/lib/oxidized/model/fiberdriver.rb @@ -11,6 +11,9 @@ class FiberDriver < Oxidized::Model cmd "show running-config" do |cfg| cfg.each_line.to_a[3..-1].join + cfg.gsub! /^Building configuration.*$/, '' + cfg.gsub! /^Current configuration:.*$$/, '' + cfg.gsub! /^! Configuration saved on .*$/, '' end cfg :ssh do -- cgit v1.2.1