From a8c7ede31605ef2be21e2e75510e01dcdf4ac6be Mon Sep 17 00:00:00 2001 From: rivo nurges Date: Tue, 5 May 2015 11:10:11 +0000 Subject: Palo Alto PAN-OS support --- README.md | 1 + lib/oxidized/model/panos.rb | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 lib/oxidized/model/panos.rb diff --git a/README.md b/README.md index c9a5b0d..1f7622d 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,7 @@ Oxidized is a network device configuration backup tool. It's a RANCID replacment * Juniper ScreenOS (Netscreen) * Mikrotik RouterOS * Ubiquiti AirOS + * Palo Alto PAN-OS # Installation diff --git a/lib/oxidized/model/panos.rb b/lib/oxidized/model/panos.rb new file mode 100644 index 0000000..35624b7 --- /dev/null +++ b/lib/oxidized/model/panos.rb @@ -0,0 +1,26 @@ +class PanOS < Oxidized::Model + + # PaloAlto PAN-OS model # + + comment '! ' + + prompt /^[\w.\@:\(\)-]+>\s?$/ + + cmd :all do |cfg| + cfg.each_line.to_a[2..-3].join + end + + cmd 'show system info' do |cfg| + cfg.gsub! /^(up)?time:\ .*\n/, '' + comment cfg + end + + cmd 'show config running' do |cfg| + cfg + end + + cfg :ssh do + post_login 'set cli pager off' + pre_logout 'exit' + end +end -- cgit v1.2.1