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::Layer3::BayRS
|
||||
# $Id$
|
||||
#
|
||||
# Copyright (c) 2008 Eric Miller
|
||||
# All rights reserved.
|
||||
@@ -31,13 +30,12 @@
|
||||
package SNMP::Info::Layer3::BayRS;
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Exporter;
|
||||
use SNMP::Info;
|
||||
use SNMP::Info::Layer3;
|
||||
use SNMP::Info::Bridge;
|
||||
|
||||
@SNMP::Info::Layer3::BayRS::ISA = qw/SNMP::Info SNMP::Info::Layer3
|
||||
SNMP::Info::Bridge Exporter/;
|
||||
@SNMP::Info::Layer3::BayRS::ISA = qw/SNMP::Info::Layer3
|
||||
Exporter/;
|
||||
@SNMP::Info::Layer3::BayRS::EXPORT_OK = qw//;
|
||||
|
||||
our ($VERSION, %GLOBALS, %FUNCS, %MIBS, %MUNGE, %MODEL_MAP,
|
||||
@@ -46,9 +44,7 @@ our ($VERSION, %GLOBALS, %FUNCS, %MIBS, %MUNGE, %MODEL_MAP,
|
||||
$VERSION = '3.68';
|
||||
|
||||
%MIBS = (
|
||||
%SNMP::Info::MIBS,
|
||||
%SNMP::Info::Layer3::MIBS,
|
||||
%SNMP::Info::Bridge::MIBS,
|
||||
'Wellfleet-HARDWARE-MIB' => 'wfHwBpIdOpt',
|
||||
'Wellfleet-OSPF-MIB' => 'wfOspfRouterId',
|
||||
'Wellfleet-DOT1QTAG-CONFIG-MIB' => 'wfDot1qTagCfgVlanName',
|
||||
@@ -57,18 +53,14 @@ $VERSION = '3.68';
|
||||
);
|
||||
|
||||
%GLOBALS = (
|
||||
%SNMP::Info::GLOBALS,
|
||||
%SNMP::Info::Layer3::GLOBALS,
|
||||
%SNMP::Info::Bridge::GLOBALS,
|
||||
'bp_id' => 'wfHwBpIdOpt',
|
||||
'bp_serial' => 'wfHwBpSerialNumber',
|
||||
'ospf_rtr_id' => 'wfOspfRouterId',
|
||||
);
|
||||
|
||||
%FUNCS = (
|
||||
%SNMP::Info::FUNCS,
|
||||
%SNMP::Info::Layer3::FUNCS,
|
||||
%SNMP::Info::Bridge::FUNCS,
|
||||
|
||||
# From Wellfleet-CSMACD-MIB::wfCSMACDTable
|
||||
'wf_csmacd_cct' => 'wfCSMACDCct',
|
||||
@@ -107,9 +99,7 @@ $VERSION = '3.68';
|
||||
);
|
||||
|
||||
%MUNGE = (
|
||||
%SNMP::Info::MUNGE,
|
||||
%SNMP::Info::Layer3::MUNGE,
|
||||
%SNMP::Info::Bridge::MUNGE,
|
||||
'wf_hw_boot' => \&munge_hw_rev,
|
||||
'wf_hw_diag' => \&munge_hw_rev,
|
||||
'wf_hw_mobo_ser' => \&munge_wf_serial,
|
||||
@@ -541,7 +531,10 @@ sub model {
|
||||
my $bayrs = shift;
|
||||
my $bp_id = $bayrs->bp_id();
|
||||
|
||||
return defined $MODEL_MAP{$bp_id} ? $MODEL_MAP{$bp_id} : $bp_id;
|
||||
if (defined $bp_id) {
|
||||
return defined $MODEL_MAP{$bp_id} ? $MODEL_MAP{$bp_id} : $bp_id;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
sub vendor {
|
||||
@@ -776,7 +769,7 @@ sub e_index {
|
||||
my $bp_id = $bayrs->bp_id();
|
||||
|
||||
# Don't like polling all these columns to build the index, can't think of
|
||||
# a better way right now. Luckly all this data will be cached for the
|
||||
# a better way right now. Luckily all this data will be cached for the
|
||||
# rest of the e_* methods
|
||||
|
||||
# Using mib leafs so we don't have to define everything in FUNCS
|
||||
@@ -805,7 +798,7 @@ sub e_index {
|
||||
my @slots = ( $wf_mb, $wf_db, $wf_bb, $wf_mod, $wf_mod1, $wf_mod2 );
|
||||
my @mods = ( $wf_mm, $wf_dm );
|
||||
|
||||
# We're going to hack an index: Slot/Module/Postion
|
||||
# We're going to hack an index: Slot/Module/Position
|
||||
my %wf_e_index;
|
||||
|
||||
# Chassis on BN types
|
||||
@@ -1406,19 +1399,10 @@ Eric Miller
|
||||
|
||||
Abstraction subclass for routers running Avaya/Nortel BayRS.
|
||||
|
||||
For speed or debugging purposes you can call the subclass directly, but not
|
||||
after determining a more specific class using the method above.
|
||||
|
||||
my $bayrs = new SNMP::Info::Layer3::BayRS(...);
|
||||
|
||||
=head2 Inherited Classes
|
||||
|
||||
=over
|
||||
|
||||
=item SNMP::Info
|
||||
|
||||
=item SNMP::Info::Bridge
|
||||
|
||||
=item SNMP::Info::Layer3
|
||||
|
||||
=back
|
||||
@@ -1441,10 +1425,6 @@ after determining a more specific class using the method above.
|
||||
|
||||
=head2 Inherited MIBs
|
||||
|
||||
See L<SNMP::Info/"Required MIBs"> for its own MIB requirements.
|
||||
|
||||
See L<SNMP::Info::Bridge/"Required MIBs"> for its own MIB requirements.
|
||||
|
||||
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
|
||||
|
||||
=head1 GLOBALS
|
||||
@@ -1500,14 +1480,6 @@ undefined.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Globals imported from SNMP::Info
|
||||
|
||||
See documentation in L<SNMP::Info/"GLOBALS"> for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::Bridge
|
||||
|
||||
See documentation in L<SNMP::Info::Bridge/"GLOBALS"> for details.
|
||||
|
||||
=head2 Globals imported from SNMP::Info::Layer3
|
||||
|
||||
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
|
||||
@@ -1625,14 +1597,6 @@ is not contained in any other entity.
|
||||
|
||||
=back
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info
|
||||
|
||||
See documentation in L<SNMP::Info/"TABLE METHODS"> for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::Bridge
|
||||
|
||||
See documentation in L<SNMP::Info::Bridge/"TABLE METHODS"> for details.
|
||||
|
||||
=head2 Table Methods imported from SNMP::Info::Layer3
|
||||
|
||||
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
|
||||
|
||||
Reference in New Issue
Block a user