Merge branch 'master' of ssh://snmp-info.git.sourceforge.net/gitroot/snmp-info/snmp-info

This commit is contained in:
Eric A. Miller
2012-07-04 08:23:48 -04:00
4 changed files with 220 additions and 4 deletions

View File

@@ -7,6 +7,8 @@ version 2.07 ()
* Basic support for APC UPS devices
* [2993691] Support for SonicWALL devices in new class L3::SonicWALL (phishphreek)
* [2996795] Support for Kentrox devices in new class L2::Kentrox (phishphreek)
* [] Basic support for Blue Coat proxy devices in new class L3::BlueCoatSG (jeroenvi)
* [] Support Cisco 6500 / Sup2T in L3::C6500 class (jeroenvi)
[ENHANCEMENTS]
@@ -20,6 +22,7 @@ version 2.07 ()
* [3472052] moduleSerialNumber support for Cisco Stack (Slava)
* [3523320] Better VLAN support in Juniper class (Web Bulley)
* [3532261] LLDP support in C6500 and related (Carlos Vicente)
* [3538949] Updated switch models in L2::HP (jeroenvi)
[BUG FIXES]

15
Info.pm
View File

@@ -641,6 +641,12 @@ ARN, AN, 2430, and 5430 routers.
See documentation in L<SNMP::Info::Layer3::BayRS> for details.
=item SNMP::Info::Layer3::BlueCoatSG
Subclass for Blue Coat SG series proxy devices.
See documentation in L<SNMP::Info::Layer3::BlueCoatSG> for details.
=item SNMP::Info::Layer3::C3550
Subclass for Cisco Catalyst 3550,3540,3560 2/3 switches running IOS.
@@ -1248,6 +1254,7 @@ sub device_type {
2636 => 'SNMP::Info::Layer3::Juniper',
2925 => 'SNMP::Info::Layer1::Cyclades',
3076 => 'SNMP::Info::Layer3::Altiga',
3417 => 'SNMP::Info::Layer3::BlueCoatSG',
4526 => 'SNMP::Info::Layer2::Netgear',
5624 => 'SNMP::Info::Layer3::Enterasys',
6486 => 'SNMP::Info::Layer3::AlcatelLucent',
@@ -1307,13 +1314,17 @@ sub device_type {
and $desc =~ /\D(CAP340|AP340|CAP350|350|1200)\D/ );
$objtype = 'SNMP::Info::Layer3::Aironet'
if ( $desc =~ /Aironet/ and $desc =~ /\D(AP4800)\D/ );
# Cat6k with older SUPs (hybrid CatOS/IOS?)
$objtype = 'SNMP::Info::Layer3::C6500' if $desc =~ /(c6sup2|c6sup1)/;
# Cat6k with Sup720, Sup720 or Sup2T (and Sup2 running native IOS?)
$objtype = 'SNMP::Info::Layer3::C6500'
if $desc =~ /(s72033_rp|s3223_rp|s32p3_rp|s222_rp|s2t54)/;
# Next one untested. Reported working by DA
$objtype = 'SNMP::Info::Layer3::C6500'
if ( $desc =~ /cisco/i and $desc =~ /3750/ );
$objtype = 'SNMP::Info::Layer3::C6500'
if $desc =~ /(s72033_rp|s3223_rp|s32p3_rp|s222_rp)/;
# Cisco 2970
$objtype = 'SNMP::Info::Layer3::C6500'

View File

@@ -148,6 +148,15 @@ $VERSION = '2.06';
'J8771A' => '4202vl-48G',
'J4865A' => '4108GL',
'J4887A' => '4104GL',
'J9588A' => '3800-48G-PoE+-4XG',
'J9574A' => '3800-48G-PoE+-4SFP+',
'J9586A' => '3800-48G-4XG',
'J9576A' => '3800-48G-4SFP+',
'J9584A' => '3800-24SFP-2SFP+',
'J9587A' => '3800-24G-PoE+-2XG',
'J9573A' => '3800-24G-PoE+-2SFP+',
'J9585A' => '3800-24G-2XG',
'J9575A' => '3800-24G-2SFP+',
'J8693A' => '3500yl-48G-PWR',
'J8692A' => '3500yl-24G-PWR',
'J9473A' => '3500-48-PoE',
@@ -177,6 +186,11 @@ $VERSION = '2.06';
'J4900B' => '2626-CR',
'J4900C' => '2626C',
'J4900A' => '2626',
'J9627A' => '2620-48-PoE+',
'J9624A' => '2620-48',
'J9624A' => '2620-24-PPoE+',
'J9625A' => '2620-24-PoE+',
'J9623A' => '2620-24',
'J9565A' => '2615-8-PoE',
'J9089A' => '2610-48-PWR',
'J9088A' => '2610-48',
@@ -185,10 +199,10 @@ $VERSION = '2.06';
'J9085A' => '2610-24',
'J8762A' => '2600-8-PWR',
'J4813A' => '2524',
'J9137A' => '2520-8-PoE',
'J9138A' => '2520-24-PoE',
'J9298A' => '2520G-8-PoE',
'J9299A' => '2520G-24-PoE',
'J9137A' => '2520-8-PoE',
'J9138A' => '2520-24-PoE',
'J4812A' => '2512',
'J9280A' => '2510G-48',
'J9279A' => '2510G-24',
@@ -774,6 +788,15 @@ number and the common model number with this map :
'J8771A' => '4202vl-48G',
'J4865A' => '4108GL',
'J4887A' => '4104GL',
'J9588A' => '3800-48G-PoE+-4XG',
'J9574A' => '3800-48G-PoE+-4SFP+',
'J9586A' => '3800-48G-4XG',
'J9576A' => '3800-48G-4SFP+',
'J9584A' => '3800-24SFP-2SFP+',
'J9587A' => '3800-24G-PoE+-2XG',
'J9573A' => '3800-24G-PoE+-2SFP+',
'J9585A' => '3800-24G-2XG',
'J9575A' => '3800-24G-2SFP+',
'J8693A' => '3500yl-48G-PWR',
'J8692A' => '3500yl-24G-PWR',
'J9473A' => '3500-48-PoE',
@@ -784,6 +807,7 @@ number and the common model number with this map :
'J4905A' => '3400cl-24G',
'J4815A' => '3324XL',
'J4851A' => '3124',
'J9562A' => '2915-8G-PoE',
'J9148A' => '2910al-48G-PoE+',
'J9147A' => '2910al-48G',
'J9146A' => '2910al-24G-PoE+',
@@ -802,6 +826,12 @@ number and the common model number with this map :
'J4900B' => '2626-CR',
'J4900C' => '2626C',
'J4900A' => '2626',
'J9627A' => '2620-48-PoE+',
'J9624A' => '2620-48',
'J9624A' => '2620-24-PPoE+',
'J9625A' => '2620-24-PoE+',
'J9623A' => '2620-24',
'J9565A' => '2615-8-PoE',
'J9089A' => '2610-48-PWR',
'J9088A' => '2610-48',
'J9087A' => '2610-24-PWR',
@@ -809,6 +839,8 @@ number and the common model number with this map :
'J9085A' => '2610-24',
'J8762A' => '2600-8-PWR',
'J4813A' => '2524',
'J9298A' => '2520G-8-PoE',
'J9299A' => '2520G-24-PoE',
'J9137A' => '2520-8-PoE',
'J9138A' => '2520-24-PoE',
'J4812A' => '2512',
@@ -819,6 +851,8 @@ number and the common model number with this map :
'J9019A' => '2510-24A',
'J4818A' => '2324',
'J4817A' => '2312',
'J9449A' => '1810G-8',
'J9450A' => '1810G-24',
'J9029A' => '1800-8G',
'J9028A' => '1800-24G',
);

168
Info/Layer3/BlueCoatSG.pm Normal file
View File

@@ -0,0 +1,168 @@
package SNMP::Info::Layer3::BlueCoatSG;
# Copyright (c) 2011 Netdisco Project
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the University of California, Santa Cruz nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# 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 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
# LIABLE FOR # ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON 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 SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
use strict;
use Exporter;
use SNMP::Info::Layer3;
@SNMP::Info::Layer3::BlueCoatSG::ISA = qw/SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::BlueCoatSG::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE/;
$VERSION = '2.07';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::Layer3::MIBS,
'BLUECOAT-SG-PROXY-MIB' => 'sgProxyAdmin',
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::Layer3::GLOBALS,
#From BLUECOAT-SG-PROXY-MIB
'serial' => 'sgProxySerialNumber',
'sw_ver' => 'sgProxyVersion',
);
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, %SNMP::Info::Layer3::FUNCS, );
%MUNGE = ( %SNMP::Info::Layer2::MUNGE, %SNMP::Info::Layer3::MUNGE, );
sub vendor {
return 'Blue Coat';
}
sub os {
return 'sgos';
}
sub os_ver {
my $sg = shift;
my $os_string = $sg->sw_ver();
if ($os_string =~ /^Version:\s(\w+)\s([\d\.]+)/) {
return $2;
} else {
return ''; # perhaps we can try sysDescr or some other object...
}
}
1;
__END__
=head1 NAME
SNMP::Info::Layer3::BlueCoatSG - SNMP Interface to Blue Coat SG Series proxy devices
=head1 AUTHOR
Jeroen van Ingen
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
my $router = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 1
)
or die "Can't connect to DestHost.\n";
my $class = $router->class();
print "SNMP::Info determined this device to fall under subclass : $class\n";
=head1 DESCRIPTION
Subclass for Blue Coat SG Series proxy devices
=head2 Inherited Classes
=over
=item SNMP::Info::Layer3
=back
=head2 Required MIBs
BLUECOAT-SG-PROXY-MIB
=over
=item Inherited Classes' MIBs
See L<SNMP::Info::Layer3/"Required MIBs"> for its own MIB requirements.
=back
=head1 GLOBALS
These are methods that return scalar value from SNMP
=head2 Overrides
=over
=item $router->vendor()
Returns C<'Blue Coat'>
=item $router->os()
Returns C<'sgos'>
=item $router->os_ver()
Tries to resolve version string from "sgProxyVersion"
=back
=head2 Globals imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
=head1 TABLE METHODS
These are methods that return tables of information in the form of a reference
to a hash.
=head2 Overrides
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3/"TABLE METHODS"> for details.
=cut