forked from ytti/oxidized
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaos.rb
46 lines (35 loc) · 718 Bytes
/
aos.rb
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class AOS < Oxidized::Model
using Refinements
# Alcatel-Lucent Operating System
# used in OmniSwitch
comment '! '
cmd :all do |cfg|
cfg.cut_both
end
cmd 'show system' do |cfg|
cfg = cfg.each_line.find { |line| line.match 'Description' }
comment cfg.to_s.strip
end
cmd 'show chassis' do |cfg|
comment cfg
end
cmd 'show hardware info' do |cfg|
comment cfg
end
cmd 'show license info' do |cfg|
comment cfg
end
cmd 'show license file' do |cfg|
comment cfg
end
cmd 'show configuration snapshot' do |cfg|
cfg
end
cfg :telnet do
username /^login : /
password /^password : /
end
cfg :telnet, :ssh do
pre_logout 'exit'
end
end