summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/opengear.rb
blob: 7f801f8d8201ff63ede1366d08a767c7e8e5d996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class OpenGear < Oxidized::Model

  comment  '# '

  cmd :secret do |cfg|
    cfg.gsub!(/password (\S+)/, 'password <secret removed>')
    cfg.gsub!(/community (\S+)/, 'community <secret removed>')
    cfg
  end

  cmd('cat /etc/version') { |cfg| comment cfg }

  cmd 'config -g config'

  cfg :ssh do
    exec true  # don't run shell, run each command in exec channel
  end

end