documentation overhaul (#353)
* ident
* remove $Id$ tags from rcs software which has been retired
* make an effort to sync required mib docs with actual code
* sync even more docs with what code actually does
* some whitespace nits
* fixup example to use snmpv2 for all but the most ancient devices
* remove blurb to find more specific snmp::info classes for classes
which alrdy are as specific as they can get (eg snmp::info::layer3::vmware
doesn't need info on to find a specific module since there ain't none)
* rename all sub {vendor} strings to lowercase vendor, if cisco, juniper
and arista can be lowercase, so can be all the rest.
* fix tests
* spread some use warnings around
* use $ instead of @
* remove defines that are included via parent classes
* use strict + warnings
* remove alrdy included modules
* add comma after last list item
* typos
* mibs are found in our mib repo, not on the cisco site
* documentation fixes
This commit is contained in:
@@ -28,6 +28,7 @@ package SNMP::Info::Layer2::Kentrox;
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@@ -57,13 +58,13 @@ $VERSION = '3.68';
|
||||
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, );
|
||||
|
||||
sub os {
|
||||
return 'Kentrox';
|
||||
return 'kentrox';
|
||||
}
|
||||
|
||||
sub os_ver {
|
||||
my $dsver = shift;
|
||||
my $descr = $dsver->description();
|
||||
if ( $descr =~ /^\S+\s\S+\s\S+\s(\S+)/){
|
||||
if ( defined ($descr) && $descr =~ /^\S+\s\S+\s\S+\s(\S+)/){
|
||||
return $1;
|
||||
}
|
||||
return;
|
||||
@@ -72,20 +73,20 @@ sub os_ver {
|
||||
sub serial {
|
||||
my $dsserial = shift;
|
||||
my $serial = $dsserial->ds_sysinfo();
|
||||
if ( $serial =~ /SERIAL\s(\S+)/){
|
||||
if ( defined ($serial) && $serial =~ /SERIAL\s(\S+)/){
|
||||
my $str = substr($1,8,10);
|
||||
return $str;
|
||||
}
|
||||
return;
|
||||
}
|
||||
sub vendor {
|
||||
return 'Kentrox';
|
||||
return 'kentrox';
|
||||
}
|
||||
|
||||
sub model {
|
||||
my $dsmodel = shift;
|
||||
my $descr = $dsmodel->description();
|
||||
if ( $descr =~ /^(\S+\s\S+)/){
|
||||
if ( defined ($descr) && $descr =~ /^(\S+\s\S+)/){
|
||||
return $1;
|
||||
}
|
||||
return;
|
||||
@@ -110,7 +111,7 @@ phishphreek@gmail.com
|
||||
Debug => 1,
|
||||
DestHost => 'myrouter',
|
||||
Community => 'public',
|
||||
Version => 1
|
||||
Version => 2
|
||||
)
|
||||
or die "Can't connect to DestHost.\n";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user