Add placeholder method peth_port_power() to PowerEthernet class; overrides
to actually return data in Cisco, Extreme and HP classes.
This commit is contained in:
@@ -15,6 +15,8 @@ version 2.02 ()
|
||||
+ [2599795] Added vendor_i_type() method to HP and HP4000 clases
|
||||
+ [2688801] Minor modification for obscure Proxim/Orinoco device
|
||||
(jrbinks)
|
||||
+ [3051443] Add PoE measured power per port to Cisco, Extrme and HP
|
||||
classes (jeroenvi)
|
||||
* Minor tweaks to support devices without sysServices
|
||||
|
||||
version 2.01 (06/12/09)
|
||||
|
||||
@@ -45,7 +45,10 @@ $VERSION = '2.01';
|
||||
|
||||
%GLOBALS = ();
|
||||
|
||||
%FUNCS = ( 'cpeth_ent_phy' => 'cpeExtPsePortEntPhyIndex', );
|
||||
%FUNCS = (
|
||||
'cpeth_ent_phy' => 'cpeExtPsePortEntPhyIndex',
|
||||
'peth_port_power' => 'cpeExtPsePortPwrConsumption',
|
||||
);
|
||||
|
||||
%MUNGE = ();
|
||||
|
||||
@@ -143,6 +146,11 @@ to a hash.
|
||||
|
||||
Maps the C<pethPsePortTable> to C<ifIndex> by way of the F<ENTITY-MIB>.
|
||||
|
||||
=item $poe->peth_port_power()
|
||||
|
||||
Power supplied by PoE ports, in milliwatts
|
||||
("cpeExtPsePortPwrConsumption")
|
||||
|
||||
=back
|
||||
|
||||
=cut
|
||||
|
||||
@@ -59,6 +59,8 @@ $VERSION = '2.02-cvs';
|
||||
'NETSWITCH-MIB' => 'hpMsgBufFree',
|
||||
'CONFIG-MIB' => 'hpSwitchConfig',
|
||||
'HP-ICF-CHASSIS' => 'hpicfSensorObjectId',
|
||||
'HP-ICF-BRIDGE' => 'hpicfBridgeRstpForceVersion',
|
||||
'HP-ICF-POE-MIB' => 'hpicfPoePethPsePortCurrent',
|
||||
);
|
||||
|
||||
%GLOBALS = (
|
||||
@@ -74,6 +76,7 @@ $VERSION = '2.02-cvs';
|
||||
'os_version' => 'hpSwitchOsVersion.0',
|
||||
'os_bin' => 'hpSwitchRomVersion.0',
|
||||
'mac' => 'hpSwitchBaseMACAddress.0',
|
||||
'rstp_ver' => 'hpicfBridgeRstpForceVersion',
|
||||
);
|
||||
|
||||
%FUNCS = (
|
||||
@@ -95,6 +98,9 @@ $VERSION = '2.02-cvs';
|
||||
'hp_s_oid' => 'hpicfSensorObjectId',
|
||||
'hp_s_name' => 'hpicfSensorDescr',
|
||||
'hp_s_status' => 'hpicfSensorStatus',
|
||||
|
||||
# HP-ICF-POE-MIB
|
||||
'peth_port_power' => 'hpicfPoePethPsePortPower',
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
@@ -190,6 +196,11 @@ $VERSION = '2.02-cvs';
|
||||
|
||||
# Method Overrides
|
||||
|
||||
sub stp_ver {
|
||||
my $hp = shift;
|
||||
return $hp->rstp_ver() || $hp->SUPER::stp_ver();
|
||||
}
|
||||
|
||||
sub cpu {
|
||||
my $hp = shift;
|
||||
return $hp->hp_cpu();
|
||||
@@ -667,6 +678,10 @@ Included in V2 mibs from Cisco
|
||||
|
||||
=item F<CONFIG-MIB>
|
||||
|
||||
=item F<HP-ICF-BRIDGE>
|
||||
|
||||
=item F<HP-ICF-POE-MIB>
|
||||
|
||||
=back
|
||||
|
||||
The last four MIBs listed are from HP and can be found at
|
||||
@@ -826,6 +841,16 @@ Power supply 1 status
|
||||
|
||||
Power supply 2 status
|
||||
|
||||
=item $hp->peth_port_power()
|
||||
|
||||
Power supplied by PoE ports, in milliwatts
|
||||
("hpicfPoePethPsePortPower")
|
||||
|
||||
=item $hp->stp_ver()
|
||||
|
||||
Returns what version of STP the device is running.
|
||||
("hpicfBridgeRstpForceVersion" with fallback to inherited stp_ver())
|
||||
|
||||
=back
|
||||
|
||||
=head2 Globals imported from SNMP::Info::Layer2
|
||||
|
||||
@@ -52,6 +52,7 @@ $VERSION = '2.01';
|
||||
'EXTREME-SYSTEM-MIB' => 'extremeSystem',
|
||||
'EXTREME-FDB-MIB' => 'extremeSystem',
|
||||
'EXTREME-VLAN-MIB' => 'extremeVlan',
|
||||
'EXTREME-POE-MIB' => 'extremePethSystemAdminEnable',
|
||||
);
|
||||
|
||||
%GLOBALS = (
|
||||
@@ -82,6 +83,8 @@ $VERSION = '2.01';
|
||||
|
||||
# EXTREME-VLAN-MIB:extremeVlanEncapsIfTable
|
||||
'ex_vlan_encap_tag' => 'extremeVlanEncapsIfTag',
|
||||
|
||||
'peth_port_power' => 'extremePethPortMeasuredPower',
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
@@ -587,6 +590,8 @@ my $extreme = new SNMP::Info::Layer3::Extreme(...);
|
||||
|
||||
=item F<EXTREME-VLAN-MIB>
|
||||
|
||||
=item F<EXTREME-POE-MIB>
|
||||
|
||||
=item Inherited Classes' MIBs
|
||||
|
||||
See classes listed above for their required MIBs.
|
||||
@@ -748,6 +753,11 @@ identifier (iid)
|
||||
Returns (C<ifIndex>) for both key and value since we're using
|
||||
F<EXTREME-FDB-MIB> rather than F<BRIDGE-MIB>.
|
||||
|
||||
=item $extreme->peth_port_power()
|
||||
|
||||
Power supplied by PoE ports, in milliwatts
|
||||
("extremePethPortMeasuredPower")
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||
@@ -808,6 +818,7 @@ with the numeric VLAN ID and port C<ifIndex>.
|
||||
$extreme->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
|
||||
or die "Couldn't add port to egress list. ",$extreme->error(1);
|
||||
|
||||
|
||||
=back
|
||||
|
||||
=head1 Data Munging Callback Subroutines
|
||||
|
||||
@@ -89,6 +89,10 @@ sub peth_port_ifindex {
|
||||
return $peth_port_ifindex;
|
||||
}
|
||||
|
||||
sub peth_port_power {
|
||||
return {};
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
__END__
|
||||
@@ -174,6 +178,16 @@ class of the device being powered.
|
||||
|
||||
C<pethPsePortPowerClassifications>
|
||||
|
||||
=item $poe->peth_port_power()
|
||||
|
||||
Power sourced: if status is delivering power, this represents the actual
|
||||
power output to the device being powered. This is not included in the MIB,
|
||||
but we include a placeholder for the function so it can be included in
|
||||
device classes in a uniform manner.
|
||||
|
||||
Currently the Cisco, Extreme and HP classes override this method to return
|
||||
actual values.
|
||||
|
||||
=item $poe->peth_port_ifindex()
|
||||
|
||||
A mapping function from the C<pethPsePortTable> INDEX of
|
||||
|
||||
Reference in New Issue
Block a user