From 8dda557fc3d1cee63e54329260b10a66db147131 Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Tue, 22 Jul 2014 19:57:48 +0300 Subject: Cisco ASA model added --- lib/oxidized/model/asa.rb | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 lib/oxidized/model/asa.rb (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/asa.rb b/lib/oxidized/model/asa.rb new file mode 100644 index 0000000..3ee4e2d --- /dev/null +++ b/lib/oxidized/model/asa.rb @@ -0,0 +1,48 @@ +class ASA < Oxidized::Model + + # Cisco ASA model # + # Only SSH supported for the sake of security + + prompt /^\r*([\w]+[#>]\s?)$/ + comment '! ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].join + end + + cmd :secret do |cfg| + cfg.gsub! /enable password (\S+) (.*)/, 'enable password