diff --git a/LICENSE b/LICENSE index 954246ea..09c1433f 100644 --- a/LICENSE +++ b/LICENSE @@ -6,7 +6,7 @@ Original Code Copyright (c) 2002,2003 Regents of the University of California All rights reserved. -Redistribution and use in source and binary forms, with or without +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, @@ -14,17 +14,17 @@ modification, are permitted provided that the following conditions are met: * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of the University of California, Santa Cruz nor the - names of its contributors may be used to endorse or promote products + * Neither the name of the University of California, Santa Cruz nor the + names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/lib/SNMP/Info/Layer2/HPVC.pm b/lib/SNMP/Info/Layer2/HPVC.pm index c9044ed2..ec1a3483 100644 --- a/lib/SNMP/Info/Layer2/HPVC.pm +++ b/lib/SNMP/Info/Layer2/HPVC.pm @@ -188,22 +188,10 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer2 See documentation in L for details. -=head1 MUNGES - -=over - -=back - =head1 SET METHODS These are methods that provide SNMP set functionality for overridden methods diff --git a/lib/SNMP/Info/Layer2/Kentrox.pm b/lib/SNMP/Info/Layer2/Kentrox.pm index 188281dc..c27c6cbd 100644 --- a/lib/SNMP/Info/Layer2/Kentrox.pm +++ b/lib/SNMP/Info/Layer2/Kentrox.pm @@ -168,12 +168,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer2 See documentation in L for details. diff --git a/lib/SNMP/Info/Layer3/BlueCoatSG.pm b/lib/SNMP/Info/Layer3/BlueCoatSG.pm index f5440e65..ca7d89dd 100644 --- a/lib/SNMP/Info/Layer3/BlueCoatSG.pm +++ b/lib/SNMP/Info/Layer3/BlueCoatSG.pm @@ -154,12 +154,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/lib/SNMP/Info/Layer3/CiscoFWSM.pm b/lib/SNMP/Info/Layer3/CiscoFWSM.pm index a28dbe29..f1ee24d6 100644 --- a/lib/SNMP/Info/Layer3/CiscoFWSM.pm +++ b/lib/SNMP/Info/Layer3/CiscoFWSM.pm @@ -196,10 +196,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=over - -=back - =head2 Overrides =over diff --git a/lib/SNMP/Info/Layer3/Lantronix.pm b/lib/SNMP/Info/Layer3/Lantronix.pm index 62480220..bdad30d3 100644 --- a/lib/SNMP/Info/Layer3/Lantronix.pm +++ b/lib/SNMP/Info/Layer3/Lantronix.pm @@ -246,10 +246,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=over - -=back - =head2 Overrides =over diff --git a/lib/SNMP/Info/Layer3/Mikrotik.pm b/lib/SNMP/Info/Layer3/Mikrotik.pm index f952a756..df1a4281 100644 --- a/lib/SNMP/Info/Layer3/Mikrotik.pm +++ b/lib/SNMP/Info/Layer3/Mikrotik.pm @@ -179,6 +179,7 @@ Returns the value of C. Returns the value of RouterOS level C =item $mikrotik->board_temp() + =item $mikrotik->cpu_temp() Returns the appropriate temperature values @@ -206,13 +207,8 @@ to a hash. None. -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. - =cut diff --git a/lib/SNMP/Info/Layer3/SonicWALL.pm b/lib/SNMP/Info/Layer3/SonicWALL.pm index c476a7c8..cdbbfa30 100644 --- a/lib/SNMP/Info/Layer3/SonicWALL.pm +++ b/lib/SNMP/Info/Layer3/SonicWALL.pm @@ -175,12 +175,6 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer3 See documentation in L for details. diff --git a/lib/SNMP/Info/Layer7/APC.pm b/lib/SNMP/Info/Layer7/APC.pm index d3d03e04..d06e4f23 100644 --- a/lib/SNMP/Info/Layer7/APC.pm +++ b/lib/SNMP/Info/Layer7/APC.pm @@ -214,22 +214,10 @@ See documentation in L for details. These are methods that return tables of information in the form of a reference to a hash. -=head2 Overrides - -=over - -=back - =head2 Table Methods imported from SNMP::Info::Layer7 See documentation in L for details. -=head1 MUNGES - -=over - -=back - =head1 SET METHODS These are methods that provide SNMP set functionality for overridden methods diff --git a/t/00_load.t b/t/00_load.t index c104e21e..dea487ca 100644 --- a/t/00_load.t +++ b/t/00_load.t @@ -1,5 +1,5 @@ #!/usr/bin/perl -# 00-load.t - Test loading of SNMP::Info +# 00-load.t - Test loading of SNMP::Info # $Id$ use strict; diff --git a/xt/00_local_docininfo.t b/xt/00_local_docininfo.t index 95095de3..9a482ade 100644 --- a/xt/00_local_docininfo.t +++ b/xt/00_local_docininfo.t @@ -35,7 +35,7 @@ sub check_version { # Make sure that this package is listed in Info.pm fail($_) unless $content =~ m/^\s*package\s+(\S+)\s*;/m; - + my $package = $1; return if $package eq 'SNMP::Info'; diff --git a/xt/00_local_prereq.t b/xt/00_local_prereq.t index 055453ad..7311523f 100644 --- a/xt/00_local_prereq.t +++ b/xt/00_local_prereq.t @@ -20,12 +20,12 @@ Net-SNMP not found. Net-SNMP installs the perl modules SNMP and SNMP::Session. Versions 4.2.1 to 5.3 the Perl modules are not distributed on CPAN, you must -install from the distribution. +install from the distribution. Install Net-SNMP from http://net-snmp.sourceforge.net and make sure you run configure with the --with-perl-modules switch! -Note to Redhat Users: Redhat, in its infinite wisdom, does not install the +Note to Redhat Users: Redhat, in its infinite wisdom, does not install the Perl modules as part of their 8.0 RPMS. Please uninstall them and install the newest version by hand. @@ -48,20 +48,20 @@ SKIP: { my ($ver_maj,$ver_min,$ver_rev) = split(/\./,$VERSION); ok ($ver_maj >= 4, 'Net-SNMP ver 4 or higher'); - + if ($ver_maj == 4 and $ver_min == 2 and $ver_rev == 0){ print STDERR << "end_420"; SNMP module version 4.2.0 found. Please triple check that you have version 4.2.0 of Net-SNMP installed, and that you did not accidently install -the SNMP module found on CPAN. All newer versions are bundled with -Net-SNMP, and are not available on CPAN. Please find them at -http://net-snmp.sourceforge.net . Make sure you run configure with the +the SNMP module found on CPAN. All newer versions are bundled with +Net-SNMP, and are not available on CPAN. Please find them at +http://net-snmp.sourceforge.net . Make sure you run configure with the --with-perl-modules switch. end_420 } - + if( $ver_maj == 5 and $ver_min == 0 and $ver_rev == 1 ){ print STDERR << "end_501"; @@ -71,7 +71,7 @@ Perl module of Net-SNMP 5.0.1 is buggy. Please upgrade. end_501 } - + if(( $ver_maj == 5 and $ver_min == 3 and $ver_rev == 1 ) or ( $ver_maj == 5 and $ver_min == 2 and $ver_rev == 3 )) { print STDERR << "end_bulkwalk"; @@ -81,13 +81,13 @@ Perl module of Net-SNMP Versions 5.3.1 and 5.2.3 have issues with bulkwalk, turn off bulkwalk. Please upgrade. end_bulkwalk - } + } } print STDERR << "end_mibs"; -Make sure you download and install the MIBS needed for SNMP::Info. +Make sure you download and install the MIBS needed for SNMP::Info. See Man page or perldoc for SNMP::Info. end_mibs diff --git a/xt/lib/Test/SNMP/Info.pm b/xt/lib/Test/SNMP/Info.pm index eaa5e5cc..c90ea846 100644 --- a/xt/lib/Test/SNMP/Info.pm +++ b/xt/lib/Test/SNMP/Info.pm @@ -463,7 +463,7 @@ sub ip_index : Tests(4) { can_ok($test->{info}, 'ip_index'); my $cache_data = { - '_old_ip_index' => 1, + '_old_ip_index' => 1, '_new_ip_index' => 1, '_new_ip_type' => 1, 'store' => { @@ -498,7 +498,7 @@ sub ip_table : Tests(4) { can_ok($test->{info}, 'ip_table'); my $cache_data = { - '_old_ip_table' => 1, + '_old_ip_table' => 1, '_new_ip_index' => 1, '_new_ip_type' => 1, 'store' => { @@ -533,7 +533,7 @@ sub ip_netmask : Tests(4) { can_ok($test->{info}, 'ip_netmask'); my $cache_data = { - '_old_ip_netmask' => 1, + '_old_ip_netmask' => 1, '_new_ip_prefix' => 1, '_new_ip_type' => 1, 'store' => { @@ -908,7 +908,7 @@ sub resolve_desthost : Tests(6) { 'udp6:fe80:0:0:0:2d0:b7ff:fe21:c6c0', q(Net-SNMP example IPv6 address returns with 'udp6:' prefix) ); - + dies_ok { SNMP::Info::resolve_desthost('1.2.3.4.5') } 'Bad IP dies'; } diff --git a/xt/lib/Test/SNMP/Info/Bridge.pm b/xt/lib/Test/SNMP/Info/Bridge.pm index 7cb5a597..180be03b 100644 --- a/xt/lib/Test/SNMP/Info/Bridge.pm +++ b/xt/lib/Test/SNMP/Info/Bridge.pm @@ -60,7 +60,7 @@ sub qb_fdb_index : Tests(3) { my $test = shift; can_ok( $test->{info}, 'qb_fdb_index' ); - + my $expected = { 0 => 1, 3 => 91, 1 => 112, 2 => 113 }; cmp_deeply( $test->{info}->qb_fdb_index(), $expected, q(FDB to VLAN index returned expected values)); diff --git a/xt/lib/Test/SNMP/Info/LLDP.pm b/xt/lib/Test/SNMP/Info/LLDP.pm index 36000f95..8a924db6 100644 --- a/xt/lib/Test/SNMP/Info/LLDP.pm +++ b/xt/lib/Test/SNMP/Info/LLDP.pm @@ -377,9 +377,9 @@ sub lldp_cap : Tests(4) { can_ok($test->{info}, 'lldp_cap'); my $expected = ['bridge', 'router']; - + my $caps = $test->{info}->lldp_cap(); - + cmp_set($caps->{'0.6.1'}, $expected, q(Caps emumerated correctly)); diff --git a/xt/lib/Test/SNMP/Info/Layer2/Aironet.pm b/xt/lib/Test/SNMP/Info/Layer2/Aironet.pm index 1e28b713..c2822e2d 100644 --- a/xt/lib/Test/SNMP/Info/Layer2/Aironet.pm +++ b/xt/lib/Test/SNMP/Info/Layer2/Aironet.pm @@ -74,7 +74,7 @@ sub setup : Tests(setup) { 2 => '802.11G Radio', 3 => '802.11A Radio', 4 => 'PowerPCElvis Ethernet', - }, + }, }, }; diff --git a/xt/lib/Test/SNMP/Info/Layer2/Sixnet.pm b/xt/lib/Test/SNMP/Info/Layer2/Sixnet.pm index 423b3881..58f85ed3 100644 --- a/xt/lib/Test/SNMP/Info/Layer2/Sixnet.pm +++ b/xt/lib/Test/SNMP/Info/Layer2/Sixnet.pm @@ -78,7 +78,7 @@ sub model : Tests(5) { $test->{info}{_id} = '.100.3.6.1.4.1.20540.2.1'; is($test->{info}->model(), '.100.3.6.1.4.1.20540.2.1', q(Model is expected value when id doesn't translate)); - + $test->{info}->clear_cache(); is($test->{info}->model(), undef, q(No data returns undef model)); } diff --git a/xt/lib/Test/SNMP/Info/Layer3/Arista.pm b/xt/lib/Test/SNMP/Info/Layer3/Arista.pm index 132fb3ab..9029a32b 100644 --- a/xt/lib/Test/SNMP/Info/Layer3/Arista.pm +++ b/xt/lib/Test/SNMP/Info/Layer3/Arista.pm @@ -44,7 +44,7 @@ sub startup : Tests(startup => 1) { sub setup : Tests(setup) { my $test = shift; $test->SUPER::setup; - + # Start with a common cache that will serve most tests my $d_string = 'Arista Networks EOS version 4.10.4 '; $d_string .= 'running on an Arista Networks DCS-7048T-A'; diff --git a/xt/lib/Test/SNMP/Info/PowerEthernet.pm b/xt/lib/Test/SNMP/Info/PowerEthernet.pm index 3e2a473c..66d83a9b 100644 --- a/xt/lib/Test/SNMP/Info/PowerEthernet.pm +++ b/xt/lib/Test/SNMP/Info/PowerEthernet.pm @@ -43,7 +43,7 @@ sub setup : Tests(setup) { '_peth_port_class' => 1, 'store' => { 'peth_port_status' => {'1.1' => 'searching', '1.3' => 'otherFault', '1.24' => 'deliveringPower'}, - 'peth_port_class' => {'1.1' => 'class0', '1.3' => 'class0', '1.24' => 'class3'}, + 'peth_port_class' => {'1.1' => 'class0', '1.3' => 'class0', '1.24' => 'class3'}, }, }; $test->{info}->cache($cache_data); @@ -80,4 +80,4 @@ sub peth_port_neg_power : Tests(3) { {}, q(No data returns empty hash)); } -1; \ No newline at end of file +1;