summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Lönnemark <ketl@nsc.liu.se>2017-09-19 16:22:13 +0200
committerTorbjörn Lönnemark <ketl@nsc.liu.se>2017-09-19 16:23:23 +0200
commit3d4be0ea67fcf98dfc849006bc9b1f84221c8ab9 (patch)
tree724baa2294cfdc37b285d96ebadb6cc59dc1c779
parentccfc6f0d69457bdf1f7867be44e1c593522ee15d (diff)
Powerconnect: Support password removal
-rw-r--r--lib/oxidized/model/powerconnect.rb5
1 files changed, 5 insertions, 0 deletions
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 <hidden> \2'
+ cfg
+ end
+
cmd 'show version' do |cfg|
if (@stackable.nil?)
@stackable = true if cfg.match /(U|u)nit\s/