summaryrefslogtreecommitdiff
path: root/lib/oxidized/model/panos.rb
diff options
context:
space:
mode:
authorrivo nurges <rivo@surfar.ee>2015-05-05 11:10:11 +0000
committerrivo nurges <rivo@surfar.ee>2015-05-05 11:10:11 +0000
commita8c7ede31605ef2be21e2e75510e01dcdf4ac6be (patch)
treef654ec485451ee37474374ae17488d361407f3ba /lib/oxidized/model/panos.rb
parenteb753e2d8c19bd99ea36d8b0f492aaff5bb996bf (diff)
Palo Alto PAN-OS support
Diffstat (limited to 'lib/oxidized/model/panos.rb')
-rw-r--r--lib/oxidized/model/panos.rb26
1 files changed, 26 insertions, 0 deletions
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