Skip to content

Commit ff44bf6

Browse files
committed
netgear: add pager handler
On some Netgear models, disabling the pager does not apply to config dumps. Add a pager handler to work around this issue. The fix was proposed by @candlerb in ytti#2391, but never committed. Fixes: ytti#2391 and ytti#3341
1 parent 97e64f2 commit ff44bf6

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
1313
- fortios: support for FortiADC (@electrocret)
1414
- output/git: cache commit log to improve performance of oxidized-web. Fixes #3121 (@robertcheramy)
1515
- digest auth handles special characters in passwords by itself (no need to url encode them manually) (@einglasvollkakao)
16+
- netgear: add pager-handler workaround, fixes: #2394 and #3341 (@candlerb, @syn-bit)
1617

1718
### Fixed
1819
- powerconnect: Mask the changing temperature issue for non-stacked switches. Fixes #2088 (@clifcox)

lib/oxidized/model/netgear.rb

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ class Netgear < Oxidized::Model
44
comment '!'
55
prompt /^\(?[\w \-+.]+\)? ?[#>] ?$/
66

7+
# Handle pager for "show version" on old Netgear models: #2394
8+
expect /^--More-- or \(q\)uit$/ do |data, re|
9+
send ' '
10+
data.sub re, ''
11+
end
12+
713
cmd :secret do |cfg|
814
cfg.gsub!(/password (\S+)/, 'password <hidden>')
915
cfg.gsub!(/encrypted (\S+)/, 'encrypted <hidden>')

0 commit comments

Comments
 (0)