Fix reporting of base MAC and get OS version of more devices in Juniper

This commit is contained in:
Eric A. Miller
2012-07-04 09:37:21 -04:00
parent bd6591db7b
commit 9e84141983
2 changed files with 20 additions and 4 deletions

View File

@@ -26,6 +26,8 @@ version 2.07 ()
[BUG FIXES] [BUG FIXES]
* Get OS version for Juniper devices not reporting in sysDescr
* Correct base MAC reporting for Juniper devices
* Correct reporting of SSID broadcast status in Airespace class * Correct reporting of SSID broadcast status in Airespace class
* [2929883] [3413999] LLDP interface mapping issue * [2929883] [3413999] LLDP interface mapping issue
* [3297786] LLDP TimeMark component defaults to zero (David Baldwin) * [3297786] LLDP TimeMark component defaults to zero (David Baldwin)

View File

@@ -53,7 +53,9 @@ $VERSION = '2.07';
%GLOBALS = ( %SNMP::Info::Layer3::GLOBALS, %GLOBALS = ( %SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS, %SNMP::Info::LLDP::GLOBALS,
'serial' => 'jnxBoxSerialNo.0', ); 'serial' => 'jnxBoxSerialNo.0',
'mac' => 'dot1dBaseBridgeAddress',
);
%FUNCS = ( %SNMP::Info::Layer3::FUNCS, %FUNCS = ( %SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS, %SNMP::Info::LLDP::FUNCS,
@@ -88,12 +90,16 @@ sub os {
sub os_ver { sub os_ver {
my $juniper = shift; my $juniper = shift;
my $descr = $juniper->description();
return unless defined $descr; my $descr = $juniper->description() || '';
my $lldp_descr = $juniper->lldp_sysdesc() || '';
if ( $descr =~ m/kernel JUNOS (\S+)/ ) { if ( $descr =~ m/kernel JUNOS (\S+)/ ) {
return $1; return $1;
} }
elsif ( $lldp_descr =~ m/version\s(\S+)\s/ ) {
return $1;
}
return; return;
} }
@@ -643,7 +649,8 @@ Returns 'junos'
=item $juniper->os_ver() =item $juniper->os_ver()
Returns the software version extracted from C<sysDescr>. Returns the software version extracted first from C<sysDescr> or
C<lldpLocSysDesc> if not available in C<sysDescr>.
=item $juniper->model() =item $juniper->model()
@@ -656,6 +663,13 @@ Returns serial number
(C<jnxBoxSerialNo.0>) (C<jnxBoxSerialNo.0>)
=item $juniper->serial()
Returns the MAC address used by this bridge when it must be referred
to in a unique fashion.
(C<dot1dBaseBridgeAddress>)
=item $juniper->hasCDP() =item $juniper->hasCDP()
Returns whether LLDP is enabled. Returns whether LLDP is enabled.