1SNMP::Info::Layer3::HuaUwseeir(3C)ontributed Perl DocumeSnNtMaPt:i:oInnfo::Layer3::Huawei(3)
2
3
4
6 SNMP::Info::Layer3::Huawei - SNMP Interface to Huawei switches and
7 routers.
8
10 Jeroen van Ingen and Eric Miller
11
13 # Let SNMP::Info determine the correct subclass for you.
14 my $huawei = new SNMP::Info(
15 AutoSpecify => 1,
16 Debug => 1,
17 DestHost => 'myrouter',
18 Community => 'public',
19 Version => 2
20 )
21 or die "Can't connect to DestHost.\n";
22
23 my $class = $huawei->class();
24 print "SNMP::Info determined this device to fall under subclass : $class\n";
25
27 Subclass for Huawei switches
28
29 Inherited Classes
30 SNMP::Info::Layer3
31 SNMP::Info::IEEE802dot3ad
32
33 Required MIBs
34 HUAWEI-MIB
35 HUAWEI-PORT-MIB
36 HUAWEI-IF-EXT-MIB
37 HUAWEI-L2IF-MIB
38 HUAWEI-POE-MIB
39 HUAWEI-ENTITY-EXTENT-MIB
40 Inherited Classes' MIBs
41 See SNMP::Info::Layer3 for its own MIB requirements.
42
43 See SNMP::Info::IEEE802dot3ad for its own MIB requirements.
44
46 These are methods that return scalar value from SNMP
47
48 $huawei->vendor()
49 Returns 'huawei'.
50
51 $huawei->os()
52 Returns 'VRP' if contained in "sysDescr", 'huawei' otherwise.
53
54 $huawei->os_ver()
55 Returns the software version derived from the "ENTITY-MIB" or
56 extracted from "sysDescr".
57
58 $huawei->mac()
59 Base MAC of the device.
60
61 ("dot1dBaseBridgeAddress")
62
63 $huawei->fan()
64 Return the status of all fans from the HUAWEI-ENTITY-EXTENT-MIB.
65 Returns a string indicating the number of fans 'OK' or
66 identification of any fan without a 'normal' operating status
67
68 $huawei->ps1_status()
69 Return the status of the first power supply in each chassis or
70 switch from the HUAWEI-ENTITY-EXTENT-MIB
71
72 $huawei->ps2_status()
73 Return the status of the second power supply in each chassis or
74 switch from the HUAWEI-ENTITY-EXTENT-MIB
75
76 Globals imported from SNMP::Info::Layer3
77 See documentation in SNMP::Info::Layer3 for details.
78
80 These are methods that return tables of information in the form of a
81 reference to a hash.
82
83 $huawei->i_duplex()
84 Returns reference to map of IIDs to current link duplex.
85
86 $huawei->i_duplex_admin()
87 Returns reference to hash of IIDs to admin duplex setting.
88
89 POE Slot Table
90 $huawei->peth_power_watts()
91 The slot's power supply's capacity, in watts.
92
93 "hwPoeSlotMaximumPower"
94
95 $huawei->peth_power_consumption()
96 How much power, in watts, this power supply has been committed to
97 deliver.
98
99 "hwPoeSlotConsumingPower"
100
101 $huawei->peth_power_threshold()
102 The threshold (in percent) of consumption required to raise an
103 alarm.
104
105 "hwPoeSlotPowerUtilizationThreshold"
106
107 Overrides
108 $huawei->i_ignore()
109 Returns reference to hash. Increments value of IID if port is to
110 be ignored.
111
112 Ignores InLoopback and Console interfaces
113
114 $huawei->bp_index()
115 Returns a mapping between "ifIndex" and the Bridge Table. Uses
116 "hwL2IfPortIfIndex" for the most complete mapping and falls back to
117 "dot1dBasePortIfIndex" if not available.
118
119 "agg_ports"
120 Returns a HASH reference mapping from slave to master port for each
121 member of a port bundle on the device. Keys are ifIndex of the
122 slave ports, Values are ifIndex of the corresponding master ports.
123 Attempts to use "hwTrunkIfTable" first and then
124 "dot3adAggPortListPorts" if that is unavailable.
125
126 "i_mtu"
127 Interface MTU value. Overridden with corresponding frame size entry
128 from "hwEthernetJumboframeMaxLength" if one exists.
129
130 Power Port Table
131 The index of these methods have been normalized to slot.port and values
132 munged to provide compatibility with the IEEE 802.3af POWER-ETHERNET-
133 MIB and equivalent SNMP::Info::PowerEthernet methods.
134
135 $huawei->peth_port_admin()
136 Administrative status: is this port permitted to deliver power?
137
138 $huawei->peth_port_status()
139 Current status: is this port delivering power, searching, disabled,
140 etc?
141
142 $huawei->peth_port_class()
143 Device class: if status is delivering power, this represents the
144 802.3af class of the device being powered.
145
146 $huawei->peth_port_power()
147 Power supplied the port, in milliwatts
148
149 $huawei->peth_port_ifindex()
150 Returns an index of slot.port to an "ifIndex". Slot defaults to
151 zero meaning chassis or box if there is no "ifIndex" to slot
152 mapping available in "hwPhysicalPortInSlot". Mapping the index to
153 slot.port is a normalization function to provide compatibility with
154 the IEEE 802.3af POWER-ETHERNET-MIB.
155
156 $huawei->peth_port_neg_power()
157 The power, in milliwatts, that has been committed to this port.
158 This value is derived from the 802.3af class of the device being
159 powered.
160
161 Table Methods imported from SNMP::Info::Layer3
162 See documentation in SNMP::Info::Layer3 for details.
163
164 Table Methods imported from SNMP::Info::IEEE802dot3ad
165 See documentation in SNMP::Info::IEEE802dot3ad for details.
166
168 $huawei->munge_hw_peth_admin()
169 Normalizes "hwPoePortEnable" values to 'true' or 'false'.
170
171 $huawei->munge_hw_peth_class()
172 Normalizes "hwPoePortPdClass" values by prepending 'class'.
173
174 $huawei->munge_hw_peth_power()
175 Converts and rounds to a whole number milliwatts to watts.
176
177 $huawei->munge_hw_peth_status()
178 Normalizes "hwPoePortPowerStatus" values to those that would be
179 returned by the the IEEE 802.3af POWER-ETHERNET-MIB.
180
181
182
183perl v5.30.1 2020-01-30 SNMP::Info::Layer3::Huawei(3)