blob: c632bb9490a0a467145119caa2c9955990a89374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
class NDMS < Oxidized::Model
# Pull config from Zyxel Keenetic devices from version NDMS >= 2.0
comment '! '
prompt /^([\w.@()-]+[#>]\s?)/m
cmd 'show version' do |cfg|
cfg = cfg.each_line.to_a[1..-3].join
comment cfg
end
cmd 'show running-config' do |cfg|
cfg = cfg.each_line.to_a[1..-2]
cfg = cfg.reject { |line| line.match /(clock date|checksum)/ }.join
cfg
end
cfg :telnet do
username /^Login:/
password /^Password:/
pre_logout 'exit'
end
end
|