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:
@@ -1,5 +1,4 @@
|
||||
# SNMP::Info::Layer2::ZyXEL_DSLAM
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Max Baker
|
||||
# All rights reserved.
|
||||
@@ -31,6 +30,7 @@
|
||||
package SNMP::Info::Layer2::ZyXEL_DSLAM;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
use SNMP::Info::Layer2;
|
||||
|
||||
@@ -77,7 +77,7 @@ sub os_ver {
|
||||
my $zyxel = shift;
|
||||
my $descr = $zyxel->description();
|
||||
|
||||
if ( $descr =~ m/version (\S+) / ) {
|
||||
if ( defined ($descr) && $descr =~ m/version (\S+) / ) {
|
||||
return $1;
|
||||
}
|
||||
return;
|
||||
@@ -88,11 +88,13 @@ sub model {
|
||||
|
||||
my $desc = $zyxel->description();
|
||||
|
||||
if ( $desc =~ /8-port ADSL Module\(Annex A\)/ ) {
|
||||
if (defined $desc) {
|
||||
if ($desc =~ /8-port ADSL Module\(Annex A\)/) {
|
||||
return "AAM1008-61";
|
||||
}
|
||||
elsif ( $desc =~ /8-port ADSL Module\(Annex B\)/ ) {
|
||||
}
|
||||
elsif ($desc =~ /8-port ADSL Module\(Annex B\)/) {
|
||||
return "AAM1008-63";
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -130,11 +132,11 @@ Dmitry Sergienko (C<dmitry@trifle.net>)
|
||||
Debug => 1,
|
||||
DestHost => 'myhub',
|
||||
Community => 'public',
|
||||
Version => 1
|
||||
Version => 2
|
||||
)
|
||||
or die "Can't connect to DestHost.\n";
|
||||
|
||||
my $class = $l2->class();
|
||||
my $class = $zyxel->class();
|
||||
print "SNMP::Info determined this device to fall under subclass : $class\n";
|
||||
|
||||
=head1 DESCRIPTION
|
||||
@@ -174,11 +176,11 @@ These are methods that return scalar value from SNMP
|
||||
|
||||
=item $zyxel->vendor()
|
||||
|
||||
Returns 'ZyXEL' :)
|
||||
Returns 'zyxel'
|
||||
|
||||
=item $zyxel->os()
|
||||
|
||||
Returns 'ZyXEL'
|
||||
Returns 'zyxel'
|
||||
|
||||
=item $zyxel->os_ver()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user