From 3d4be0ea67fcf98dfc849006bc9b1f84221c8ab9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20L=C3=B6nnemark?= Date: Tue, 19 Sep 2017 16:22:13 +0200 Subject: Powerconnect: Support password removal --- lib/oxidized/model/powerconnect.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/oxidized/model/powerconnect.rb b/lib/oxidized/model/powerconnect.rb index 618f05a..61e1cf2 100644 --- a/lib/oxidized/model/powerconnect.rb +++ b/lib/oxidized/model/powerconnect.rb @@ -13,6 +13,11 @@ class PowerConnect < Oxidized::Model cfg.each_line.to_a[1..-3].join end + cmd :secret do |cfg| + cfg.gsub! /^username (\S+) password \S+ (.*)/, 'username \1 password \2' + cfg + end + cmd 'show version' do |cfg| if (@stackable.nil?) @stackable = true if cfg.match /(U|u)nit\s/ -- cgit v1.2.1