diff options
author | Danilo Sousa <danilopopeye@users.noreply.github.com> | 2017-09-26 14:28:21 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 14:28:21 -0300 |
commit | e62eba850753c9af7c4bf3b60c821c98e70553c9 (patch) | |
tree | fee20e97db4b40d1758997cf08e3a9192aff801b /lib/oxidized/model | |
parent | 561ae43c395a4b6c2de34ea873d904da70ec8be0 (diff) | |
parent | 3d4be0ea67fcf98dfc849006bc9b1f84221c8ab9 (diff) |
Merge pull request #1035 from tobbez/powerconnect-hide-passwords
Powerconnect: Support password removal
Diffstat (limited to 'lib/oxidized/model')
-rw-r--r-- | lib/oxidized/model/powerconnect.rb | 5 |
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/ |