diff options
Diffstat (limited to 'lib/oxidized/model/fortios.rb')
-rw-r--r-- | lib/oxidized/model/fortios.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/oxidized/model/fortios.rb b/lib/oxidized/model/fortios.rb new file mode 100644 index 0000000..5e865be --- /dev/null +++ b/lib/oxidized/model/fortios.rb @@ -0,0 +1,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 |