From 78ab8e5a8fc7d3f965c2acf6a1fce070fc43d6c1 Mon Sep 17 00:00:00 2001 From: Marcus Stoegbauer Date: Mon, 21 Jul 2014 14:36:50 +0200 Subject: Added Force10 support --- lib/oxidized/model/ftos.rb | 47 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 lib/oxidized/model/ftos.rb diff --git a/lib/oxidized/model/ftos.rb b/lib/oxidized/model/ftos.rb new file mode 100644 index 0000000..b465271 --- /dev/null +++ b/lib/oxidized/model/ftos.rb @@ -0,0 +1,47 @@ +class FTOS < Oxidized::Model + + # Force10 FTOS model # + + comment '! ' + + cmd :all do |cfg| + cfg.each_line.to_a[2..-2].join + end + + cmd :secret do |cfg| + cfg.gsub! /^(snmp-server community).*/, '\\1 ' + cfg.gsub! /secret (\d+) (\S+).*/, '