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
47
48
49
|
# File 'lib/corona/model.rb', line 3
def self.map sysDescr, sysObjectID
case sysDescr
when /Cisco Catalyst Operating System/i
'catos'
when /Cisco Controller/
'aireos'
when /IOS XR/
'iosxr'
when /NX-OS/
'nxos'
when /cisco/i, /Application Control Engine/i
'ios'
when /JUNOS/
'junos'
when /^NetScreen/, /^SSG-\d+/
'screenos'
when /Arista Networks EOS/
'eos'
when /IronWare/
'ironware'
when /^Summit/
'xos'
when /TiMOS/
'timos'
when /^Alcatel-Lucent \S+ [789]\./ 'aos7'
when /^AOS-W/
'aosw'
when /^Alcatel-Lucent/
'aos'
when /^AX Series/
'acos'
when /ProCurve/ 'procurve'
when /^\d+[A-Z]\sEthernet Switch$/
'powerconnect'
else
case sysObjectID
when Regexp.new('^' + Regexp.quote('1.3.6.1.4.1.12356.'))
'fortios' when Regexp.new('^' + Regexp.quote('1.3.6.1.4.1.6486.'))
'aos' else
'unsupported'
end
end
end
|