From 4f2349ffce7ac95a0b81412ca74cc75f77ef74cd Mon Sep 17 00:00:00 2001 From: Boris Bliznioukov Date: Thu, 14 Sep 2023 09:59:37 +0300 Subject: [PATCH] fix for Aruba remove extra info (#2933) * remove command timestamp output for VRP on huawei USG remove IP managemt counters on Aruba CX switches * typo * fix other commands --- lib/oxidized/model/aoscx.rb | 2 +- lib/oxidized/model/vrp.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/oxidized/model/aoscx.rb b/lib/oxidized/model/aoscx.rb index 07ef3a89e..e7a5620eb 100644 --- a/lib/oxidized/model/aoscx.rb +++ b/lib/oxidized/model/aoscx.rb @@ -70,7 +70,7 @@ class Aoscx < Oxidized::Model comment cfg end - cmd 'show system | exclude "Up Time" | exclude "CPU" | exclude "Memory"' do |cfg| + cmd 'show system | exclude "Up Time|CPU|Memory|Pkts .x|Lowest|Missed"' do |cfg| comment cfg end diff --git a/lib/oxidized/model/vrp.rb b/lib/oxidized/model/vrp.rb index 71de54c82..06ca4dfad 100644 --- a/lib/oxidized/model/vrp.rb +++ b/lib/oxidized/model/vrp.rb @@ -27,15 +27,17 @@ class VRP < Oxidized::Model end cmd 'display version' do |cfg| - cfg = cfg.each_line.reject { |l| l.match /uptime/ }.join + cfg = cfg.each_line.reject { |l| l.match /uptime|^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d(\.\d\d\d)? ?(\+\d\d:\d\d)?$/ }.join comment cfg end cmd 'display device' do |cfg| + cfg = cfg.each_line.reject { |l| l.match /^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d(\.\d\d\d)? ?(\+\d\d:\d\d)?$/ }.join comment cfg end cmd 'display current-configuration all' do |cfg| + cfg = cfg.each_line.reject { |l| l.match /^\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d(\.\d\d\d)? ?(\+\d\d:\d\d)?$/ }.join cfg end end