Support for newer Radware Alteon ADC switches 4408/4416/5412/5224 and older AWS 2000/3000 series in existing L3::AlteonAD

This commit is contained in:
Eric A. Miller
2012-11-29 22:45:09 -05:00
parent 0740a7bd5e
commit 91d67ed0ae
3 changed files with 91 additions and 35 deletions

View File

@@ -21,6 +21,8 @@ version 3.00
* Support for Avaya VSP 9000 series in L3::Passport * Support for Avaya VSP 9000 series in L3::Passport
* Support for Avaya VSP 7000 series in L2::Baystack * Support for Avaya VSP 7000 series in L2::Baystack
* Support Avaya (Trapeze) Wireless Controllers in new class L2::NWSS2300 * Support Avaya (Trapeze) Wireless Controllers in new class L2::NWSS2300
* Support for newer Radware Alteon ADC switches 4408/4416/5412/5224 and
older AWS 2000/3000 series in existing L3::AlteonAD
[ENHANCEMENTS] [ENHANCEMENTS]

10
Info.pm
View File

@@ -628,8 +628,8 @@ See documentation in L<SNMP::Info::Layer3::AlcatelLucent> for details.
=item SNMP::Info::Layer3::AlteonAD =item SNMP::Info::Layer3::AlteonAD
Subclass for Nortel Alteon Series Layer 2-7 load balancing switches Subclass for Radware Alteon Series ADC switches and Nortel BladeCenter
and Nortel BladeCenter Layer2-3 GbE Switch Modules. Layer2-3 GbE Switch Modules.
See documentation in L<SNMP::Info::Layer3::AlteonAD> for details. See documentation in L<SNMP::Info::Layer3::AlteonAD> for details.
@@ -1299,6 +1299,7 @@ sub device_type {
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',
1872 => 'SNMP::Info::Layer3::AlteonAD',
1916 => 'SNMP::Info::Layer3::Extreme', 1916 => 'SNMP::Info::Layer3::Extreme',
1991 => 'SNMP::Info::Layer3::Foundry', 1991 => 'SNMP::Info::Layer3::Foundry',
2021 => 'SNMP::Info::Layer3::NetSNMP', 2021 => 'SNMP::Info::Layer3::NetSNMP',
@@ -1325,6 +1326,7 @@ sub device_type {
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',
1872 => 'SNMP::Info::Layer3::AlteonAD',
1916 => 'SNMP::Info::Layer3::Extreme', 1916 => 'SNMP::Info::Layer3::Extreme',
1991 => 'SNMP::Info::Layer3::Foundry', 1991 => 'SNMP::Info::Layer3::Foundry',
2272 => 'SNMP::Info::Layer3::Passport', 2272 => 'SNMP::Info::Layer3::Passport',
@@ -1413,10 +1415,6 @@ sub device_type {
if ( $desc if ( $desc
=~ /^(BayStack|Ethernet\s+Routing\s+Switch)\s[2345](\d){2,3}/i ); =~ /^(BayStack|Ethernet\s+Routing\s+Switch)\s[2345](\d){2,3}/i );
# Nortel Alteon AD Series
$objtype = 'SNMP::Info::Layer3::AlteonAD'
if $desc =~ /Alteon\s[1A][8D]/;
# Nortel Contivity # Nortel Contivity
$objtype = 'SNMP::Info::Layer3::Contivity' if $desc =~ /(\bCES\b|\bNVR\sV\d)/; $objtype = 'SNMP::Info::Layer3::Contivity' if $desc =~ /(\bCES\b|\bNVR\sV\d)/;

View File

@@ -66,6 +66,10 @@ $VERSION = '2.09';
'new_tftp_result' => 'ALTEON_CHEETAH_SWITCH_MIB__agTftpLastActionStatus', 'new_tftp_result' => 'ALTEON_CHEETAH_SWITCH_MIB__agTftpLastActionStatus',
'old_ip_max' => 'ALTEON_TS_NETWORK_MIB__ipInterfaceTableMax', 'old_ip_max' => 'ALTEON_TS_NETWORK_MIB__ipInterfaceTableMax',
'new_ip_max' => 'ALTEON_CHEETAH_NETWORK_MIB__ipInterfaceTableMax', 'new_ip_max' => 'ALTEON_CHEETAH_NETWORK_MIB__ipInterfaceTableMax',
'fan' => 'ALTEON_CHEETAH_SWITCH_MIB__hwFanStatus',
'old_ps1_stat' => 'ALTEON_TIGON_SWITCH_MIB__hwPowerSupplyStatus',
'old_ps2_stat' => 'ALTEON_TIGON_SWITCH_MIB__hwRedundantPSStatus',
'new_ps_stat' => 'ALTEON_CHEETAH_SWITCH_MIB__hwPowerSupplyStatus',
); );
%FUNCS = ( %FUNCS = (
@@ -132,7 +136,7 @@ sub model {
return $id unless defined $model; return $id unless defined $model;
$model =~ s/^aceswitch//; $model =~ s/^(aceswitch|aws|ods)//;
$model =~ s/^acedirector/AD/; $model =~ s/^acedirector/AD/;
$model =~ s/^(copper|fiber)Module/BladeCenter GbESM/; $model =~ s/^(copper|fiber)Module/BladeCenter GbESM/;
@@ -140,7 +144,7 @@ sub model {
} }
sub vendor { sub vendor {
return 'nortel'; return 'radware';
} }
sub os { sub os {
@@ -155,6 +159,36 @@ sub os_ver {
return $version; return $version;
} }
sub ps1_status {
my $alteon = shift;
my $old_ps = $alteon->old_ps1_stat();
my $new_ps = $alteon->new_ps_stat();
return $old_ps if $old_ps;
if ($new_ps) {
return 'ok' if ($new_ps eq 'singlePowerSupplyOk');
return 'failed' if ($new_ps eq 'firstPowerSupplyFailed');
}
return;
}
sub ps2_status {
my $alteon = shift;
my $old_ps = $alteon->old_ps2_stat();
my $new_ps = $alteon->new_ps_stat();
return $old_ps if $old_ps;
if ($new_ps) {
return 'ok' if ($new_ps eq 'doublePowerSupplyOk');
return 'failed' if ($new_ps eq 'secondPowerSupplyFailed');
}
return;
}
sub interfaces { sub interfaces {
my $alteon = shift; my $alteon = shift;
my $interfaces = $alteon->i_index(); my $interfaces = $alteon->i_index();
@@ -174,6 +208,7 @@ sub interfaces {
# varies by switch model # varies by switch model
elsif ( defined $ip_max and $iid > $ip_max ) { elsif ( defined $ip_max and $iid > $ip_max ) {
$desc = ( $iid % $ip_max ); $desc = ( $iid % $ip_max );
$desc = 'mgmt' if $desc == 231;
} }
$interfaces{$iid} = $desc; $interfaces{$iid} = $desc;
} }
@@ -207,39 +242,48 @@ sub i_duplex {
sub i_duplex_admin { sub i_duplex_admin {
my $alteon = shift; my $alteon = shift;
my $ag_pref = $alteon->new_ag_p_cfg_pref() my $ag_pref
= $alteon->new_ag_p_cfg_pref()
|| $alteon->old_ag_p_cfg_pref() || $alteon->old_ag_p_cfg_pref()
|| {}; || {};
my $ag_fe_auto = $alteon->new_ag_p_cfg_fe_auto() my $ag_fe_auto
= $alteon->new_ag_p_cfg_fe_auto()
|| $alteon->old_ag_p_cfg_fe_auto() || $alteon->old_ag_p_cfg_fe_auto()
|| {}; || {};
my $ag_fe_mode = $alteon->new_ag_p_cfg_fe_mode() my $ag_fe_mode
= $alteon->new_ag_p_cfg_fe_mode()
|| $alteon->old_ag_p_cfg_fe_mode() || $alteon->old_ag_p_cfg_fe_mode()
|| {}; || {};
my $ag_ge_auto = $alteon->new_ag_p_cfg_ge_auto() my $ag_ge_auto
= $alteon->new_ag_p_cfg_ge_auto()
|| $alteon->old_ag_p_cfg_ge_auto() || $alteon->old_ag_p_cfg_ge_auto()
|| {}; || {};
my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max(); my $ip_max = $alteon->new_ip_max() || $alteon->old_ip_max();
my $i_speed = $alteon->i_speed() || {};
my %i_duplex_admin; my %i_duplex_admin;
foreach my $if ( keys %$ag_pref ) { foreach my $if ( keys %$ag_ge_auto ) {
my $pref = $ag_pref->{$if}; my $pref = $ag_pref->{$if} || '';
next unless defined $pref; my $speed = $i_speed->{$if} || '';
my $ge_auto = $ag_ge_auto->{$if} || '';
my $fe_auto = $ag_fe_auto->{$if} || '';
my $fe_mode = $ag_fe_mode->{$if} || '';
my $string = 'other'; # Default to auto
if ( $pref =~ /gigabit/i ) { my $string = 'auto';
my $ge_auto = $ag_ge_auto->{$if};
$string = 'full' if ( $ge_auto =~ /off/i ); if ( $ge_auto =~ /off/i
$string = 'auto' if ( $ge_auto =~ /on/i ); && ( $pref =~ /gigabit/i || $speed eq '1.0 Gbps' ) )
{
$string = 'full';
} }
elsif ( $pref =~ /fast/i ) { if ( $fe_auto =~ /off/i
my $fe_auto = $ag_fe_auto->{$if}; && ( $pref =~ /fast/i || $speed =~ /100?\sMbps/ ) )
my $fe_mode = $ag_fe_mode->{$if}; {
$string = 'half' $string = 'half'
if ( $fe_mode =~ /half/i and $fe_auto =~ /off/i ); if ( $fe_mode =~ /half/i );
$string = 'full' $string = 'full'
if ( $fe_mode =~ /full/i and $fe_auto =~ /off/i ); if ( $fe_mode =~ /full/i );
$string = 'auto' if $fe_auto =~ /on/i;
} }
my $idx; my $idx;
@@ -365,7 +409,7 @@ __END__
=head1 NAME =head1 NAME
SNMP::Info::Layer3::AlteonAD - SNMP Interface to Nortel Alteon Layer 2-7 SNMP::Info::Layer3::AlteonAD - SNMP Interface to Radware Alteon ADC
Switches. Switches.
=head1 AUTHOR =head1 AUTHOR
@@ -389,8 +433,8 @@ Eric Miller
=head1 DESCRIPTION =head1 DESCRIPTION
Abstraction subclass for Nortel Alteon Series Layer 2-7 load balancing Abstraction subclass for Radware Alteon Series ADC switches and
switches and Nortel BladeCenter Layer2-3 GbE Switch Modules. Nortel BladeCenter Layer2-3 GbE Switch Modules.
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.
@@ -438,12 +482,12 @@ These are methods that return scalar value from SNMP
=item $alteon->model() =item $alteon->model()
Returns model type. Checks $alteon->id() against the F<ALTEON-ROOT-MIB> and Returns model type. Checks $alteon->id() against the F<ALTEON-ROOT-MIB> and
then parses out C<aceswitch>, replaces C<acedirector> with AD, and replaces then parses out C<aceswitch>, C<aws>, and C<ods> replaces C<acedirector>
copperModule/fiberModule with BladeCenter GbESM. with AD, and replaces copperModule/fiberModule with BladeCenter GbESM.
=item $alteon->vendor() =item $alteon->vendor()
Returns 'nortel' Returns 'radware'
=item $alteon->os() =item $alteon->os()
@@ -469,6 +513,18 @@ Returns the software version reported by C<agSoftwareVersion>
(C<agTftpLastActionStatus>) (C<agTftpLastActionStatus>)
=item $alteon->fan()
(C<hwFanStatus>)
=item $alteon->ps1_status()
Returns status of primary power supply
=item $alteon->ps2_status()
Returns status of redundant power supply
=back =back
=head2 Globals imported from SNMP::Info::Layer3 =head2 Globals imported from SNMP::Info::Layer3
@@ -477,8 +533,8 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
=head1 TABLE METHODS =head1 TABLE METHODS
These are methods that return tables of information in the form of a reference These are methods that return tables of information in the form of a
to a hash. reference to a hash.
=head2 Overrides =head2 Overrides