summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/firewareos.rb
diff options
context:
space:
mode:
authorAlexandre-io <alexandre@gotoserv.com>2016-05-25 16:59:43 +0200
committerAlexandre-io <alexandre@gotoserv.com>2016-05-30 18:33:40 +0200
commit559e5c7ce9c7d6ee6849b9cabe3d574f1723ae31 (patch)
treea8f314ff32dba2a0cf5e270115eee6ab06680ec2 /lib/oxidized/model/firewareos.rb
parent38e119f714f0fc22b6556eec7bff5870505ba15f (diff)
Add support for watchguard (FirewareOS)
Diffstat (limited to 'lib/oxidized/model/firewareos.rb')
-rw-r--r--lib/oxidized/model/firewareos.rb24
1 files changed, 24 insertions, 0 deletions
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*<?\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
+