From a2c6e49bfd5db6225f4b6f2321f89ac9ad9332f9 Mon Sep 17 00:00:00 2001 From: vppencilsharpener Date: Tue, 24 Jan 2017 18:01:23 -0500 Subject: Don't show error is unsupported This is the proposed fix for issue #669. Let me know if there is anything that I need to fix. This appears to be working correctly for the switch I have in house (S2400-24P). However the model is not working for the Aruba Instant AP (IAP) (virtual) controller. I hope to submit a fix for those once I have it working. The problems with that device appear to be unrelated to these changes as the prompt is incorrect. --- lib/oxidized/model/aosw.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/aosw.rb b/lib/oxidized/model/aosw.rb index 1995292..adf481b 100644 --- a/lib/oxidized/model/aosw.rb +++ b/lib/oxidized/model/aosw.rb @@ -36,10 +36,12 @@ class AOSW < Oxidized::Model end cmd 'show slots' do |cfg| + cfg = "" if cfg.match /Invalid input detected at '\^' marker/ #Don't show for unsupported devices rstrip_cfg comment cfg end cmd 'show license' do |cfg| + cfg = "" if cfg.match /Invalid input detected at '\^' marker/ #Don't show for unsupported devices rstrip_cfg comment cfg end -- cgit v1.2.1