summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/fortios.rb
blob: 5e865be094a3bffc151c336913cc7fcf03f3cfa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
class FortiOS < Oxidized::Model

  comment  '# '

  prompt /^([-\w\.]+(\s[\(\w\-\.\)]+)?\s?[#>]\s?)$/

  cmd :all do |cfg, cmdstring|
    new_cfg = comment "COMMAND: #{cmdstring}\n"
    new_cfg << cfg.each_line.to_a[1..-2].join
  end

  cmd 'get system status' do |cfg|
    comment cfg
  end

  cmd 'config global'

  cmd 'get hardware status' do |cfg|
    comment cfg
  end

  cmd 'diagnose autoupdate version' do |cfg|
    comment cfg
  end

  cmd 'end'

  cmd 'show'

  cfg :telnet do
    username /^Username:/
    password /^Password:/
  end

  cfg :telnet, :ssh do
    pre_logout "exit\n"
  end

end