From 7ee47d0c70443192465ba3eee2d07bae45ad8273 Mon Sep 17 00:00:00 2001 From: sfini <30525392+sfini@users.noreply.github.com> Date: Thu, 24 Aug 2017 16:42:01 +0200 Subject: Create acsw.rb for Cisco Ace Support for Cisco Ace --- lib/oxidized/model/acsw.rb | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 lib/oxidized/model/acsw.rb (limited to 'lib') diff --git a/lib/oxidized/model/acsw.rb b/lib/oxidized/model/acsw.rb new file mode 100644 index 0000000..688d488 --- /dev/null +++ b/lib/oxidized/model/acsw.rb @@ -0,0 +1,67 @@ +class ACSW < Oxidized::Model + + prompt /([\w.@()\/\\-]+[#>]\s?)/ + comment '! ' + + cmd :all do |cfg| + cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, '' + cfg.each_line.to_a[1..-2].join + end + + cmd :secret do |cfg| + cfg.gsub! /^(snmp-server community).*/, '\\1 ' + cfg.gsub! /^(username \S+ privilege \d+) (\S+).*/, '\\1