summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorytti <saku@ytti.fi>2016-05-30 20:03:36 +0300
committerytti <saku@ytti.fi>2016-05-30 20:03:36 +0300
commit415c687cca3d38ac2a9839fb2184168ad24e8ed4 (patch)
tree3731329f5ac6e5229909fd2720a9f2b46e4d22a6 /lib
parent7da4179dd3e9fd298c190a5c856fb16114a1e0d3 (diff)
parent559e5c7ce9c7d6ee6849b9cabe3d574f1723ae31 (diff)
Merge pull request #436 from Alexandre-io/feat/watchguard
Add support for watchguard (FirewareOS)
Diffstat (limited to 'lib')
-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
+