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