summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/opengear.rb
blob: 1f94edb9e8785b2f6f33c8d51aed12a9822b33a6 (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 '# '

  prompt /^(\$\s)$/

  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