summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/opengear.rb
blob: b7c697f73ea8ed7c85cc94fd30fa9dce2e02edb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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