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:
nick n
2019-08-25 06:47:10 +02:00
committed by GitHub
parent 6c8d39d746
commit 3bcc522590
149 changed files with 630 additions and 1168 deletions

View File

@@ -1,5 +1,4 @@
# SNMP::Info::Layer3::Juniper
# $Id$
#
# Copyright (c) 2008 Bill Fenner
# All rights reserved.
@@ -31,11 +30,11 @@
package SNMP::Info::Layer3::Juniper;
use strict;
use warnings;
use Exporter;
use SNMP::Info::Layer3;
use SNMP::Info::LLDP;
@SNMP::Info::Layer3::Juniper::ISA = qw/SNMP::Info::Layer3 SNMP::Info::LLDP Exporter/;
@SNMP::Info::Layer3::Juniper::ISA = qw/SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::Juniper::EXPORT_OK = qw//;
our ($VERSION, $DEBUG, %GLOBALS, %MIBS, %FUNCS, %MUNGE);
@@ -44,7 +43,6 @@ $VERSION = '3.68';
%MIBS = (
%SNMP::Info::Layer3::MIBS,
%SNMP::Info::LLDP::MIBS,
'JUNIPER-CHASSIS-DEFINES-MIB' => 'jnxChassisDefines',
'JUNIPER-MIB' => 'jnxBoxAnatomy',
'JUNIPER-VIRTUALCHASSIS-MIB' => 'jnxVirtualChassisMemberTable',
@@ -54,7 +52,6 @@ $VERSION = '3.68';
%GLOBALS = (
%SNMP::Info::Layer3::GLOBALS,
%SNMP::Info::LLDP::GLOBALS,
'serial' => 'jnxBoxSerialNo',
'mac' => 'dot1dBaseBridgeAddress',
'box_descr' => 'jnxBoxDescr',
@@ -64,7 +61,6 @@ $VERSION = '3.68';
%FUNCS = (
%SNMP::Info::Layer3::FUNCS,
%SNMP::Info::LLDP::FUNCS,
# JUNIPER-VLAN-MIB::jnxExVlanPortGroupTable
'i_trunk' => 'jnxExVlanPortAccessMode',
@@ -91,7 +87,6 @@ $VERSION = '3.68';
%MUNGE = (
%SNMP::Info::Layer3::MUNGE,
%SNMP::Info::LLDP::MUNGE,
'e_containers_type' => \&SNMP::Info::munge_e_type,
'e_contents_type' => \&SNMP::Info::munge_e_type,
);
@@ -143,10 +138,10 @@ sub model {
my $l3 = shift;
my $id = $l3->id();
# Query the junos device model.
my $mod = uc $l3->vc_model() || '';
my $mod = $l3->vc_model() || '';
if (not $mod eq '') {
return $mod;
if (not $mod eq '') {
return uc $mod;
}
# Fallback to old method
unless ( defined $id ) {
@@ -710,8 +705,6 @@ Subclass for Juniper Devices running JUNOS
=item SNMP::Info::Layer3
=item SNMP::Info::LLDP
=back
=head2 Required MIBs
@@ -734,8 +727,6 @@ Subclass for Juniper Devices running JUNOS
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
See L<SNMP::Info::LLDP/"Required MIBs"> for its own MIB requirements.
=head1 GLOBALS
These are methods that return scalar value from SNMP
@@ -798,10 +789,6 @@ The name, model, or detailed description of the device.
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
=head2 Global Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"GLOBALS"> for details.
=head1 TABLE METHODS
These are methods that return tables of information in the form of a reference
@@ -917,8 +904,4 @@ BOOLEAN. Is a Field Replaceable unit?
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
=head2 Table Methods imported from SNMP::Info::LLDP
See documentation in L<SNMP::Info::LLDP/"TABLE METHODS"> for details.
=cut