pod cleanup

This commit is contained in:
inphobia
2019-01-19 05:55:28 +01:00
parent 19cdb388e5
commit a59572b392
19 changed files with 33 additions and 87 deletions

16
LICENSE
View File

@@ -6,7 +6,7 @@ Original Code
Copyright (c) 2002,2003 Regents of the University of California Copyright (c) 2002,2003 Regents of the University of California
All rights reserved. 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: modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, * 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, * Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution. and/or other materials provided with the distribution.
* Neither the name of the University of California, Santa Cruz nor the * Neither the name of the University of California, Santa Cruz nor the
names of its contributors may be used to endorse or promote products names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission. derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 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 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 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 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 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 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@@ -188,22 +188,10 @@ See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer2 =head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details. See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.
=head1 MUNGES
=over
=back
=head1 SET METHODS =head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods These are methods that provide SNMP set functionality for overridden methods

View File

@@ -168,12 +168,6 @@ See documentation in L<SNMP::Info::Layer2/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer2 =head2 Table Methods imported from SNMP::Info::Layer2
See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details. See documentation in L<SNMP::Info::Layer2/"TABLE METHODS"> for details.

View File

@@ -154,12 +154,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer3 =head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details. See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.

View File

@@ -196,10 +196,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=over
=back
=head2 Overrides =head2 Overrides
=over =over

View File

@@ -246,10 +246,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=over
=back
=head2 Overrides =head2 Overrides
=over =over

View File

@@ -179,6 +179,7 @@ Returns the value of C<mtxrLicVersion>.
Returns the value of RouterOS level C<mtxrLicLevel> Returns the value of RouterOS level C<mtxrLicLevel>
=item $mikrotik->board_temp() =item $mikrotik->board_temp()
=item $mikrotik->cpu_temp() =item $mikrotik->cpu_temp()
Returns the appropriate temperature values Returns the appropriate temperature values
@@ -206,13 +207,8 @@ to a hash.
None. None.
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer3 =head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3> for details. See documentation in L<SNMP::Info::Layer3> for details.
=cut =cut

View File

@@ -175,12 +175,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer3 =head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details. See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.

View File

@@ -214,22 +214,10 @@ See documentation in L<SNMP::Info::Layer7/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a reference
to a hash. to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer7 =head2 Table Methods imported from SNMP::Info::Layer7
See documentation in L<SNMP::Info::Layer7/"TABLE METHODS"> for details. See documentation in L<SNMP::Info::Layer7/"TABLE METHODS"> for details.
=head1 MUNGES
=over
=back
=head1 SET METHODS =head1 SET METHODS
These are methods that provide SNMP set functionality for overridden methods These are methods that provide SNMP set functionality for overridden methods

View File

@@ -1,5 +1,5 @@
#!/usr/bin/perl #!/usr/bin/perl
# 00-load.t - Test loading of SNMP::Info # 00-load.t - Test loading of SNMP::Info
# $Id$ # $Id$
use strict; use strict;

View File

@@ -35,7 +35,7 @@ sub check_version {
# Make sure that this package is listed in Info.pm # Make sure that this package is listed in Info.pm
fail($_) unless $content =~ m/^\s*package\s+(\S+)\s*;/m; fail($_) unless $content =~ m/^\s*package\s+(\S+)\s*;/m;
my $package = $1; my $package = $1;
return if $package eq 'SNMP::Info'; return if $package eq 'SNMP::Info';

View File

@@ -20,12 +20,12 @@ Net-SNMP not found. Net-SNMP installs the perl modules SNMP and
SNMP::Session. SNMP::Session.
Versions 4.2.1 to 5.3 the Perl modules are not distributed on CPAN, you must 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 Install Net-SNMP from http://net-snmp.sourceforge.net and make sure you run
configure with the --with-perl-modules switch! 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 Perl modules as part of their 8.0 RPMS. Please uninstall them and install the
newest version by hand. newest version by hand.
@@ -48,20 +48,20 @@ SKIP: {
my ($ver_maj,$ver_min,$ver_rev) = split(/\./,$VERSION); my ($ver_maj,$ver_min,$ver_rev) = split(/\./,$VERSION);
ok ($ver_maj >= 4, 'Net-SNMP ver 4 or higher'); ok ($ver_maj >= 4, 'Net-SNMP ver 4 or higher');
if ($ver_maj == 4 and $ver_min == 2 and $ver_rev == 0){ if ($ver_maj == 4 and $ver_min == 2 and $ver_rev == 0){
print STDERR << "end_420"; print STDERR << "end_420";
SNMP module version 4.2.0 found. Please triple check that you have 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 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 the SNMP module found on CPAN. All newer versions are bundled with
Net-SNMP, and are not available on CPAN. Please find them at Net-SNMP, and are not available on CPAN. Please find them at
http://net-snmp.sourceforge.net . Make sure you run configure with the http://net-snmp.sourceforge.net . Make sure you run configure with the
--with-perl-modules switch. --with-perl-modules switch.
end_420 end_420
} }
if( $ver_maj == 5 and $ver_min == 0 and $ver_rev == 1 ){ if( $ver_maj == 5 and $ver_min == 0 and $ver_rev == 1 ){
print STDERR << "end_501"; print STDERR << "end_501";
@@ -71,7 +71,7 @@ Perl module of Net-SNMP 5.0.1 is buggy. Please upgrade.
end_501 end_501
} }
if(( $ver_maj == 5 and $ver_min == 3 and $ver_rev == 1 ) or if(( $ver_maj == 5 and $ver_min == 3 and $ver_rev == 1 ) or
( $ver_maj == 5 and $ver_min == 2 and $ver_rev == 3 )) { ( $ver_maj == 5 and $ver_min == 2 and $ver_rev == 3 )) {
print STDERR << "end_bulkwalk"; 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. turn off bulkwalk. Please upgrade.
end_bulkwalk end_bulkwalk
} }
} }
print STDERR << "end_mibs"; 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. See Man page or perldoc for SNMP::Info.
end_mibs end_mibs

View File

@@ -463,7 +463,7 @@ sub ip_index : Tests(4) {
can_ok($test->{info}, 'ip_index'); can_ok($test->{info}, 'ip_index');
my $cache_data = { my $cache_data = {
'_old_ip_index' => 1, '_old_ip_index' => 1,
'_new_ip_index' => 1, '_new_ip_index' => 1,
'_new_ip_type' => 1, '_new_ip_type' => 1,
'store' => { 'store' => {
@@ -498,7 +498,7 @@ sub ip_table : Tests(4) {
can_ok($test->{info}, 'ip_table'); can_ok($test->{info}, 'ip_table');
my $cache_data = { my $cache_data = {
'_old_ip_table' => 1, '_old_ip_table' => 1,
'_new_ip_index' => 1, '_new_ip_index' => 1,
'_new_ip_type' => 1, '_new_ip_type' => 1,
'store' => { 'store' => {
@@ -533,7 +533,7 @@ sub ip_netmask : Tests(4) {
can_ok($test->{info}, 'ip_netmask'); can_ok($test->{info}, 'ip_netmask');
my $cache_data = { my $cache_data = {
'_old_ip_netmask' => 1, '_old_ip_netmask' => 1,
'_new_ip_prefix' => 1, '_new_ip_prefix' => 1,
'_new_ip_type' => 1, '_new_ip_type' => 1,
'store' => { 'store' => {
@@ -908,7 +908,7 @@ sub resolve_desthost : Tests(6) {
'udp6:fe80:0:0:0:2d0:b7ff:fe21:c6c0', 'udp6:fe80:0:0:0:2d0:b7ff:fe21:c6c0',
q(Net-SNMP example IPv6 address returns with 'udp6:' prefix) q(Net-SNMP example IPv6 address returns with 'udp6:' prefix)
); );
dies_ok { SNMP::Info::resolve_desthost('1.2.3.4.5') } 'Bad IP dies'; dies_ok { SNMP::Info::resolve_desthost('1.2.3.4.5') } 'Bad IP dies';
} }

View File

@@ -60,7 +60,7 @@ sub qb_fdb_index : Tests(3) {
my $test = shift; my $test = shift;
can_ok( $test->{info}, 'qb_fdb_index' ); can_ok( $test->{info}, 'qb_fdb_index' );
my $expected = { 0 => 1, 3 => 91, 1 => 112, 2 => 113 }; 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)); cmp_deeply( $test->{info}->qb_fdb_index(), $expected, q(FDB to VLAN index returned expected values));

View File

@@ -377,9 +377,9 @@ sub lldp_cap : Tests(4) {
can_ok($test->{info}, 'lldp_cap'); can_ok($test->{info}, 'lldp_cap');
my $expected = ['bridge', 'router']; my $expected = ['bridge', 'router'];
my $caps = $test->{info}->lldp_cap(); my $caps = $test->{info}->lldp_cap();
cmp_set($caps->{'0.6.1'}, $expected, cmp_set($caps->{'0.6.1'}, $expected,
q(Caps emumerated correctly)); q(Caps emumerated correctly));

View File

@@ -74,7 +74,7 @@ sub setup : Tests(setup) {
2 => '802.11G Radio', 2 => '802.11G Radio',
3 => '802.11A Radio', 3 => '802.11A Radio',
4 => 'PowerPCElvis Ethernet', 4 => 'PowerPCElvis Ethernet',
}, },
}, },
}; };

View File

@@ -78,7 +78,7 @@ sub model : Tests(5) {
$test->{info}{_id} = '.100.3.6.1.4.1.20540.2.1'; $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', is($test->{info}->model(), '.100.3.6.1.4.1.20540.2.1',
q(Model is expected value when id doesn't translate)); q(Model is expected value when id doesn't translate));
$test->{info}->clear_cache(); $test->{info}->clear_cache();
is($test->{info}->model(), undef, q(No data returns undef model)); is($test->{info}->model(), undef, q(No data returns undef model));
} }

View File

@@ -44,7 +44,7 @@ sub startup : Tests(startup => 1) {
sub setup : Tests(setup) { sub setup : Tests(setup) {
my $test = shift; my $test = shift;
$test->SUPER::setup; $test->SUPER::setup;
# Start with a common cache that will serve most tests # Start with a common cache that will serve most tests
my $d_string = 'Arista Networks EOS version 4.10.4 '; my $d_string = 'Arista Networks EOS version 4.10.4 ';
$d_string .= 'running on an Arista Networks DCS-7048T-A'; $d_string .= 'running on an Arista Networks DCS-7048T-A';

View File

@@ -43,7 +43,7 @@ sub setup : Tests(setup) {
'_peth_port_class' => 1, '_peth_port_class' => 1,
'store' => { 'store' => {
'peth_port_status' => {'1.1' => 'searching', '1.3' => 'otherFault', '1.24' => 'deliveringPower'}, '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); $test->{info}->cache($cache_data);
@@ -80,4 +80,4 @@ sub peth_port_neg_power : Tests(3) {
{}, q(No data returns empty hash)); {}, q(No data returns empty hash));
} }
1; 1;