removed all cisco stuff from l2 and readded it to L2::C* classes
This commit is contained in:
@@ -16,6 +16,7 @@ version 1.0 ()
|
|||||||
* More error checking in _load_attr() around bulkwalk code
|
* More error checking in _load_attr() around bulkwalk code
|
||||||
* Minor warning fix in L3::Aironet::os_ver()
|
* Minor warning fix in L3::Aironet::os_ver()
|
||||||
* Abstracted remaining Cisco stuff from L3 to L3::Cisco
|
* Abstracted remaining Cisco stuff from L3 to L3::Cisco
|
||||||
|
* Removed all Cisco stuff from L2
|
||||||
* Expanded Entity.pm to cover the whole ENTITY-MIB and improved docs.
|
* Expanded Entity.pm to cover the whole ENTITY-MIB and improved docs.
|
||||||
* changed all refs to $DEBUG to $self->debug() for reentrant code
|
* changed all refs to $DEBUG to $self->debug() for reentrant code
|
||||||
* [ 1111284 ] Parameters not being set with AutoSpecify - fixed.
|
* [ 1111284 ] Parameters not being set with AutoSpecify - fixed.
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# SNMP::Info::Layer2 - SNMP Interface to Layer2 Devices
|
# SNMP::Info::Layer2 - SNMP Interface to Layer2 Devices
|
||||||
# Max Baker
|
# Max Baker
|
||||||
#
|
#
|
||||||
# Copyright (c) 2004 Max Baker -- All changes from Version 0.7 on
|
# Copyright (c) 2004,2005 Max Baker -- All changes from Version 0.7 on
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
@@ -38,28 +38,21 @@ use strict;
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info;
|
use SNMP::Info;
|
||||||
use SNMP::Info::Bridge;
|
use SNMP::Info::Bridge;
|
||||||
use SNMP::Info::CDP;
|
|
||||||
use SNMP::Info::CiscoStats;
|
|
||||||
use SNMP::Info::Entity;
|
use SNMP::Info::Entity;
|
||||||
|
|
||||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
||||||
|
|
||||||
@SNMP::Info::Layer2::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::CDP
|
@SNMP::Info::Layer2::ISA = qw/SNMP::Info SNMP::Info::Bridge SNMP::Info::Entity Exporter/;
|
||||||
SNMP::Info::Entity SNMP::Info::CiscoStats Exporter/;
|
|
||||||
@SNMP::Info::Layer2::EXPORT_OK = qw//;
|
@SNMP::Info::Layer2::EXPORT_OK = qw//;
|
||||||
|
|
||||||
%MIBS = ( %SNMP::Info::MIBS,
|
%MIBS = ( %SNMP::Info::MIBS,
|
||||||
%SNMP::Info::Bridge::MIBS,
|
%SNMP::Info::Bridge::MIBS,
|
||||||
%SNMP::Info::CDP::MIBS,
|
|
||||||
%SNMP::Info::CiscoStats::MIBS,
|
|
||||||
%SNMP::Info::Entity::MIBS,
|
%SNMP::Info::Entity::MIBS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::GLOBALS,
|
%SNMP::Info::GLOBALS,
|
||||||
%SNMP::Info::Bridge::GLOBALS,
|
%SNMP::Info::Bridge::GLOBALS,
|
||||||
%SNMP::Info::CDP::GLOBALS,
|
|
||||||
%SNMP::Info::CiscoStats::GLOBALS,
|
|
||||||
%SNMP::Info::Entity::GLOBALS,
|
%SNMP::Info::Entity::GLOBALS,
|
||||||
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
'serial1' => '.1.3.6.1.4.1.9.3.6.3.0', # OLD-CISCO-CHASSIS-MIB::chassisId.0
|
||||||
);
|
);
|
||||||
@@ -67,8 +60,6 @@ use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
|||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::FUNCS,
|
%SNMP::Info::FUNCS,
|
||||||
%SNMP::Info::Bridge::FUNCS,
|
%SNMP::Info::Bridge::FUNCS,
|
||||||
%SNMP::Info::CDP::FUNCS,
|
|
||||||
%SNMP::Info::CiscoStats::FUNCS,
|
|
||||||
%SNMP::Info::Entity::FUNCS,
|
%SNMP::Info::Entity::FUNCS,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -76,8 +67,6 @@ use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %PORTSTAT %MUNGE $INIT/;
|
|||||||
# Inherit all the built in munging
|
# Inherit all the built in munging
|
||||||
%SNMP::Info::MUNGE,
|
%SNMP::Info::MUNGE,
|
||||||
%SNMP::Info::Bridge::MUNGE,
|
%SNMP::Info::Bridge::MUNGE,
|
||||||
%SNMP::Info::CDP::MUNGE,
|
|
||||||
%SNMP::Info::CiscoStats::MUNGE,
|
|
||||||
%SNMP::Info::Entity::MUNGE,
|
%SNMP::Info::Entity::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -106,7 +95,7 @@ sub vendor {
|
|||||||
my $model = $l2->model();
|
my $model = $l2->model();
|
||||||
my $descr = $l2->description();
|
my $descr = $l2->description();
|
||||||
|
|
||||||
if ($model =~ /hp/i or $descr =~ /hp/i) {
|
if ($model =~ /hp/i or $descr =~ /\bhp\b/i) {
|
||||||
return 'hp';
|
return 'hp';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -232,10 +221,6 @@ a more specific class using the method above.
|
|||||||
|
|
||||||
=item SNMP::Info::Bridge
|
=item SNMP::Info::Bridge
|
||||||
|
|
||||||
=item SNMP::Info::CDP
|
|
||||||
|
|
||||||
=item SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
=item SNMP::Info::Entity
|
=item SNMP::Info::Entity
|
||||||
|
|
||||||
=back
|
=back
|
||||||
@@ -283,14 +268,6 @@ See documentation in SNMP::Info for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::Bridge for details.
|
See documentation in SNMP::Info::Bridge for details.
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CDP
|
|
||||||
|
|
||||||
See documentation in SNMP::Info::CDP for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
See documentation in SNMP::Info::CiscoStats for details.
|
|
||||||
|
|
||||||
=head2 Globals imported from SNMP::Info::Entity
|
=head2 Globals imported from SNMP::Info::Entity
|
||||||
|
|
||||||
See documentation in SNMP::Info::Entity for details.
|
See documentation in SNMP::Info::Entity for details.
|
||||||
@@ -326,14 +303,6 @@ See documentation in SNMP::Info for details.
|
|||||||
|
|
||||||
See documentation in SNMP::Info::Bridge for details.
|
See documentation in SNMP::Info::Bridge for details.
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CDP
|
|
||||||
|
|
||||||
See documentation in SNMP::Info::CDP for details.
|
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::CiscoStats
|
|
||||||
|
|
||||||
See documentation in SNMP::Info::CiscoStats for details.
|
|
||||||
|
|
||||||
=head2 Table Methods imported from SNMP::Info::Entity
|
=head2 Table Methods imported from SNMP::Info::Entity
|
||||||
|
|
||||||
See documentation in SNMP::Info::Entity for details.
|
See documentation in SNMP::Info::Entity for details.
|
||||||
|
|||||||
@@ -37,8 +37,11 @@ use strict;
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer2;
|
use SNMP::Info::Layer2;
|
||||||
use SNMP::Info::CiscoVTP;
|
use SNMP::Info::CiscoVTP;
|
||||||
|
use SNMP::Info::CDP;
|
||||||
|
use SNMP::Info::CiscoStats;
|
||||||
|
|
||||||
@SNMP::Info::Layer2::C1900::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP Exporter/;
|
@SNMP::Info::Layer2::C1900::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP
|
||||||
|
SNMP::Info::CDP SNMP::Info::CiscoStats Exporter/;
|
||||||
@SNMP::Info::Layer2::C1900::EXPORT_OK = qw//;
|
@SNMP::Info::Layer2::C1900::EXPORT_OK = qw//;
|
||||||
|
|
||||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||||
@@ -47,11 +50,15 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
|||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
%SNMP::Info::Layer2::GLOBALS,
|
||||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||||
|
%SNMP::Info::CiscoStats::GLOBALS,
|
||||||
|
%SNMP::Info::CDP::GLOBALS,
|
||||||
'c1900_flash_status' => 'upgradeFlashBankStatus',
|
'c1900_flash_status' => 'upgradeFlashBankStatus',
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
|
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
|
||||||
%SNMP::Info::CiscoVTP::FUNCS,
|
%SNMP::Info::CiscoVTP::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStats::FUNCS,
|
||||||
|
%SNMP::Info::CDP::FUNCS,
|
||||||
'i_type2' => 'ifType',
|
'i_type2' => 'ifType',
|
||||||
'i_name2' => 'ifName',
|
'i_name2' => 'ifName',
|
||||||
# ESSWITCH-MIB
|
# ESSWITCH-MIB
|
||||||
@@ -68,12 +75,16 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
|||||||
%MIBS = (
|
%MIBS = (
|
||||||
%SNMP::Info::Layer2::MIBS,
|
%SNMP::Info::Layer2::MIBS,
|
||||||
%SNMP::Info::CiscoVTP::MIBS,
|
%SNMP::Info::CiscoVTP::MIBS,
|
||||||
|
%SNMP::Info::CiscoStats::MIBS,
|
||||||
|
%SNMP::Info::CDP::MIBS,
|
||||||
# Also known as the ESSWITCH-MIB
|
# Also known as the ESSWITCH-MIB
|
||||||
'STAND-ALONE-ETHERNET-SWITCH-MIB' => 'series2000'
|
'STAND-ALONE-ETHERNET-SWITCH-MIB' => 'series2000'
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (%SNMP::Info::Layer2::MUNGE,
|
%MUNGE = (%SNMP::Info::Layer2::MUNGE,
|
||||||
%SNMP::Info::CiscoVTP::MUNGE,
|
%SNMP::Info::CiscoVTP::MUNGE,
|
||||||
|
%SNMP::Info::CDP::MUNGE,
|
||||||
|
%SNMP::Info::CiscoStats::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
sub vendor {
|
sub vendor {
|
||||||
|
|||||||
@@ -37,8 +37,11 @@ use strict;
|
|||||||
use Exporter;
|
use Exporter;
|
||||||
use SNMP::Info::Layer2;
|
use SNMP::Info::Layer2;
|
||||||
use SNMP::Info::CiscoVTP;
|
use SNMP::Info::CiscoVTP;
|
||||||
|
use SNMP::Info::CDP;
|
||||||
|
use SNMP::Info::CiscoStats;
|
||||||
|
|
||||||
@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP Exporter/;
|
@SNMP::Info::Layer2::C2900::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoVTP
|
||||||
|
SNMP::Info::CDP SNMP::Info::CiscoStats Exporter/;
|
||||||
@SNMP::Info::Layer2::C2900::EXPORT_OK = qw//;
|
@SNMP::Info::Layer2::C2900::EXPORT_OK = qw//;
|
||||||
|
|
||||||
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
||||||
@@ -47,10 +50,14 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
|||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
%SNMP::Info::Layer2::GLOBALS,
|
||||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||||
|
%SNMP::Info::CiscoStats::GLOBALS,
|
||||||
|
%SNMP::Info::CDP::GLOBALS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
|
%FUNCS = (%SNMP::Info::Layer2::FUNCS,
|
||||||
%SNMP::Info::CiscoVTP::FUNCS,
|
%SNMP::Info::CiscoVTP::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStats::FUNCS,
|
||||||
|
%SNMP::Info::CDP::FUNCS,
|
||||||
'i_name' => 'ifAlias',
|
'i_name' => 'ifAlias',
|
||||||
# C2900PortEntry
|
# C2900PortEntry
|
||||||
'c2900_p_index' => 'c2900PortIfIndex',
|
'c2900_p_index' => 'c2900PortIfIndex',
|
||||||
@@ -61,11 +68,15 @@ use vars qw/$VERSION %FUNCS %GLOBALS %MIBS %MUNGE $AUTOLOAD $INIT $DEBUG/;
|
|||||||
|
|
||||||
%MIBS = ( %SNMP::Info::Layer2::MIBS,
|
%MIBS = ( %SNMP::Info::Layer2::MIBS,
|
||||||
%SNMP::Info::CiscoVTP::MIBS,
|
%SNMP::Info::CiscoVTP::MIBS,
|
||||||
|
%SNMP::Info::CiscoStats::MIBS,
|
||||||
|
%SNMP::Info::CDP::MIBS,
|
||||||
'CISCO-C2900-MIB' => 'ciscoC2900MIB',
|
'CISCO-C2900-MIB' => 'ciscoC2900MIB',
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (%SNMP::Info::Layer2::MUNGE,
|
%MUNGE = (%SNMP::Info::Layer2::MUNGE,
|
||||||
%SNMP::Info::CiscoVTP::MUNGE,
|
%SNMP::Info::CiscoVTP::MUNGE,
|
||||||
|
%SNMP::Info::CDP::MUNGE,
|
||||||
|
%SNMP::Info::CiscoStats::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
sub vendor {
|
sub vendor {
|
||||||
|
|||||||
@@ -38,33 +38,43 @@ use Exporter;
|
|||||||
use SNMP::Info::Layer2;
|
use SNMP::Info::Layer2;
|
||||||
use SNMP::Info::CiscoVTP;
|
use SNMP::Info::CiscoVTP;
|
||||||
use SNMP::Info::CiscoStack;
|
use SNMP::Info::CiscoStack;
|
||||||
|
use SNMP::Info::CDP;
|
||||||
|
use SNMP::Info::CiscoStats;
|
||||||
|
|
||||||
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
use vars qw/$VERSION $DEBUG %GLOBALS %MIBS %FUNCS %MUNGE $INIT/ ;
|
||||||
@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoStack
|
@SNMP::Info::Layer2::Catalyst::ISA = qw/SNMP::Info::Layer2 SNMP::Info::CiscoStack
|
||||||
SNMP::Info::CiscoVTP Exporter/;
|
SNMP::Info::CiscoVTP SNMP::Info::CDP SNMP::Info::CiscoStats Exporter/;
|
||||||
@SNMP::Info::Layer2::Catalyst::EXPORT_OK = qw//;
|
@SNMP::Info::Layer2::Catalyst::EXPORT_OK = qw//;
|
||||||
|
|
||||||
%MIBS = ( %SNMP::Info::Layer2::MIBS,
|
%MIBS = ( %SNMP::Info::Layer2::MIBS,
|
||||||
%SNMP::Info::CiscoVTP::MIBS,
|
%SNMP::Info::CiscoVTP::MIBS,
|
||||||
%SNMP::Info::CiscoStack::MIBS,
|
%SNMP::Info::CiscoStack::MIBS,
|
||||||
|
%SNMP::Info::CiscoStats::MIBS,
|
||||||
|
%SNMP::Info::CDP::MIBS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%GLOBALS = (
|
%GLOBALS = (
|
||||||
%SNMP::Info::Layer2::GLOBALS,
|
%SNMP::Info::Layer2::GLOBALS,
|
||||||
%SNMP::Info::CiscoVTP::GLOBALS,
|
%SNMP::Info::CiscoVTP::GLOBALS,
|
||||||
%SNMP::Info::CiscoStack::GLOBALS,
|
%SNMP::Info::CiscoStack::GLOBALS,
|
||||||
|
%SNMP::Info::CiscoStats::GLOBALS,
|
||||||
|
%SNMP::Info::CDP::GLOBALS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%FUNCS = (
|
%FUNCS = (
|
||||||
%SNMP::Info::Layer2::FUNCS,
|
%SNMP::Info::Layer2::FUNCS,
|
||||||
%SNMP::Info::CiscoVTP::FUNCS,
|
%SNMP::Info::CiscoVTP::FUNCS,
|
||||||
%SNMP::Info::CiscoStack::FUNCS,
|
%SNMP::Info::CiscoStack::FUNCS,
|
||||||
|
%SNMP::Info::CiscoStats::FUNCS,
|
||||||
|
%SNMP::Info::CDP::FUNCS,
|
||||||
);
|
);
|
||||||
|
|
||||||
%MUNGE = (
|
%MUNGE = (
|
||||||
%SNMP::Info::Layer2::MUNGE,
|
%SNMP::Info::Layer2::MUNGE,
|
||||||
%SNMP::Info::CiscoVTP::MUNGE,
|
%SNMP::Info::CiscoVTP::MUNGE,
|
||||||
%SNMP::Info::CiscoStack::MUNGE,
|
%SNMP::Info::CiscoStack::MUNGE,
|
||||||
|
%SNMP::Info::CDP::MUNGE,
|
||||||
|
%SNMP::Info::CiscoStats::MUNGE,
|
||||||
);
|
);
|
||||||
|
|
||||||
# Overidden Methods
|
# Overidden Methods
|
||||||
|
|||||||
Reference in New Issue
Block a user