From 2b05133b001c564676554bae05baa34a9900fbe0 Mon Sep 17 00:00:00 2001 From: Robert Drake Date: Fri, 4 Nov 2016 14:26:20 -0400 Subject: This adds support for Hatteras Networks devices --- lib/oxidized/model/hatteras.rb | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 lib/oxidized/model/hatteras.rb (limited to 'lib/oxidized/model') diff --git a/lib/oxidized/model/hatteras.rb b/lib/oxidized/model/hatteras.rb new file mode 100644 index 0000000..4192cbc --- /dev/null +++ b/lib/oxidized/model/hatteras.rb @@ -0,0 +1,52 @@ +class Hatteras < Oxidized::Model + # Hatteras Networks + + prompt /^(\r?[\w.@()-]+[#>]\s?)$/ + comment '# ' + + expect /WARNING: System configuration changes will be lost when the device restarts./ do |data, re| + send "y\r" + data.sub re, '' + end + + + cmd :secret do |cfg| + cfg.gsub! /^(community) \S+/, '\\1 ""' + cfg.gsub! /^(communityString) "\S+"/, '\\1 ""' + cfg.gsub! /^(key) "\S+"/, '\\1 "