blob: 046a123ca3b3fa04ee8156e7faf226791c80dbcc (
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
|
class FirewareOS < Oxidized::Model
prompt /^\[?\w*\]?\w*<?\w*>?(#|>)\s*$/
comment '-- '
cmd :all do |cfg|
cfg.each_line.to_a[1..-2].join
end
cmd 'show sysinfo' do |cfg|
# avoid commits due to uptime
cfg = cfg.each_line.select { |line| not line.match /(.*time.*)|(.*memory.*)|(.*cpu.*)/ }
cfg = cfg.join
comment cfg
end
cmd 'export config to console'
cfg :ssh do
pre_logout 'exit'
end
end
|