From 3346293927a52012831847954bbad4410049ea2e Mon Sep 17 00:00:00 2001 From: Sander Wegter Date: Thu, 28 Jan 2016 10:38:04 +0100 Subject: Added a substitue for the changing sflow timeout command --- lib/oxidized/model/powerconnect.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index cd04766..70a0991 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -26,7 +26,9 @@ class PowerConnect < Oxidized::Model clean cfg end - cmd 'show running-config' + cmd 'show running-config' do |cfg| + cfg.sub(/^(sflow 1 destination owner 1 timeout )\d+$/, '! \1') + end cfg :telnet, :ssh do username /^User( Name)?:/ -- cgit v1.2.1 From 304c98017b32f37d07099b8e1c4a986a21be924b Mon Sep 17 00:00:00 2001 From: Sander Wegter Date: Thu, 28 Jan 2016 11:03:51 +0100 Subject: Added the regex for variable sflow ids --- lib/oxidized/model/powerconnect.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index 70a0991..f0fa3df 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -27,7 +27,7 @@ class PowerConnect < Oxidized::Model end cmd 'show running-config' do |cfg| - cfg.sub(/^(sflow 1 destination owner 1 timeout )\d+$/, '! \1') + cfg.sub(/^(sflow \S+ destination owner \S+ timeout )\d+$/, '! \1') end cfg :telnet, :ssh do -- cgit v1.2.1