From ce619415de7ed3b2df3402e72e79c7f8d046be6b Mon Sep 17 00:00:00 2001 From: "Eric A. Miller" Date: Sat, 21 Jun 2014 11:41:17 -0400 Subject: [PATCH] Make L2::Cisco base class for L2::Catalyst and L2::C2900 Add CiscoPortSecurity, CiscoStpExtensions, CiscoAgg to L2::Cisco Remove CiscoQOS and CiscoImage from L2::Cisco --- Info/Layer2/C2900.pm | 89 ++++---------------------- Info/Layer2/Catalyst.pm | 106 +++++++------------------------ Info/Layer2/Cisco.pm | 134 +++++++++++++++++++++++++--------------- 3 files changed, 119 insertions(+), 210 deletions(-) diff --git a/Info/Layer2/C2900.pm b/Info/Layer2/C2900.pm index f6820d22..59f257ec 100644 --- a/Info/Layer2/C2900.pm +++ b/Info/Layer2/C2900.pm @@ -34,15 +34,9 @@ package SNMP::Info::Layer2::C2900; use strict; use Exporter; -use SNMP::Info::CiscoVTP; -use SNMP::Info::CDP; -use SNMP::Info::CiscoStats; -use SNMP::Info::CiscoConfig; -use SNMP::Info::Layer2; +use SNMP::Info::Layer2::Cisco; -@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CDP - SNMP::Info::CiscoStats SNMP::Info::CiscoConfig - SNMP::Info::Layer2 Exporter/; +@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::Layer2::Cisco Exporter/; @SNMP::Info::Layer2::C2900::EXPORT_OK = qw//; use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/; @@ -50,17 +44,11 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE/; $VERSION = '3.15'; %GLOBALS = ( - %SNMP::Info::Layer2::GLOBALS, %SNMP::Info::CiscoConfig::GLOBALS, - %SNMP::Info::CiscoStats::GLOBALS, %SNMP::Info::CDP::GLOBALS, - %SNMP::Info::CiscoVTP::GLOBALS, + %SNMP::Info::Layer2::Cisco::GLOBALS, ); %FUNCS = ( - %SNMP::Info::Layer2::FUNCS, - %SNMP::Info::CiscoConfig::FUNCS, - %SNMP::Info::CiscoStats::FUNCS, - %SNMP::Info::CDP::FUNCS, - %SNMP::Info::CiscoVTP::FUNCS, + %SNMP::Info::Layer2::Cisco::FUNCS, 'i_name' => 'ifAlias', # C2900PortEntry @@ -71,15 +59,12 @@ $VERSION = '3.15'; ); %MIBS = ( - %SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoConfig::MIBS, - %SNMP::Info::CiscoStats::MIBS, %SNMP::Info::CDP::MIBS, - %SNMP::Info::CiscoVTP::MIBS, 'CISCO-C2900-MIB' => 'ciscoC2900MIB', + %SNMP::Info::Layer2::Cisco::MIBS, + 'CISCO-C2900-MIB' => 'ciscoC2900MIB', ); %MUNGE = ( - %SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoConfig::MUNGE, - %SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE, - %SNMP::Info::CiscoVTP::MUNGE, + %SNMP::Info::Layer2::Cisco::MUNGE, ); sub vendor { @@ -269,15 +254,7 @@ after determining a more specific class using the method above. =over -=item SNMP::Info::CiscoVTP - -=item SNMP::Info::CDP - -=item SNMP::Info::CiscoStats - -=item SNMP::Info::CiscoConfig - -=item SNMP::Info::Layer2 +=item SNMP::Info::Layer2::Cisco =back @@ -293,15 +270,7 @@ Part of the v2 MIBs from Cisco. =head2 Inherited MIBs -See L for its MIB requirements. - -See L for its MIB requirements. - -See L for its MIB requirements. - -See L for its MIB requirements. - -See L for its MIB requirements. +See L for its MIB requirements. =head1 GLOBALS @@ -321,25 +290,9 @@ Returns 1. Use vlan indexing. =back -=head2 Globals imported from SNMP::Info::CiscoVTP +=head2 Globals imported from SNMP::Info::Layer2::Cisco -See L for details. - -=head2 Globals imported from SNMP::Info::CDP - -See L for details. - -=head2 Globals imported from SNMP::Info::CiscoStats - -See L for details. - -=head2 Globals imported from SNMP::Info::CiscoConfig - -See L for details. - -=head2 Globals imported from SNMP::Info::Layer2 - -See L for details. +See L for details. =head1 TABLE METHODS @@ -411,25 +364,9 @@ Gives Admin speed of port =back -=head2 Table Methods imported from SNMP::Info::CiscoVTP +=head2 Table Methods imported from SNMP::Info::Layer2::Cisco -See L for details. - -=head2 Table Methods imported from SNMP::Info::CDP - -See L for details. - -=head2 Table Methods imported from SNMP::Info::CiscoStats - -See L for details. - -=head2 Table Methods imported from SNMP::Info::CiscoConfig - -See L for details. - -=head2 Table Methods imported from SNMP::Info::Layer2 - -See L for details. +See L for details. =head1 SET METHODS diff --git a/Info/Layer2/Catalyst.pm b/Info/Layer2/Catalyst.pm index b4e742f3..521677a5 100644 --- a/Info/Layer2/Catalyst.pm +++ b/Info/Layer2/Catalyst.pm @@ -34,17 +34,10 @@ package SNMP::Info::Layer2::Catalyst; use strict; use Exporter; use SNMP::Info::CiscoStack; -use SNMP::Info::CiscoVTP; -use SNMP::Info::CDP; -use SNMP::Info::CiscoStats; -use SNMP::Info::CiscoPortSecurity; -use SNMP::Info::Layer2; +use SNMP::Info::Layer2::Cisco; @SNMP::Info::Layer2::Catalyst::ISA - = qw/SNMP::Info::CiscoStack SNMP::Info::CiscoVTP - SNMP::Info::CDP SNMP::Info::CiscoStats - SNMP::Info::CiscoPortSecurity - SNMP::Info::Layer2 Exporter/; + = qw/SNMP::Info::CiscoStack SNMP::Info::Layer2::Cisco Exporter/; @SNMP::Info::Layer2::Catalyst::EXPORT_OK = qw//; use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/; @@ -52,30 +45,23 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/; $VERSION = '3.15'; %MIBS = ( - %SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoPortSecurity::MIBS, - %SNMP::Info::CiscoStats::MIBS, %SNMP::Info::CDP::MIBS, - %SNMP::Info::CiscoVTP::MIBS, %SNMP::Info::CiscoStack::MIBS, + %SNMP::Info::Layer2::Cisco::MIBS, + %SNMP::Info::CiscoStack::MIBS, ); %GLOBALS = ( - %SNMP::Info::Layer2::GLOBALS, - %SNMP::Info::CiscoPortSecurity::GLOBALS, - %SNMP::Info::CiscoStats::GLOBALS, - %SNMP::Info::CDP::GLOBALS, - %SNMP::Info::CiscoVTP::GLOBALS, + %SNMP::Info::Layer2::Cisco::GLOBALS, %SNMP::Info::CiscoStack::GLOBALS, ); %FUNCS = ( - %SNMP::Info::Layer2::FUNCS, %SNMP::Info::CiscoPortSecurity::FUNCS, - %SNMP::Info::CiscoStats::FUNCS, %SNMP::Info::CDP::FUNCS, - %SNMP::Info::CiscoVTP::FUNCS, %SNMP::Info::CiscoStack::FUNCS, + %SNMP::Info::Layer2::Cisco::FUNCS, + %SNMP::Info::CiscoStack::FUNCS, ); %MUNGE = ( - %SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoPortSecurity::MUNGE, - %SNMP::Info::CiscoStats::MUNGE, %SNMP::Info::CDP::MUNGE, - %SNMP::Info::CiscoVTP::MUNGE, %SNMP::Info::CiscoStack::MUNGE, + %SNMP::Info::Layer2::Cisco::MUNGE, + %SNMP::Info::CiscoStack::MUNGE, ); # Overidden Methods @@ -228,18 +214,10 @@ after determining a more specific class using the method above. =over +=item SNMP::Info::Layer2::Cisco + =item SNMP::Info::CiscoStack -=item SNMP::Info::CiscoVTP - -=item SNMP::Info::CDP - -=item SNMP::Info::CiscoStats - -=item SNMP::Info::CiscoPortSecurity - -=item SNMP::Info::Layer2 - =back =head2 Required MIBs @@ -248,19 +226,10 @@ after determining a more specific class using the method above. =item Inherited Classes' MIBs +See L for its own MIB requirements. + See L for its own MIB requirements. -See L for its own MIB requirements. - -See L for its own MIB requirements. - -See L for its own MIB requirements. - -See L for its own MIB -requirements. - -See L for its own MIB requirements. - =back These MIBs are found in the standard v2 MIBs from Cisco. @@ -290,30 +259,14 @@ Returns 1. Use vlan indexing. =back +=head2 Global Methods imported from SNMP::Info::Layer2::Cisco + +See documentation in L for details. + =head2 Global Methods imported from SNMP::Info::CiscoStack See documentation in L for details. -=head2 Globals imported from SNMP::Info::CiscoVTP - -See documentation in L for details. - -=head2 Global Methods imported from SNMP::Info::CDP - -See documentation in L for details. - -=head2 Global Methods imported from SNMP::Info::CiscoStats - -See documentation in L for details. - -=head2 Global Methods imported from SNMP::Info::CiscoPortSecurity - -See documentation in L for details. - -=head2 Globals imported from SNMP::Info::Layer2 - -See documentation in L for details. - =head1 TABLE METHODS These are methods that return tables of information in the form of a reference @@ -348,29 +301,12 @@ have problems with F =back +=head2 Table Methods imported from SNMP::Info::Layer2::Cisco + +See documentation in L for details. + =head2 Table Methods imported from SNMP::Info::CiscoStack See documentation in L for details. -=head2 Table Methods imported from SNMP::Info::CiscoVTP - -See documentation in L for details. - -=head2 Table Methods imported from SNMP::Info::CDP - -See documentation in L for details. - -=head2 Table Methods imported from SNMP::Info::CiscoStats - -See documentation in L for details. - -=head2 Table Methods imported from SNMP::Info::CiscoPortSecurity - -See documentation in L for -details. - -=head2 Table Methods imported from SNMP::Info::Layer2 - -See documentation in L for details. - =cut diff --git a/Info/Layer2/Cisco.pm b/Info/Layer2/Cisco.pm index 06ddc042..c96948f9 100644 --- a/Info/Layer2/Cisco.pm +++ b/Info/Layer2/Cisco.pm @@ -35,16 +35,18 @@ use Exporter; use SNMP::Info::CiscoVTP; use SNMP::Info::CDP; use SNMP::Info::CiscoStats; -use SNMP::Info::CiscoImage; use SNMP::Info::CiscoRTT; -use SNMP::Info::CiscoQOS; use SNMP::Info::CiscoConfig; +use SNMP::Info::CiscoPortSecurity; +use SNMP::Info::CiscoStpExtensions; +use SNMP::Info::CiscoAgg; use SNMP::Info::Layer2; @SNMP::Info::Layer2::Cisco::ISA = qw/SNMP::Info::CiscoVTP SNMP::Info::CDP - SNMP::Info::CiscoStats SNMP::Info::CiscoImage - SNMP::Info::CiscoRTT SNMP::Info::CiscoQOS - SNMP::Info::CiscoConfig SNMP::Info::Layer2 + SNMP::Info::CiscoStats SNMP::Info::CiscoRTT + SNMP::Info::CiscoConfig SNMP::Info::CiscoPortSecurity + SNMP::Info::CiscoStpExtensions SNMP::Info::CiscoAgg + SNMP::Info::Layer2 Exporter/; @SNMP::Info::Layer2::Cisco::EXPORT_OK = qw//; @@ -53,31 +55,51 @@ use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/; $VERSION = '3.15'; %MIBS = ( - %SNMP::Info::Layer2::MIBS, %SNMP::Info::CiscoConfig::MIBS, - %SNMP::Info::CiscoQOS::MIBS, %SNMP::Info::CiscoRTT::MIBS, - %SNMP::Info::CiscoImage::MIBS, %SNMP::Info::CiscoStats::MIBS, - %SNMP::Info::CDP::MIBS, %SNMP::Info::CiscoVTP::MIBS, + %SNMP::Info::Layer2::MIBS, + %SNMP::Info::CiscoAgg::MIBS, + %SNMP::Info::CiscoStpExtensions::MIBS, + %SNMP::Info::CiscoPortSecurity::MIBS, + %SNMP::Info::CiscoConfig::MIBS, + %SNMP::Info::CiscoRTT::MIBS, + %SNMP::Info::CiscoStats::MIBS, + %SNMP::Info::CDP::MIBS, + %SNMP::Info::CiscoVTP::MIBS, ); %GLOBALS = ( - %SNMP::Info::Layer2::GLOBALS, %SNMP::Info::CiscoConfig::GLOBALS, - %SNMP::Info::CiscoQOS::GLOBALS, %SNMP::Info::CiscoRTT::GLOBALS, - %SNMP::Info::CiscoImage::GLOBALS, %SNMP::Info::CiscoStats::GLOBALS, - %SNMP::Info::CDP::GLOBALS, %SNMP::Info::CiscoVTP::GLOBALS, + %SNMP::Info::Layer2::GLOBALS, + %SNMP::Info::CiscoAgg::GLOBALS, + %SNMP::Info::CiscoStpExtensions::GLOBALS, + %SNMP::Info::CiscoPortSecurity::GLOBALS, + %SNMP::Info::CiscoConfig::GLOBALS, + %SNMP::Info::CiscoRTT::GLOBALS, + %SNMP::Info::CiscoStats::GLOBALS, + %SNMP::Info::CDP::GLOBALS, + %SNMP::Info::CiscoVTP::GLOBALS, ); %FUNCS = ( - %SNMP::Info::Layer2::FUNCS, %SNMP::Info::CiscoConfig::FUNCS, - %SNMP::Info::CiscoQOS::FUNCS, %SNMP::Info::CiscoRTT::FUNCS, - %SNMP::Info::CiscoImage::FUNCS, %SNMP::Info::CiscoStats::FUNCS, - %SNMP::Info::CDP::FUNCS, %SNMP::Info::CiscoVTP::FUNCS, + %SNMP::Info::Layer2::FUNCS, + %SNMP::Info::CiscoAgg::FUNCS, + %SNMP::Info::CiscoStpExtensions::FUNCS, + %SNMP::Info::CiscoPortSecurity::FUNCS, + %SNMP::Info::CiscoConfig::FUNCS, + %SNMP::Info::CiscoRTT::FUNCS, + %SNMP::Info::CiscoStats::FUNCS, + %SNMP::Info::CDP::FUNCS, + %SNMP::Info::CiscoVTP::FUNCS, ); %MUNGE = ( - %SNMP::Info::Layer2::MUNGE, %SNMP::Info::CiscoConfig::MUNGE, - %SNMP::Info::CiscoQOS::MUNGE, %SNMP::Info::CiscoRTT::MUNGE, - %SNMP::Info::CiscoImage::MUNGE, %SNMP::Info::CiscoStats::MUNGE, - %SNMP::Info::CDP::MUNGE, %SNMP::Info::CiscoVTP::MUNGE, + %SNMP::Info::Layer2::MUNGE, + %SNMP::Info::CiscoAgg::MUNGE, + %SNMP::Info::CiscoStpExtensions::MUNGE, + %SNMP::Info::CiscoPortSecurity::MUNGE, + %SNMP::Info::CiscoConfig::MUNGE, + %SNMP::Info::CiscoRTT::MUNGE, + %SNMP::Info::CiscoStats::MUNGE, + %SNMP::Info::CDP::MUNGE, + %SNMP::Info::CiscoVTP::MUNGE, ); 1; @@ -85,8 +107,9 @@ __END__ =head1 NAME -SNMP::Info::Layer2::Cisco - SNMP Interface to L3 and L2+L3 IOS Cisco Device -that are not covered in other classes. +SNMP::Info::Layer2::Cisco - SNMP Interface to L2 Cisco devices that are +not covered in other classes and the base L2 Cisco class for other device +specific L2 Cisco classes. =head1 AUTHOR @@ -110,7 +133,8 @@ Max Baker =head1 DESCRIPTION -Subclass for Generic Cisco Routers running IOS +Subclass for Generic Layer 2 Cisco devices and the base L2 Cisco class for +other device specific L2 Cisco classes. =head2 Inherited Classes @@ -122,14 +146,16 @@ Subclass for Generic Cisco Routers running IOS =item SNMP::Info::CiscoStats -=item SNMP::Info::CiscoImage - =item SNMP::Info::CiscoRTT -=item SNMP::Info::CiscoQOS - =item SNMP::Info::CiscoConfig +=item SNMP::Info::CiscoPortSecurity + +=item SNMP::Info::CiscoStpExtensions + +=item SNMP::Info::CiscoAgg + =item SNMP::Info::Layer2 =back @@ -142,18 +168,20 @@ Subclass for Generic Cisco Routers running IOS See L for its own MIB requirements. -See L for its own MIB requirements. - See L for its own MIB requirements. -See L for its own MIB requirements. +See L for its own MIB requirements. See L for its own MIB requirements. -See L for its own MIB requirements. - See L for its own MIB requirements. +See L for its own MIB requirements. + +See L for its own MIB requirements. + +See L for its own MIB requirements. + See L for its own MIB requirements. =back @@ -182,22 +210,26 @@ See documentation in L for details. See documentation in L for details. -=head2 Globals imported from SNMP::Info::CiscoImage - -See documentation in L for details. - =head2 Globals imported from SNMP::Info::CiscoRTT See documentation in L for details. -=head2 Globals imported from SNMP::Info::CiscoQOS - -See documentation in L for details. - =head2 Globals imported from SNMP::Info::CiscoConfig See documentation in L for details. +=head2 Globals imported from SNMP::Info::CiscoPortSecurity + +See documentation in L for details. + +=head2 Globals imported from SNMP::Info::CiscoStpExtensions + +See documentation in L for details. + +=head2 Globals imported from SNMP::Info::CiscoAgg + +See documentation in L for details. + =head2 Globals imported from SNMP::Info::Layer2 See documentation in L for details. @@ -219,22 +251,26 @@ See documentation in L for details. See documentation in L for details. -=head2 Table Methods imported from SNMP::Info::CiscoImage - -See documentation in L for details. - =head2 Table Methods imported from SNMP::Info::CiscoRTT See documentation in L for details. -=head2 Table Methods imported from SNMP::Info::CiscoQOS - -See documentation in L for details. - =head2 Table Methods imported from SNMP::Info::CiscoConfig See documentation in L for details. +=head2 Table Methods imported from SNMP::Info::CiscoPortSecurity + +See documentation in L for details. + +=head2 Table Methods imported from SNMP::Info::CiscoStpExtensions + +See documentation in L for details. + +=head2 Table Methods imported from SNMP::Info::CiscoAgg + +See documentation in L for details. + =head2 Table Methods imported from SNMP::Info::Layer2 See documentation in L for details.