From 559e5c7ce9c7d6ee6849b9cabe3d574f1723ae31 Mon Sep 17 00:00:00 2001 From: Alexandre-io Date: Wed, 25 May 2016 16:59:43 +0200 Subject: Add support for watchguard (FirewareOS) --- lib/oxidized/model/firewareos.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/oxidized/model/firewareos.rb (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/firewareos.rb b/lib/oxidized/model/firewareos.rb new file mode 100644 index 0000000..f2bef4c --- /dev/null +++ b/lib/oxidized/model/firewareos.rb @@ -0,0 +1,24 @@ +class FirewareOS < Oxidized::Model + + prompt /^\[?\w*\]?\w*?#\s*$/ + comment '-- ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd 'show sysinfo' do |cfg| + # avoid commits due to uptime + cfg = cfg.each_line.select { |line| not line.match /(.*time.*)|(.*memory.*)|(.*cpu.*)/ } + cfg = cfg.join + comment cfg + end + + cmd 'export config to console' + + cfg :ssh do + pre_logout 'exit' + end + +end + -- cgit v1.2.1