From d9bb937a264398274ae1a8f5cd24267c5c72115e Mon Sep 17 00:00:00 2001 From: glaubway Date: Thu, 4 Jun 2020 12:39:13 +0300 Subject: [PATCH 1/6] Model for Eltex MES tested with MES2324FB --- lib/oxidized/model/eltex.rb | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 lib/oxidized/model/eltex.rb diff --git a/lib/oxidized/model/eltex.rb b/lib/oxidized/model/eltex.rb new file mode 100644 index 000000000..2f92c47c4 --- /dev/null +++ b/lib/oxidized/model/eltex.rb @@ -0,0 +1,46 @@ +class Eltex < Oxidized::Model + prompt /^\s?[\w.@\(\)-]+[#>]\s?$/ + comment '! ' + + cmd :all do |cfg| + cfg.gsub! /^% Invalid input detected at '\^' marker\.$|^\s+\^$/, '' + cfg.cut_both + end + + cmd :secret do |cfg| + cfg.gsub! /^(snmp-server community).*/, '\\1 ' + cfg.gsub! /^(enable (password|secret)( level \d+)? \d) .+/, '\\1