Support for CiscoSB OS and Version (D. Tuecks)
This commit is contained in:
10
ChangeLog
10
ChangeLog
@@ -1,5 +1,15 @@
|
|||||||
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
SNMP::Info - Friendly OO-style interface to Network devices using SNMP.
|
||||||
|
|
||||||
|
version 3.31 ()
|
||||||
|
|
||||||
|
[ENHANCEMENTS]
|
||||||
|
|
||||||
|
* Support for CiscoSB OS and Version (D. Tuecks)
|
||||||
|
|
||||||
|
[BUG FIXES]
|
||||||
|
|
||||||
|
* Correct link to MIB tarball
|
||||||
|
|
||||||
version 3.30 (2015-11-16)
|
version 3.30 (2015-11-16)
|
||||||
|
|
||||||
[ENHANCEMENTS]
|
[ENHANCEMENTS]
|
||||||
|
|||||||
@@ -52,10 +52,6 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/;
|
|||||||
|
|
||||||
$VERSION = '3.30';
|
$VERSION = '3.30';
|
||||||
|
|
||||||
# This will be filled in with the device's index into the EntPhysicalEntry
|
|
||||||
# table by the serial() function.
|
|
||||||
our $index = undef;
|
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
%SNMP::Info::Layer2::GLOBALS,
|
||||||
%SNMP::Info::Entity::GLOBALS,
|
%SNMP::Info::Entity::GLOBALS,
|
||||||
@@ -98,6 +94,10 @@ sub vendor {
|
|||||||
return 'cisco';
|
return 'cisco';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub os {
|
||||||
|
return 'ros';
|
||||||
|
}
|
||||||
|
|
||||||
# Walk the entPhysicalSerialNum table and return the first serial found
|
# Walk the entPhysicalSerialNum table and return the first serial found
|
||||||
sub serial {
|
sub serial {
|
||||||
my $ciscosb = shift;
|
my $ciscosb = shift;
|
||||||
@@ -113,9 +113,13 @@ sub serial {
|
|||||||
|
|
||||||
sub os_ver {
|
sub os_ver {
|
||||||
my $ciscosb = shift;
|
my $ciscosb = shift;
|
||||||
my $os_ver = $ciscosb->e_swver();
|
my $e_swver = $ciscosb->e_swver();
|
||||||
|
|
||||||
return $os_ver->{$index} if defined $index;
|
foreach my $e ( sort keys %$e_swver ) {
|
||||||
|
if (defined $e_swver->{$e} and $e_swver->{$e} !~ /^\s*$/) {
|
||||||
|
return $e_swver->{$e};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Grab e_model from Entity and tag on e_hwver
|
# Grab e_model from Entity and tag on e_hwver
|
||||||
@@ -124,10 +128,12 @@ sub model {
|
|||||||
my $e_model = $ciscosb->e_model();
|
my $e_model = $ciscosb->e_model();
|
||||||
my $e_hwver = $ciscosb->e_hwver();
|
my $e_hwver = $ciscosb->e_hwver();
|
||||||
|
|
||||||
if (defined ($index)) {
|
foreach my $e ( sort keys %$e_model ) {
|
||||||
my $model = "$e_model->{$index} $e_hwver->{$index}";
|
if (defined $e_model->{$e} and $e_model->{$e} !~ /^\s*$/) {
|
||||||
|
my $model = "$e_model->{$e} $e_hwver->{$e}";
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return $ciscosb->description();
|
return $ciscosb->description();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user