Sha256: 407148db2f7dae65615d1b4dd1ad6ae74253e8cd4eeac3c35ac7cea58b57cdbe
Contents?: true
Size: 870 Bytes
Versions: 3
Compression:
Stored size: 870 Bytes
Contents
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| @vdom_enabled = cfg.include? 'Virtual domain configuration: enable' cfg.gsub!(/(System time: )(.*)/, '\1<stripped>\3') comment cfg end post do cfg = [] cfg << cmd('config global') if @vdom_enabled cfg << cmd('get hardware status') do |cfg| comment cfg end cfg << cmd('diagnose autoupdate version') do |cfg| comment cfg end cfg << cmd('end') if @vdom_enabled cfg << cmd('show') cfg.join "\n" end cfg :telnet do username /login:/ password /^Password:/ end cfg :telnet, :ssh do pre_logout "exit\n" end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
oxidized-0.12.2 | lib/oxidized/model/fortios.rb |
oxidized-0.12.1 | lib/oxidized/model/fortios.rb |
oxidized-0.12.0 | lib/oxidized/model/fortios.rb |