From e14f9fa6ee3786db36a9ef8383c21861ccae4dde Mon Sep 17 00:00:00 2001 From: Tomi Hakala Date: Mon, 21 Jul 2014 21:03:09 +0300 Subject: Brocade Fabric OS model cleanups --- lib/oxidized/model/fabricos.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/oxidized') diff --git a/lib/oxidized/model/fabricos.rb b/lib/oxidized/model/fabricos.rb index 4854541..7ab9fd5 100644 --- a/lib/oxidized/model/fabricos.rb +++ b/lib/oxidized/model/fabricos.rb @@ -6,10 +6,6 @@ class FabricOS < Oxidized::Model prompt /^([\w]+:+[\w]+[>]\s)$/ comment '# ' - cmd :all do |cfg| - cfg - end - cmd 'chassisShow' do |cfg| comment cfg end @@ -22,8 +18,4 @@ class FabricOS < Oxidized::Model exec true # don't run shell, run each command in exec channel end - cfg :ssh do - pre_logout 'exit' - end - end -- cgit v1.2.1 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') 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