[3286549] Dell LLDP Support (Nico Giefing)
This commit is contained in:
@@ -8,6 +8,7 @@ version 2.07 ()
|
|||||||
* [2996795] Support for Kentrox devices in new class L2::Kentrox (phishphreek)
|
* [2996795] Support for Kentrox devices in new class L2::Kentrox (phishphreek)
|
||||||
* [3085411] Activate L3 properties for Netgear GSM7224v2 (phishphreek)
|
* [3085411] Activate L3 properties for Netgear GSM7224v2 (phishphreek)
|
||||||
* [3085413] SNMP OIDs for Netgear Serial and OS Ver (phishphreek)
|
* [3085413] SNMP OIDs for Netgear Serial and OS Ver (phishphreek)
|
||||||
|
* [3286549] Dell LLDP Support (Nico Giefing)
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
|
|||||||
@@ -33,8 +33,9 @@ package SNMP::Info::Layer3::Dell;
|
|||||||
use strict;
|
use strict;
|
||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer3;
|
use SNMP::Info::Layer3;
|
||||||
|
use SNMP::Info::LLDP;
|
||||||
|
|
||||||
@SNMP::Info::Layer3::Dell::ISA = qw/SNMP::Info::Layer3 Exporter/;
|
@SNMP::Info::Layer3::Dell::ISA = qw/SNMP::Info::LLDP SNMP::Info::Layer3 Exporter/;
|
||||||
@SNMP::Info::Layer3::Dell::EXPORT_OK = qw//;
|
@SNMP::Info::Layer3::Dell::EXPORT_OK = qw//;
|
||||||
|
|
||||||
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
|
use vars qw/$VERSION %GLOBALS %FUNCS %MIBS %MUNGE/;
|
||||||
@@ -43,6 +44,7 @@ $VERSION = '2.06';
|
|||||||
|
|
||||||
%MIBS = (
|
%MIBS = (
|
||||||
%SNMP::Info::Layer3::MIBS,
|
%SNMP::Info::Layer3::MIBS,
|
||||||
|
%SNMP::Info::LLDP::MIBS,
|
||||||
'RADLAN-Physicaldescription-MIB' => 'rlPhdStackReorder',
|
'RADLAN-Physicaldescription-MIB' => 'rlPhdStackReorder',
|
||||||
'RADLAN-rlInterfaces' => 'rlIfNumOfLoopbackPorts',
|
'RADLAN-rlInterfaces' => 'rlIfNumOfLoopbackPorts',
|
||||||
'RADLAN-HWENVIROMENT' => 'rlEnvPhysicalDescription',
|
'RADLAN-HWENVIROMENT' => 'rlEnvPhysicalDescription',
|
||||||
@@ -51,12 +53,14 @@ $VERSION = '2.06';
|
|||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer3::GLOBALS,
|
%SNMP::Info::Layer3::GLOBALS,
|
||||||
|
%SNMP::Info::LLDP::GLOBALS,
|
||||||
'os_ver' => 'productIdentificationVersion',
|
'os_ver' => 'productIdentificationVersion',
|
||||||
'dell_id_name' => 'productIdentificationDisplayName',
|
'dell_id_name' => 'productIdentificationDisplayName',
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::Layer3::FUNCS,
|
%SNMP::Info::Layer3::FUNCS,
|
||||||
|
%SNMP::Info::LLDP::FUNCS,
|
||||||
|
|
||||||
# RADLAN-rlInterfaces:swIfTable
|
# RADLAN-rlInterfaces:swIfTable
|
||||||
'dell_duplex_admin' => 'swIfDuplexAdminMode',
|
'dell_duplex_admin' => 'swIfDuplexAdminMode',
|
||||||
@@ -102,7 +106,7 @@ $VERSION = '2.06';
|
|||||||
'dell_fan_desc' => 'rlEnvMonFanStatusDescr',
|
'dell_fan_desc' => 'rlEnvMonFanStatusDescr',
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, );
|
%MUNGE = ( %SNMP::Info::Layer3::MUNGE, %SNMP::Info::LLDP::MUNGE, );
|
||||||
|
|
||||||
# Method OverRides
|
# Method OverRides
|
||||||
|
|
||||||
@@ -228,6 +232,47 @@ sub _vendor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# lldp support
|
||||||
|
sub hasCDP {
|
||||||
|
my $dell = shift;
|
||||||
|
return $dell->hasLLDP();
|
||||||
|
}
|
||||||
|
|
||||||
|
sub c_ip {
|
||||||
|
my $dell = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
return $dell->lldp_ip($partial);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub c_if {
|
||||||
|
my $dell = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
return $dell->lldp_if($partial);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub c_port {
|
||||||
|
my $dell = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
return $dell->lldp_port($partial);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub c_id {
|
||||||
|
my $dell = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
return $dell->lldp_id($partial);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub c_platform {
|
||||||
|
my $dell = shift;
|
||||||
|
my $partial = shift;
|
||||||
|
|
||||||
|
return $dell->lldp_rem_sysdesc($partial);
|
||||||
|
}
|
||||||
|
|
||||||
1;
|
1;
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
@@ -323,6 +368,10 @@ id(). Defaults to 'dlink'.
|
|||||||
Returns 'dell', 'dlink', or 'ibm' based upon the IANA enterprise number in
|
Returns 'dell', 'dlink', or 'ibm' based upon the IANA enterprise number in
|
||||||
id(). Defaults to 'dlink'.
|
id(). Defaults to 'dlink'.
|
||||||
|
|
||||||
|
=item $dell->hasCDP()
|
||||||
|
|
||||||
|
Returns whether LLDP is enabled.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Overrides
|
=head2 Overrides
|
||||||
@@ -415,6 +464,26 @@ Some devices don't implement the C<BRIDGE-MIB> forwarding table, so we use
|
|||||||
the C<Q-BRIDGE-MIB> forwarding table. Fall back to the C<BRIDGE-MIB> if
|
the C<Q-BRIDGE-MIB> forwarding table. Fall back to the C<BRIDGE-MIB> if
|
||||||
C<Q-BRIDGE-MIB> doesn't return anything.
|
C<Q-BRIDGE-MIB> doesn't return anything.
|
||||||
|
|
||||||
|
=item $dell->c_id()
|
||||||
|
|
||||||
|
Returns LLDP information.
|
||||||
|
|
||||||
|
=item $dell->c_if()
|
||||||
|
|
||||||
|
Returns LLDP information.
|
||||||
|
|
||||||
|
=item $dell->c_ip()
|
||||||
|
|
||||||
|
Returns LLDP information.
|
||||||
|
|
||||||
|
=item $dell->c_platform()
|
||||||
|
|
||||||
|
Returns LLDP information.
|
||||||
|
|
||||||
|
=item $dell->c_port()
|
||||||
|
|
||||||
|
Returns LLDP information.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||||
|
|||||||
Reference in New Issue
Block a user