diff options
author | ytti <saku@ytti.fi> | 2016-05-30 20:03:36 +0300 |
---|---|---|
committer | ytti <saku@ytti.fi> | 2016-05-30 20:03:36 +0300 |
commit | 415c687cca3d38ac2a9839fb2184168ad24e8ed4 (patch) | |
tree | 3731329f5ac6e5229909fd2720a9f2b46e4d22a6 | |
parent | 7da4179dd3e9fd298c190a5c856fb16114a1e0d3 (diff) | |
parent | 559e5c7ce9c7d6ee6849b9cabe3d574f1723ae31 (diff) |
Merge pull request #436 from Alexandre-io/feat/watchguard
Add support for watchguard (FirewareOS)
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | lib/oxidized/model/firewareos.rb | 24 |
2 files changed, 26 insertions, 0 deletions
@@ -121,6 +121,8 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacemen * AirOS * Edgeos * EdgeSwitch + * Watchguard + * Fireware OS * Zyxel * ZyNOS 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 + |