Debian Codegraph @

src/network/alcatel/omniswitch/snmp/mode/components/resources.pm

raw
1 #
2 # Copyright 2024 Centreon (http://www.centreon.com/)
3 #
4 # Centreon is a full-fledged industry-strength solution that meets
5 # the needs in IT infrastructure and application monitoring for
6 # service performance.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
11 #
12 # http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS,
16 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 # See the License for the specific language governing permissions and
18 # limitations under the License.
19 #
20
21 package network::alcatel::omniswitch::snmp::mode::components::resources;
22
23 use strict;
24 use warnings;
25 use Exporter;
26
27 our %physical_class;
28 our %phys_oper_status;
29 our %phys_admin_status;
30 our %oids;
31 our $mapping;
32
33 our @ISA = qw(Exporter);
34 our @EXPORT_OK = qw(%physical_class %phys_oper_status %phys_admin_status %oids $mapping);
35
36 %physical_class = (
37 1 => 'other',
38 2 => 'unknown',
39 3 => 'chassis',
40 4 => 'backplane',
41 5 => 'container',
42 6 => 'powerSupply',
43 7 => 'fan',
44 8 => 'sensor',
45 9 => 'module',
46 10 => 'port',
47 11 => 'stack'
48 );
49
50 %phys_oper_status = (
51 1 => 'up',
52 2 => 'down',
53 3 => 'testing',
54 4 => 'unknown',
55 5 => 'secondary',
56 6 => 'not present',
57 7 => 'unpowered',
58 8 => 'master',
59 9 => 'idle',
60 10 => 'pwrsave'
61 );
62
63 %phys_admin_status = (
64 1 => 'unknown',
65 2 => 'powerOff',
66 3 => 'powerOn',
67 4 => 'reset',
68 5 => 'takeover',
69 6 => 'resetAll',
70 7 => 'standby',
71 8 => 'resetWithFabric',
72 9 => 'takeoverWithFabrc',
73 10 => 'vcTakeover',
74 11 => 'resetVcAll'
75 );
76
77 %oids = (
78 common => {
79 entPhysicalDescr => '.1.3.6.1.2.1.47.1.1.1.1.2',
80 entPhysicalClass => '.1.3.6.1.2.1.47.1.1.1.1.5',
81 entPhysicalName => '.1.3.6.1.2.1.47.1.1.1.1.7'
82 },
83 aos6 => {
84 entreprise_alcatel_base => '.1.3.6.1.4.1.6486.800',
85
86 version => '.1.3.6.1.4.1.6486.800.1.1.1.2.1.1.3.17.0', # systemHardwareUbootVersion
87
88 chasPhysBase => '.1.3.6.1.4.1.6486.800.1.1.1.1.1.1.1',
89 chasEntPhysAdminStatus => '.1.3.6.1.4.1.6486.800.1.1.1.1.1.1.1.1',
90 chasEntPhysOperStatus => '.1.3.6.1.4.1.6486.800.1.1.1.1.1.1.1.2',
91 chasEntPhysPower => '.1.3.6.1.4.1.6486.800.1.1.1.1.1.1.1.4',
92
93 chasChassisEntry => '.1.3.6.1.4.1.6486.800.1.1.1.3.1.1.3.1',
94
95 alaChasEntPhysFanStatus => '.1.3.6.1.4.1.6486.800.1.1.1.3.1.1.11.1.2'
96 },
97 aos7 => {
98 entreprise_alcatel_base => '.1.3.6.1.4.1.6486.801',
99
100 version => '.1.3.6.1.4.1.6486.801.1.1.1.2.1.1.3.17.0', # systemHardwareUbootVersion
101
102 chasPhysBase => '.1.3.6.1.4.1.6486.801.1.1.1.1.1.1.1',
103 chasEntPhysAdminStatus => '.1.3.6.1.4.1.6486.801.1.1.1.1.1.1.1.1',
104 chasEntPhysOperStatus => '.1.3.6.1.4.1.6486.801.1.1.1.1.1.1.1.2',
105 chasEntPhysPower => '.1.3.6.1.4.1.6486.801.1.1.1.1.1.1.1.3',
106
107 chasChassisEntry => '.1.3.6.1.4.1.6486.801.1.1.1.3.1.1.3.1',
108
109 alaChasEntPhysFanStatus => '.1.3.6.1.4.1.6486.801.1.1.1.3.1.1.11.1.2'
110 }
111 );
112
113 $mapping = {
114 aos6 => {
115 entPhysicalDescr => { oid => $oids{common}->{entPhysicalDescr} },
116 entPhysicalName => { oid => $oids{common}->{entPhysicalName} },
117 chasEntPhysAdminStatus => { oid => $oids{aos6}->{chasEntPhysAdminStatus}, map => \%phys_admin_status, default => 'unknown' },
118 chasEntPhysOperStatus => { oid => $oids{aos6}->{chasEntPhysOperStatus}, map => \%phys_oper_status, default => 'unknown' },
119 chasEntPhysPower => { oid => $oids{aos6}->{chasEntPhysPower}, default => -1 }
120 },
121 aos7 => {
122 entPhysicalDescr => { oid => $oids{common}->{entPhysicalDescr} },
123 entPhysicalName => { oid => $oids{common}->{entPhysicalName} },
124 chasEntPhysAdminStatus => { oid => $oids{aos7}->{chasEntPhysAdminStatus}, map => \%phys_admin_status, default => 'unknown' },
125 chasEntPhysOperStatus => { oid => $oids{aos7}->{chasEntPhysOperStatus}, map => \%phys_oper_status, default => 'unknown' },
126 chasEntPhysPower => { oid => $oids{aos7}->{chasEntPhysPower}, default => -1 }
127 }
128 };
129
130 1;