Add support for Avaya VSP 7000 series
This commit is contained in:
10
Info.pm
10
Info.pm
@@ -493,10 +493,10 @@ Depreciated. Use BayStack.
|
|||||||
|
|
||||||
=item SNMP::Info::Layer2::Baystack
|
=item SNMP::Info::Layer2::Baystack
|
||||||
|
|
||||||
Subclass for Nortel/Bay Ethernet Switch/Baystack switches. This includes 303,
|
Subclass for Avaya/Nortel/Bay Ethernet Switch/Baystack switches. This
|
||||||
304, 350, 380, 410, 420, 425, 450, 460, 470 series, 2500 series, 4500 series,
|
includes 303, 304, 350, 380, 410, 420, 425, 450, 460, 470 series,
|
||||||
5500 series, Business Ethernet Switch (BES), Business Policy Switch (BPS)
|
2500 series, 4500 series, 5500 series, Business Ethernet Switch (BES),
|
||||||
and probably others.
|
Business Policy Switch (BPS), VSP 7000 series, and probably others.
|
||||||
|
|
||||||
See documentation in L<SNMP::Info::Layer2::Baystack> for details.
|
See documentation in L<SNMP::Info::Layer2::Baystack> for details.
|
||||||
|
|
||||||
@@ -1289,6 +1289,7 @@ sub device_type {
|
|||||||
11 => 'SNMP::Info::Layer2::HP',
|
11 => 'SNMP::Info::Layer2::HP',
|
||||||
18 => 'SNMP::Info::Layer3::BayRS',
|
18 => 'SNMP::Info::Layer3::BayRS',
|
||||||
42 => 'SNMP::Info::Layer3::Sun',
|
42 => 'SNMP::Info::Layer3::Sun',
|
||||||
|
45 => 'SNMP::Info::Layer2::Baystack',
|
||||||
171 => 'SNMP::Info::Layer3::Dell',
|
171 => 'SNMP::Info::Layer3::Dell',
|
||||||
311 => 'SNMP::Info::Layer3::Microsoft',
|
311 => 'SNMP::Info::Layer3::Microsoft',
|
||||||
674 => 'SNMP::Info::Layer3::Dell',
|
674 => 'SNMP::Info::Layer3::Dell',
|
||||||
@@ -1314,6 +1315,7 @@ sub device_type {
|
|||||||
my %l2sysoidmap = (
|
my %l2sysoidmap = (
|
||||||
9 => 'SNMP::Info::Layer2::Cisco',
|
9 => 'SNMP::Info::Layer2::Cisco',
|
||||||
11 => 'SNMP::Info::Layer2::HP',
|
11 => 'SNMP::Info::Layer2::HP',
|
||||||
|
45 => 'SNMP::Info::Layer2::Baystack',
|
||||||
171 => 'SNMP::Info::Layer3::Dell',
|
171 => 'SNMP::Info::Layer3::Dell',
|
||||||
207 => 'SNMP::Info::Layer2::Allied',
|
207 => 'SNMP::Info::Layer2::Allied',
|
||||||
674 => 'SNMP::Info::Layer3::Dell',
|
674 => 'SNMP::Info::Layer3::Dell',
|
||||||
|
|||||||
@@ -79,27 +79,20 @@ $SNMP::Info::SPEED_MAP{2_000_000_000} = '1.0 Gbps';
|
|||||||
|
|
||||||
sub os {
|
sub os {
|
||||||
my $baystack = shift;
|
my $baystack = shift;
|
||||||
my $descr = $baystack->description();
|
my $descr = $baystack->description() || "";
|
||||||
my $model = $baystack->model();
|
my $model = $baystack->model() || "";
|
||||||
|
|
||||||
if ( ( defined $descr and $descr =~ /Business Ethernet Switch.*SW:v/i ) )
|
if ( $descr =~ /Business Ethernet Switch.*SW:v/i ) {
|
||||||
{
|
|
||||||
return 'bes';
|
return 'bes';
|
||||||
}
|
}
|
||||||
if (
|
if ( ( ( $model =~ /(420|425|BPS)/ ) and ( $descr =~ m/SW:v[1-2]/i ) )
|
||||||
(
|
or ( ( $model =~ /(410|450|380)/ ) ) )
|
||||||
(defined $model and $model =~ /(420|425|BPS)/ )
|
|
||||||
and
|
|
||||||
(defined $descr and $descr =~ m/SW:v[1-2]/i )
|
|
||||||
)
|
|
||||||
or
|
|
||||||
(
|
|
||||||
(defined $model and $model =~ /(410|450|380)/ )
|
|
||||||
)
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
return 'baystack';
|
return 'baystack';
|
||||||
}
|
}
|
||||||
|
if ( $model =~ /VSP/ ) {
|
||||||
|
return 'vsp';
|
||||||
|
}
|
||||||
|
|
||||||
return 'boss';
|
return 'boss';
|
||||||
}
|
}
|
||||||
@@ -126,7 +119,7 @@ sub os_bin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sub vendor {
|
sub vendor {
|
||||||
return 'nortel';
|
return 'avaya';
|
||||||
}
|
}
|
||||||
|
|
||||||
sub model {
|
sub model {
|
||||||
@@ -141,9 +134,11 @@ sub model {
|
|||||||
return '303' if ( defined $descr and $descr =~ /\D303\D/ );
|
return '303' if ( defined $descr and $descr =~ /\D303\D/ );
|
||||||
return '304' if ( defined $descr and $descr =~ /\D304\D/ );
|
return '304' if ( defined $descr and $descr =~ /\D304\D/ );
|
||||||
return 'BPS' if ( $model =~ /BPS2000/i );
|
return 'BPS' if ( $model =~ /BPS2000/i );
|
||||||
return $2
|
|
||||||
if ( $model
|
# Pull sreg- from all
|
||||||
=~ /(ES|ERS|BayStack|EthernetRoutingSwitch|EthernetSwitch)-?(\d+)/ );
|
$model =~ s/^sreg-//;
|
||||||
|
# Strip ES/ERS/BayStack etc. from those families
|
||||||
|
$model =~ s/^(E(R)?S|BayStack|Ethernet(Routing)?Switch)-?//;
|
||||||
|
|
||||||
return $model;
|
return $model;
|
||||||
}
|
}
|
||||||
@@ -214,7 +209,7 @@ sub i_name {
|
|||||||
|
|
||||||
sub index_factor {
|
sub index_factor {
|
||||||
my $baystack = shift;
|
my $baystack = shift;
|
||||||
my $model = $baystack->model();
|
my $model = $baystack->model() || "";
|
||||||
my $os = $baystack->os();
|
my $os = $baystack->os();
|
||||||
my $os_ver = $baystack->os_ver();
|
my $os_ver = $baystack->os_ver();
|
||||||
my $op_mode = $baystack->ns_op_mode();
|
my $op_mode = $baystack->ns_op_mode();
|
||||||
@@ -228,10 +223,10 @@ sub index_factor {
|
|||||||
|
|
||||||
my $index_factor = 32;
|
my $index_factor = 32;
|
||||||
$index_factor = 64
|
$index_factor = 64
|
||||||
if ( ( defined $model and $model =~ /(470)/ )
|
if ( ( $model =~ /(470)/ )
|
||||||
or ( $os =~ m/(boss|bes)/ ) and ( $op_mode eq 'pure' ) );
|
or ( $os =~ m/(boss|bes)/ ) and ( $op_mode eq 'pure' ) );
|
||||||
$index_factor = 128
|
$index_factor = 128
|
||||||
if ( ( defined $model and $model =~ /(5[56]\d\d)/ )
|
if ( ( $model =~ /(5[56]\d\d)|VSP/ )
|
||||||
and ( $os_ver >= 6 ) );
|
and ( $os_ver >= 6 ) );
|
||||||
|
|
||||||
return $index_factor;
|
return $index_factor;
|
||||||
@@ -349,8 +344,8 @@ __END__
|
|||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
SNMP::Info::Layer2::Baystack - SNMP Interface to Nortel Ethernet (Baystack)
|
SNMP::Info::Layer2::Baystack - SNMP Interface to Avaya Ethernet (Baystack)
|
||||||
Switches
|
and VSP 7000 series switches
|
||||||
|
|
||||||
=head1 AUTHOR
|
=head1 AUTHOR
|
||||||
|
|
||||||
@@ -373,8 +368,8 @@ Eric Miller
|
|||||||
|
|
||||||
=head1 DESCRIPTION
|
=head1 DESCRIPTION
|
||||||
|
|
||||||
Provides abstraction to the configuration information obtainable from a Nortel
|
Provides abstraction to the configuration information obtainable from an
|
||||||
Ethernet Switch (Baystack) through SNMP.
|
Avaya Ethernet Switch (Baystack) and VSP 7000 series through SNMP.
|
||||||
|
|
||||||
For speed or debugging purposes you can call the subclass directly, but not
|
For speed or debugging purposes you can call the subclass directly, but not
|
||||||
after determining a more specific class using the method above.
|
after determining a more specific class using the method above.
|
||||||
@@ -417,7 +412,7 @@ These are methods that return scalar value from SNMP
|
|||||||
|
|
||||||
=item $baystack->vendor()
|
=item $baystack->vendor()
|
||||||
|
|
||||||
Returns 'nortel'
|
Returns 'avaya'
|
||||||
|
|
||||||
=item $baystack->model()
|
=item $baystack->model()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user