From b29550ce0cfaf6192652747d340da2dc777ac22b Mon Sep 17 00:00:00 2001 From: Zsolt Zsiros Date: Mon, 16 Apr 2018 14:48:43 +0200 Subject: model: netgear.rb support for older models (#1268) * Added support for older models (FW 5.x.y.z like on GS110TP, GS748Tv4, etc) * Fixed prompt regex * docs/Model-Notes/Netgear created * docs/Model-Notes/Netgear fixed typos --- lib/oxidized/model/netgear.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/oxidized/model/netgear.rb') diff --git a/lib/oxidized/model/netgear.rb b/lib/oxidized/model/netgear.rb index 0ab1349..a32eb66 100644 --- a/lib/oxidized/model/netgear.rb +++ b/lib/oxidized/model/netgear.rb @@ -1,15 +1,16 @@ class Netgear < Oxidized::Model comment '!' - prompt /^(\([\w\-.]+\)\s[#>])$/ + prompt /^(\([\w\s\-.]+\)\s[#>])$/ cmd :secret do |cfg| cfg.gsub!(/password (\S+)/, 'password ') + cfg.gsub!(/encrypted (\S+)/, 'encrypted ') cfg end cfg :telnet do - username /^User:/ + username /^(User:|Applying Interface configuration, please wait ...)/ end cfg :telnet, :ssh do -- cgit v1.2.1 From 21e3d6490496573f25ef77fe8172766ac7d1a736 Mon Sep 17 00:00:00 2001 From: Wild Kat Date: Sat, 21 Apr 2018 13:27:05 +0200 Subject: the great makeover - standardize layout, alignment, indentation --- lib/oxidized/model/netgear.rb | 2 -- 1 file changed, 2 deletions(-) (limited to 'lib/oxidized/model/netgear.rb') diff --git a/lib/oxidized/model/netgear.rb b/lib/oxidized/model/netgear.rb index a32eb66..40b0924 100644 --- a/lib/oxidized/model/netgear.rb +++ b/lib/oxidized/model/netgear.rb @@ -1,5 +1,4 @@ class Netgear < Oxidized::Model - comment '!' prompt /^(\([\w\s\-.]+\)\s[#>])$/ @@ -37,5 +36,4 @@ class Netgear < Oxidized::Model cmd 'show running-config' do |cfg| cfg.gsub! /^(!.*Time).*$/, '\1' end - end -- cgit v1.2.1