From 9819805419d48662a17cf5553fef29aecb5c424f Mon Sep 17 00:00:00 2001 From: Nick Hilliard Date: Sun, 11 Oct 2015 00:55:10 +0100 Subject: Add support for Arris C4 CMTS --- lib/oxidized/model/c4cmts.rb | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/oxidized/model/c4cmts.rb (limited to 'lib') diff --git a/lib/oxidized/model/c4cmts.rb b/lib/oxidized/model/c4cmts.rb new file mode 100644 index 0000000..150029c --- /dev/null +++ b/lib/oxidized/model/c4cmts.rb @@ -0,0 +1,52 @@ +class C4CMTS < Oxidized::Model + + # Arris C4 CMTS + + prompt /^([\w.@:\/-]+[#>]\s?)$/ + comment '! ' + + cmd :all do |cfg| + cfg.each_line.to_a[1..-2].map{|line|line.delete("\r").rstrip}.join("\n") + "\n" + end + + cmd :secret do |cfg| + cfg.gsub! /(.+)\s+encrypted-password\s+\w+\s+(.*)/, '\\1