Merge pull request #299 from inphobia/nn_ws_cleanup

massive amount of trailing whitespace cleanup

i ran this for 2 weeks, did not notice any regressions.

during those 2 weeks i went over all the diffs on 3 different occasions to make sure i did not delete a comma, quote or whatever.

ran the complete test set as well, no errors there either.

now it's finally commit time then i guess, so when the next module gets based on an existing one we have a clean layout.
This commit is contained in:
nick n
2019-01-31 17:42:25 +01:00
committed by GitHub
140 changed files with 970 additions and 1025 deletions

View File

@@ -224,14 +224,14 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $aironet = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $aironet->class();
@@ -257,7 +257,7 @@ This class is for devices running Cisco IOS software (newer)
=back
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.
my $aironet = new SNMP::Info::Layer3::Aironet(...);
@@ -280,7 +280,7 @@ after determining a more specific class using the method above.
=back
These MIBs are now included in the v2.tar.gz archive available from
ftp.cisco.com. Make sure you have a current version.
ftp.cisco.com. Make sure you have a current version.
=head1 GLOBALS
@@ -296,7 +296,7 @@ C<awcEtherDuplex.0>
=item $aironet->mac()
Gives the MAC Address of the wireless side
Gives the MAC Address of the wireless side
C<dot11StationID.2>

View File

@@ -306,7 +306,7 @@ Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $alu = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -314,7 +314,7 @@ Bill Fenner
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $alu->class();

View File

@@ -163,14 +163,14 @@ 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;
}
@@ -178,9 +178,9 @@ 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');
@@ -242,19 +242,19 @@ sub i_duplex {
sub i_duplex_admin {
my $alteon = shift;
my $ag_pref
my $ag_pref
= $alteon->new_ag_p_cfg_pref()
|| $alteon->old_ag_p_cfg_pref()
|| {};
my $ag_fe_auto
my $ag_fe_auto
= $alteon->new_ag_p_cfg_fe_auto()
|| $alteon->old_ag_p_cfg_fe_auto()
|| {};
my $ag_fe_mode
my $ag_fe_mode
= $alteon->new_ag_p_cfg_fe_mode()
|| $alteon->old_ag_p_cfg_fe_mode()
|| {};
my $ag_ge_auto
my $ag_ge_auto
= $alteon->new_ag_p_cfg_ge_auto()
|| $alteon->old_ag_p_cfg_ge_auto()
|| {};
@@ -395,7 +395,7 @@ sub i_vlan_membership_untagged {
my $vlan = $vlans->{$port};
push( @{ $i_vlan_membership->{$port} }, $vlan );
}
return $i_vlan_membership;
}
@@ -432,14 +432,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $alteon = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $alteon->class();
@@ -451,7 +451,7 @@ Abstraction subclass for Radware Alteon Series ADC switches and
Nortel BladeCenter Layer2-3 GbE Switch Modules.
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.
my $alteon = new SNMP::Info::Layer3::AlteonAD(...);
@@ -581,7 +581,7 @@ IDs. These are the VLANs which are members of the egress list for the port.
Example:
my $interfaces = $alteon->interfaces();
my $vlans = $alteon->i_vlan_membership();
foreach my $iid (sort keys %$interfaces) {
my $port = $interfaces->{$iid};
my $vlan = join(',', sort(@{$vlans->{$iid}}));

View File

@@ -4,20 +4,20 @@
# Copyright (c) 2008 Jeroen van Ingen Schenau
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# 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
# * 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
#
# 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
@@ -37,7 +37,7 @@ use SNMP::Info::Layer3;
@SNMP::Info::Layer3::Altiga::ISA = qw/SNMP::Info::Layer3 Exporter/;
@SNMP::Info::Layer3::Altiga::EXPORT_OK = qw//;
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE
use vars qw/$VERSION %GLOBALS %MIBS %FUNCS %MUNGE
$int_include_vpn $fake_idx $type_class/;
$VERSION = '3.64';
@@ -46,7 +46,7 @@ $VERSION = '3.64';
%SNMP::Info::Layer3::MIBS,
'ALTIGA-VERSION-STATS-MIB' => 'alVersionString',
'ALTIGA-SESSION-STATS-MIB' => 'alActiveSessionCount',
'ALTIGA-HARDWARE-STATS-MIB' => 'alHardwarePs1Type',
'ALTIGA-HARDWARE-STATS-MIB' => 'alHardwarePs1Type',
);
%GLOBALS = (
@@ -70,7 +70,7 @@ $VERSION = '3.64';
'fan1_alarm' => 'alHardwareFan1RpmAlarm',
'fan2_alarm' => 'alHardwareFan2RpmAlarm',
'fan3_alarm' => 'alHardwareFan3RpmAlarm',
);
%FUNCS = (
@@ -189,7 +189,7 @@ sub interfaces {
if ($int_include_vpn) {
my $tun_type = $altiga->vpn_sess_protocol();
my $peer = $altiga->vpn_sess_peer_ip();
my $remote = $altiga->vpn_sess_rem_ip();
my $remote = $altiga->vpn_sess_rem_ip();
my $group = $altiga->vpn_sess_gid();
foreach my $tunnel (keys %$tun_type) {
if ($type_class->{$tun_type->{$tunnel}} eq 1) {
@@ -197,7 +197,7 @@ sub interfaces {
}
}
}
return \%interfaces;
}
@@ -275,14 +275,14 @@ Jeroen van Ingen Schenau
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $altiga = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'my_vpn_host',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $altiga->class();
@@ -366,7 +366,7 @@ to a hash.
=item $altiga->interfaces()
This method overrides the interfaces() method inherited from SNMP::Info.
It provides a mapping between the Interface Table Index (iid) and the physical
It provides a mapping between the Interface Table Index (iid) and the physical
port name, adding a port number to the port name to prevent duplicate names.
=item $altiga->i_lastchange()

View File

@@ -146,7 +146,7 @@ Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $arista = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -154,7 +154,7 @@ Bill Fenner
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $arista->class();

View File

@@ -1403,7 +1403,7 @@ Eric Miller
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
@@ -1422,7 +1422,7 @@ end station MAC addresses collection and correlation to the thin access point
the end station is using for communication.
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.
my $aruba = new SNMP::Info::Layer3::Aruba(...);
@@ -1466,7 +1466,7 @@ These are methods that return scalar value from SNMP
=item $aruba->model()
Returns model type. Cross references $aruba->id() with product IDs in the
Returns model type. Cross references $aruba->id() with product IDs in the
Aruba MIB.
=item $aruba->vendor()
@@ -1540,7 +1540,7 @@ false.
=item $aruba->i_ssidmac()
With the same keys as i_ssidlist, returns the Basic service set
identification (BSSID), MAC address, the AP is using for the SSID.
identification (BSSID), MAC address, the AP is using for the SSID.
=item $aruba->cd11_mac()
@@ -1578,7 +1578,7 @@ Total packets transmitted by the wireless client.
=item $aruba->i_index()
Returns reference to map of IIDs to Interface index.
Returns reference to map of IIDs to Interface index.
Extends C<ifIndex> to support APs as device interfaces.
@@ -1614,7 +1614,7 @@ interfaces.
=item $aruba->i_up_admin()
Returns reference to map of IIDs to administrative status of the interface.
Returns C<ifAdminStatus> for Ethernet interfaces and C<wlanAPStatus>
Returns C<ifAdminStatus> for Ethernet interfaces and C<wlanAPStatus>
for AP interfaces.
=item $aruba->i_mac()

View File

@@ -1389,14 +1389,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $bayrs = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $bayrs->class();
@@ -1404,10 +1404,10 @@ Eric Miller
=head1 DESCRIPTION
Abstraction subclass for routers running Avaya/Nortel BayRS.
Abstraction subclass for routers running Avaya/Nortel BayRS.
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.
my $bayrs = new SNMP::Info::Layer3::BayRS(...);
@@ -1458,7 +1458,7 @@ These are methods that return scalar value from SNMP
Returns the model of the BayRS router. Will translate between the MIB model
and the common model with this map :
C<%MODEL_MAP = (
C<%MODEL_MAP = (
'acefn' => 'FN',
'aceln' => 'LN',
'acecn' => 'CN',
@@ -1529,8 +1529,8 @@ passed but the entire table will be returned.
Returns reference to the map between IID and physical Port.
The physical port name is stripped to letter and numbers to signify
port type and slot port (S11) if the default platform naming was
maintained. Otherwise the port is the interface description.
port type and slot port (S11) if the default platform naming was
maintained. Otherwise the port is the interface description.
=item $bayrs->i_name()
@@ -1540,7 +1540,7 @@ interfaces.
=item $bayrs->i_duplex()
Returns reference to hash. Maps port operational duplexes to IIDs for
Ethernet interfaces.
Ethernet interfaces.
=item $bayrs->i_duplex_admin()

View File

@@ -154,12 +154,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
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.

View File

@@ -206,7 +206,7 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $c3550 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -214,7 +214,7 @@ Max Baker
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $c3550->class();
@@ -222,14 +222,14 @@ Max Baker
=head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 3550 Layer 2/3 Switches.
Abstraction subclass for Cisco Catalyst 3550 Layer 2/3 Switches.
These devices run IOS but have some of the same characteristics as the
Catalyst WS-C family (5xxx,6xxx). For example, forwarding tables are held in
VLANs, and extended interface information is gleaned from F<CISCO-SWITCH-MIB>.
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.
my $c3550 = new SNMP::Info::Layer3::C3550(...);
@@ -327,7 +327,7 @@ Crosses $c3550->p_port() with $c3550->p_duplex() to utilize port C<ifIndex>.
Example:
my %if_map = reverse %{$c3550->interfaces()};
$c3550->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
$c3550->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
or die "Couldn't change port duplex. ",$c3550->error(1);
=back

View File

@@ -111,7 +111,7 @@ Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $c4000 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -119,7 +119,7 @@ Bill Fenner
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $c4000->class();
@@ -127,10 +127,10 @@ Bill Fenner
=head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 4000 Layer 2/3 Switches.
Abstraction subclass for Cisco Catalyst 4000 Layer 2/3 Switches.
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.
my $c4000 = new SNMP::Info::Layer3::C4000(...);

View File

@@ -179,7 +179,7 @@ sub set_i_duplex_admin {
my $c6500 = shift;
my ( $duplex, $iid ) = @_;
if ( $c6500->is_virtual_switch() ) {
# VSS -> MAU
@@ -252,7 +252,7 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $c6500 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -260,7 +260,7 @@ Max Baker
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $c6500->class();
@@ -268,14 +268,14 @@ Max Baker
=head1 DESCRIPTION
Abstraction subclass for Cisco Catalyst 6500 Layer 2/3 Switches.
Abstraction subclass for Cisco Catalyst 6500 Layer 2/3 Switches.
These devices run IOS but have some of the same characteristics as the
Catalyst WS-C family (5xxx). For example, forwarding tables are held in
VLANs, and extended interface information is gleaned from F<CISCO-SWITCH-MIB>.
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.
my $c6500 = new SNMP::Info::Layer3::C6500(...);
@@ -382,7 +382,7 @@ Crosses $c6500->p_port() with $c6500->p_duplex() to utilize port C<ifIndex>.
Example:
my %if_map = reverse %{$c6500->interfaces()};
$c6500->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
$c6500->set_i_duplex_admin('auto', $if_map{'FastEthernet0/1'})
or die "Couldn't change port duplex. ",$c6500->error(1);
=item $c6500->set_i_speed_admin(speed, ifIndex)

View File

@@ -57,7 +57,7 @@ $VERSION = '3.64';
%SNMP::Info::LLDP::GLOBALS,
'netsnmp_vers' => 'versionTag',
'hrSystemUptime' => 'hrSystemUptime',
);
%FUNCS = (
@@ -109,7 +109,7 @@ sub os_ver {
return $1 if ($extend_table->{$ex} =~ /^This is Check Point's software version (.*)$/);
last;
}
}
}
$os_ver = $1 if ( $descr =~ /^\S+\s+\S+\s+(\S+)\s+/ );
if ($vers) {
@@ -184,14 +184,14 @@ Ambroise Rosset
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $ckp = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $ckp->class();

View File

@@ -189,7 +189,7 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $cisco = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -197,7 +197,7 @@ Max Baker
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $cisco->class();

View File

@@ -141,7 +141,7 @@ Brian De Wolf
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $fwsm = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -149,7 +149,7 @@ Brian De Wolf
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $fwsm->class();
@@ -196,10 +196,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference
to a hash.
=over
=back
=head2 Overrides
=over

View File

@@ -91,7 +91,7 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $switch = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -99,7 +99,7 @@ Eric Miller
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $switch->class();
@@ -107,14 +107,14 @@ Eric Miller
=head1 DESCRIPTION
Base subclass for Cisco Layer 2/3 Switches.
Base subclass for Cisco Layer 2/3 Switches.
These devices have switch specific characteristics beyond those in
traditional routers covered by L<SNMP::Info::Layer3::Cisco>. For example,
port security interface information from L<SNMP::Info::CiscoPortSecurity>.
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.
my $swich = new SNMP::Info::Layer3::CiscoSwitch(...);

View File

@@ -171,14 +171,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $contivity = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $contivity->class();
@@ -187,10 +187,10 @@ Eric Miller
=head1 DESCRIPTION
Abstraction subclass for Avaya/Nortel VPN Routers (formerly Contivity
Extranet Switch).
Extranet Switch).
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.
my $contivity = new SNMP::Info::Layer3::Contivity(...);

View File

@@ -115,7 +115,7 @@ sub uptime {
}
# ifDescr is the same for all interfaces in a class, but the ifName is
# unique, so let's use that for port name. If all else fails,
# unique, so let's use that for port name. If all else fails,
# concatentate ifDesc and ifIndex.
# (code from SNMP/Info/Layer2/Netgear.pm)
sub interfaces {
@@ -179,14 +179,14 @@ Oliver Gorwits - based on Layer3::NetSNMP implementation
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $cumulus = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $cumulus->class();

View File

@@ -47,7 +47,7 @@ $VERSION = '3.64';
'SWPRIMGMT-DES3200-MIB' => 'dlink-des3200SeriesProd',
'SWPRIMGMT-DES30XXP-MIB' => 'dlink-des30xxproductProd',
'SWPRIMGMT-DES1228ME-MIB' => 'dlink-des1228MEproductProd',
'SWDES3528-52PRIMGMT-MIB' => 'dlink-Des3500Series',
'SWDES3528-52PRIMGMT-MIB' => 'dlink-Des3500Series',
'DES-1210-28-AX' => 'des-1210-28ax',
'DES-1210-10MEbx' => 'des-1210-10mebx',
'DES-1210-26MEbx' => 'des-1210-26mebx',
@@ -164,14 +164,14 @@ SNMP::Info::Layer3::DLink - SNMP Interface to DLink Devices
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $dlink = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $dlink->class();

View File

@@ -167,7 +167,7 @@ sub fan {
my $fan = $dell->dell_fan_desc() || {};
my $state = $dell->dell_fan_state() || {};
if (scalar keys %$fan) {
my @messages = ();
@@ -200,8 +200,8 @@ sub ps2_type {
my $dell = shift;
my $src = $dell->dell_pwr_src() || {};
my $i = 0;
my $i = 0;
foreach my $k (sort keys %$src) {
$i++;
next unless $src->{$k} and $i == 2;
@@ -226,8 +226,8 @@ sub ps2_status {
my $dell = shift;
my $status = $dell->dell_pwr_state() || {};
my $i = 0;
my $i = 0;
foreach my $k (sort keys %$status) {
$i++;
next unless $status->{$k} and $i == 2;
@@ -330,14 +330,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $dell = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $dell->class();
@@ -346,12 +346,12 @@ Eric Miller
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from an
Provides abstraction to the configuration information obtainable from an
Dell Power Connect device through SNMP. D-Link and the IBM BladeCenter
Gigabit Ethernet Switch Module also use this module based upon MIB support.
Gigabit Ethernet Switch Module also use this module based upon MIB support.
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.
my $dell = new SNMP::Info::Layer3::Dell(...);
@@ -502,7 +502,7 @@ to a hash.
=item $dell->interfaces()
Returns the map between SNMP Interface Identifier (iid) and physical port
name. Uses name if available instead of description since descriptions are
name. Uses name if available instead of description since descriptions are
sometimes not unique.
=item $dell->i_duplex()

View File

@@ -207,7 +207,7 @@ sub lldp_if {
my $addr = $lldp->lldp_rem_pid($partial) || {};
my $i_descr = $lldp->ifName() || {};
my %r_i_descr = reverse %$i_descr;
my %lldp_if;
foreach my $key ( keys %$addr ) {
my @aOID = split( '\.', $key );
@@ -221,7 +221,7 @@ sub lldp_if {
if ( exists $r_i_descr{$desc} ) {
$port = $r_i_descr{$desc};
}
$lldp_if{$key} = $port;
}
return \%lldp_if;
@@ -261,14 +261,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $enterasys = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $enterasys->class();
@@ -277,11 +277,11 @@ Eric Miller
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from an
Enterasys device through SNMP.
Provides abstraction to the configuration information obtainable from an
Enterasys device through SNMP.
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.
my $enterasys = new SNMP::Info::Layer3::Enterasys(...);

View File

@@ -294,9 +294,9 @@ sub fan {
# default is slot * 1000, but some older switches start at 1
sub _slot_factor {
my $extreme = shift;
my $index = $extreme->i_index();
return 1 if (exists $index->{1} && $index->{1} == 1);
return 1000;
}
@@ -306,7 +306,7 @@ sub _slot_factor {
# we use the BRIDGE-MIB tables if available then the ex_fw_*() methods.
sub fw_mac {
my $extreme = shift;
my $b = $extreme->SUPER::fw_mac();
return $b if (keys %$b);
@@ -315,10 +315,10 @@ sub fw_mac {
sub fw_port {
my $extreme = shift;
my $b = $extreme->SUPER::fw_port();
return $b if (keys %$b);
return $extreme->ex_fw_port();
}
@@ -402,11 +402,11 @@ sub i_vlan {
# Next we try extremeVlanOpaqueTable
my $xos = $extreme->_xos_i_vlan($partial);
return $xos if (keys %$xos);
# Try older ifStack method
my $extremeware = $extreme->_extremeware_i_vlan($partial);
return $extremeware if (keys %$extremeware);
return;
}
@@ -481,11 +481,11 @@ sub i_vlan_membership {
# Next we try extremeVlanOpaqueTable
my $xos = $extreme->_xos_i_vlan_membership($partial);
return $xos if (ref {} eq ref $xos and scalar keys %$xos);
# Try older ifStack method
my $extremeware = $extreme->_extremeware_i_vlan_membership($partial);
return $extremeware if (ref {} eq ref $extremeware and scalar keys %$extremeware);
return;
}
@@ -573,11 +573,11 @@ sub i_vlan_membership_untagged {
# Next we try extremeVlanOpaqueTable
my $xos = $extreme->_xos_i_vlan_membership_untagged($partial);
return $xos if (ref {} eq ref $xos and scalar keys %$xos);
# Try older ifStack method
my $extremeware = $extreme->_extremeware_i_vlan_membership_untagged($partial);
return $extremeware if (ref {} eq ref $extremeware and scalar keys %$extremeware);
return;
}
@@ -789,7 +789,7 @@ sub lldp_if {
my $addr = $extreme->lldp_rem_pid($partial) || {};
my $b_index = $extreme->bp_index() || {};
#my %r_i_descr = reverse %$i_descr;
my %lldp_if;
foreach my $key ( keys %$addr ) {
my @aOID = split( '\.', $key );
@@ -829,9 +829,9 @@ sub stp_i_mac {
foreach my $iid ( keys %$stp_i_bids ) {
my $mac = $stp_i_bids->{$iid};
next unless $mac;
$mac =~ s/^([0-9A-F][0-9A-F]:){2}//;
$stp_i_mac{$iid} = $mac;
}
return \%stp_i_mac;
@@ -886,14 +886,14 @@ Eric Miller, Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $extreme = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $extreme->class();
@@ -902,11 +902,11 @@ Eric Miller, Bill Fenner
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from an
Extreme device through SNMP.
Provides abstraction to the configuration information obtainable from an
Extreme device through SNMP.
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.
my $extreme = new SNMP::Info::Layer3::Extreme(...);
@@ -1081,7 +1081,7 @@ IDs. These are the VLANs which are members of the egress list for the port.
Example:
my $interfaces = $extreme->interfaces();
my $vlans = $extreme->i_vlan_membership();
foreach my $iid (sort keys %$interfaces) {
my $port = $interfaces->{$iid};
my $vlan = join(',', sort(@{$vlans->{$iid}}));
@@ -1239,7 +1239,7 @@ See documentation in L<SNMP::Info::EDP/"TABLE METHODS"> for details.
These are methods that provide SNMP set functionality for overridden methods
or provide a simpler interface to complex set operations. See
L<SNMP::Info/"SETTING DATA VIA SNMP"> for general information on set
operations.
operations.
=over
@@ -1251,7 +1251,7 @@ VLAN ID and port C<ifIndex>. This method should only be used on end station
Example:
my %if_map = reverse %{$extreme->interfaces()};
$extreme->set_i_vlan('2', $if_map{'FastEthernet0/1'})
$extreme->set_i_vlan('2', $if_map{'FastEthernet0/1'})
or die "Couldn't change port VLAN. ",$extreme->error(1);
=item $extreme->set_i_pvid ( pvid, ifIndex )
@@ -1261,7 +1261,7 @@ port C<ifIndex>. This method should only be used on trunk ports.
Example:
my %if_map = reverse %{$extreme->interfaces()};
$extreme->set_i_pvid('2', $if_map{'FastEthernet0/1'})
$extreme->set_i_pvid('2', $if_map{'FastEthernet0/1'})
or die "Couldn't change port default VLAN. ",$extreme->error(1);
=item $extreme->set_add_i_vlan_tagged ( vlan, ifIndex )
@@ -1271,7 +1271,7 @@ numeric VLAN ID and port C<ifIndex>.
Example:
my %if_map = reverse %{$extreme->interfaces()};
$extreme->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
$extreme->set_add_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
or die "Couldn't add port to egress list. ",$extreme->error(1);
=item $extreme->set_remove_i_vlan_tagged ( vlan, ifIndex )
@@ -1281,7 +1281,7 @@ with the numeric VLAN ID and port C<ifIndex>.
Example:
my %if_map = reverse %{$extreme->interfaces()};
$extreme->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
$extreme->set_remove_i_vlan_tagged('2', $if_map{'FastEthernet0/1'})
or die "Couldn't add port to egress list. ",$extreme->error(1);
=back

View File

@@ -270,7 +270,7 @@ sub i_vlan_membership_untagged {
my $i_vlan_membership = {};
foreach my $iid ( keys %$tagged ) {
next unless $tagged->{$iid} eq 'false';
# IID is length.vlan name index.length.interface index
# Split out and use as the IID to get the VLAN ID and ifIndex
@@ -304,14 +304,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $f5 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $f5->class();
@@ -322,7 +322,7 @@ Eric Miller
Abstraction subclass for F5 network devices.
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.
my $f5 = new SNMP::Info::Layer3::F5(...);
@@ -357,7 +357,7 @@ These are methods that return scalar value from SNMP
=item $f5->model()
Return (C<sysPlatformInfoMarketingName>), otherwise tries to reference
$f5->id() to F<F5-BIGIP-COMMON-MIB>.
$f5->id() to F<F5-BIGIP-COMMON-MIB>.
=item $f5->vendor()
@@ -420,7 +420,7 @@ IDs.
Example:
my $interfaces = $f5->interfaces();
my $vlans = $f5->i_vlan_membership();
foreach my $iid (sort keys %$interfaces) {
my $port = $interfaces->{$iid};
my $vlan = join(',', sort(@{$vlans->{$iid}}));

View File

@@ -122,7 +122,7 @@ sub i_vlan {
}
# Apparently index doesn't use VLAN ID, so override the HOA private
# method here to correct the mapping
# method here to correct the mapping
sub _vlan_hoa {
my $force10 = shift;
my ( $v_ports, $partial ) = @_;
@@ -153,7 +153,7 @@ sub _vlan_hoa {
my $vlan_tag = $v_index->{$vlan_ndx};
# FIXME: would be preferable to use
# the mapping from Q-BRIDGE-MIB::dot1qVlanFdbId
# the mapping from Q-BRIDGE-MIB::dot1qVlanFdbId
my $mod = $vlan_tag % 4096;
push ( @{ $vlan_hoa->{$ifindex} }, ($mod) );
@@ -176,7 +176,7 @@ William Bulley
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $force10 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -184,7 +184,7 @@ William Bulley
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $force10->class();

View File

@@ -81,19 +81,19 @@ sub os {
sub os_ver {
my $fortinet = shift;
my $ver = $fortinet->fgSysVersion() || '';
if ( $ver =~ /(\d+[\.\d]+)/ ) {
return $1;
}
return $ver;
}
sub serial {
my $fortinet = shift;
return $fortinet->fnSysSerial();
}
@@ -110,14 +110,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $fortinet = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $fortinet->class();
@@ -128,7 +128,7 @@ Eric Miller
Abstraction subclass for Fortinet network devices.
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.
my $fortinet = new SNMP::Info::Layer3::Fortinet(...);

View File

@@ -241,7 +241,7 @@ sub os_ver {
# See if we report from Flash if wouldn't report from running above
return $foundry->snAgFlashImgVer() if ( defined $foundry->snAgFlashImgVer() );
# Last resort
return $foundry->SUPER::os_ver();
@@ -405,7 +405,7 @@ sub brcd_e_index {
my $partial = shift;
my $stack_master = $foundry->_brcd_stack_master();
my $brcd_e_idx
my $brcd_e_idx
= $foundry->snAgentConfigModule2Description($partial)
|| $foundry->snAgentConfigModuleDescription($partial)
|| {};
@@ -460,7 +460,7 @@ sub brcd_e_descr {
my $partial = shift;
my $brcd_e_idx = $foundry->brcd_e_index($partial) || {};
my $m_descrs
my $m_descrs
= $foundry->snAgentConfigModule2Description($partial)
|| $foundry->snAgentConfigModuleDescription($partial)
|| {};
@@ -526,7 +526,7 @@ sub brcd_e_serial {
my $partial = shift;
my $e_idx = $foundry->brcd_e_index($partial) || {};
my $serials
my $serials
= $foundry->snAgentConfigModule2SerialNumber($partial)
|| $foundry->snAgentConfigModuleSerialNumber($partial)
|| {};
@@ -551,7 +551,7 @@ sub brcd_e_type {
my $partial = shift;
my $e_idx = $foundry->brcd_e_index($partial) || {};
my $types
my $types
= $foundry->ag_mod2_type($partial)
|| $foundry->ag_mod_type($partial)
|| {};
@@ -861,14 +861,14 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $foundry = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $foundry->class();
@@ -932,7 +932,7 @@ These are methods that return scalar value from SNMP
Returns model type. Checks $foundry->id() against the F<FOUNDRY-SN-ROOT-MIB>
and removes 'C<sn>' and 'C<Switch>'. EdgeIron models determined
through F<ENTITY-MIB>.
through F<ENTITY-MIB>.
=item $foundry->vendor()
@@ -1029,16 +1029,16 @@ Returns reference to hash of interface names to iids.
Returns reference to hash of interfaces to be ignored.
Ignores interfaces with descriptions of tunnel,loopback,null
Ignores interfaces with descriptions of tunnel,loopback,null
=item $foundry->i_duplex()
Returns reference to hash of interface link duplex status.
Returns reference to hash of interface link duplex status.
Crosses $foundry->sw_duplex() with $foundry->sw_index()
=item $foundry->i_stp_state()
Returns the mapping of (C<dot1dStpPortState>) to the interface
index (iid).
@@ -1060,7 +1060,7 @@ for details on brcd_e_* methods.
=over
=item $foundry->e_index()
=item $foundry->e_index()
If the device doesn't support C<entPhysicalDescr>, this will
try brcd_e_index().
@@ -1068,42 +1068,42 @@ try brcd_e_index().
Note that this is based on C<entPhysicalDescr> due to implementation
details of SNMP::Info::Entity::e_index().
=item $foundry->e_class()
=item $foundry->e_class()
If the device doesn't support C<entPhysicalClass>, this will try
brcd_e_class().
=item $foundry->e_descr()
=item $foundry->e_descr()
If the device doesn't support C<entPhysicalDescr>, this will try
brcd_e_descr().
=item $foundry->e_name()
=item $foundry->e_name()
If the device doesn't support C<entPhysicalName>, this will try
brcd_e_name().
=item $foundry->e_parent()
=item $foundry->e_parent()
If the device doesn't support C<entPhysicalContainedIn>, this will try
brcd_e_parent().
=item $foundry->e_pos()
=item $foundry->e_pos()
If the device doesn't support C<entPhysicalParentRelPos>, this will try
brcd_e_pos().
=item $foundry->e_serial()
=item $foundry->e_serial()
If the device doesn't support C<entPhysicalSerialNum>, this will try
brcd_e_serial().
=item $foundry->e_type()
=item $foundry->e_type()
If the device doesn't support C<entPhysicalVendorType>, this will try
brcd_e_type().
=item $foundry->e_vendor()
=item $foundry->e_vendor()
If the device doesn't support C<entPhysicalMfgName>, this will try
brcd_e_vendor().
@@ -1113,7 +1113,7 @@ brcd_e_vendor().
=head2 Pseudo F<ENTITY-MIB> information
These methods emulate F<ENTITY-MIB> Physical Table methods using
F<FOUNDRY-SN-AGENT-MIB>.
F<FOUNDRY-SN-AGENT-MIB>.
=over
@@ -1135,7 +1135,7 @@ base switches that contain modules, and 'module' for others.
Returns reference to hash. Key: IID, Value: Human friendly name
(C<snAgentConfigModule2Description>) or
(C<snAgentConfigModuleDescription>)
(C<snAgentConfigModuleDescription>)
=item $foundry->brcd_e_name()
@@ -1149,14 +1149,14 @@ Returns reference to hash. Key: IID, Value: brocade
Returns reference to hash. Key: IID, Value: Serial number
Serial number is $foundry->serial() for a stack master unit and
Serial number is $foundry->serial() for a stack master unit and
(C<snAgentConfigModule2SerialNumber>) or
(C<snAgentConfigModuleSerialNumber>) for all others.
=item $foundry->brcd_e_type()
Returns reference to hash. Key: IID, Value: Type of component/sub-component
as defined under C<snAgentConfigModule2Type> or C<snAgentConfigModule2Type>
as defined under C<snAgentConfigModule2Type> or C<snAgentConfigModule2Type>
in F<FOUNDRY-SN-AGENT-MIB>.
=item $foundry->brcd_e_pos()
@@ -1180,13 +1180,13 @@ this entity is not contained in any other entity.
=item $foundry->sw_index()
Returns reference to hash. Maps Table to Interface IID.
Returns reference to hash. Maps Table to Interface IID.
(C<snSwPortIfIndex>)
=item $foundry->sw_duplex()
Returns reference to hash. Current duplex status for switch ports.
Returns reference to hash. Current duplex status for switch ports.
(C<snSwPortInfoChnMode>)
@@ -1198,7 +1198,7 @@ Returns reference to hash. Current Port Type .
=item $foundry->sw_speed()
Returns reference to hash. Current Port Speed.
Returns reference to hash. Current Port Speed.
(C<snSwPortInfoSpeed>)

View File

@@ -115,14 +115,14 @@ Netdisco Developers
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $genua = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myhub',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $genua->class();
@@ -163,7 +163,7 @@ Returns 'genua'
=item $genua->os_ver()
(C<infoRelease>) and (C<infoPatchlevel>)
(C<infoRelease>) and (C<infoPatchlevel>)
=item $genua->model()

View File

@@ -89,7 +89,7 @@ sub vendor {
sub model {
my $h3c = shift;
my $descr = $h3c->description();
if ($descr =~ /^.*\n(.*)\n/) {
return $1;
@@ -154,14 +154,14 @@ Jeroen van Ingen
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $h3c = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $h3c->class();
@@ -223,7 +223,7 @@ Returns the OS extracted from C<sysDescr>.
=item $h3c->os_ver()
Returns the software version. Either C<entPhysicalSoftwareRev.2> or extracted from
Returns the software version. Either C<entPhysicalSoftwareRev.2> or extracted from
C<sysDescr>.
=back

View File

@@ -209,14 +209,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $hp9300 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $hp9300->class();
@@ -359,11 +359,11 @@ Returns reference to hash of interface names to iids.
Returns reference to hash of interfaces to be ignored.
Ignores interfaces with descriptions of tunnel,loopback,null
Ignores interfaces with descriptions of tunnel,loopback,null
=item $hp9300->i_duplex()
Returns reference to hash of interface link duplex status.
Returns reference to hash of interface link duplex status.
Crosses $hp9300->sw_duplex() with $hp9300->sw_index()
@@ -375,13 +375,13 @@ Crosses $hp9300->sw_duplex() with $hp9300->sw_index()
=item $hp9300->sw_index()
Returns reference to hash. Maps Table to Interface IID.
Returns reference to hash. Maps Table to Interface IID.
(C<snSwPortIfIndex>)
=item $hp9300->sw_duplex()
Returns reference to hash. Current duplex status for switch ports.
Returns reference to hash. Current duplex status for switch ports.
(C<snSwPortInfoChnMode>)
@@ -393,7 +393,7 @@ Returns reference to hash. Current Port Type .
=item $hp9300->sw_speed()
Returns reference to hash. Current Port Speed.
Returns reference to hash. Current Port Speed.
(C<snSwPortInfoSpeed>)

View File

@@ -138,7 +138,7 @@ sub os_ver {
if ($descr =~ /Version\s # Start match on Version string
([\d\.]+) # Capture the primary version in 1
,? # There may be a comma
\s # Always a space
\s # Always a space
(?:Release|Feature)? # Don't capture stanza if present
(?:\(\w+)? # If paren & model don't capture
\s # Always a space
@@ -154,7 +154,7 @@ sub os_ver {
sub mac {
my $huawei = shift;
return $huawei->b_mac();
}
@@ -393,7 +393,7 @@ sub fan {
my ($slot, $num) = split(/\./, $k);
my $descr = "Slot $slot,Fan $num";
$descr = $fan->{$k} if ($fan->{$k});
push @messages, "$descr: $state->{$k}";
}
@@ -511,14 +511,14 @@ Jeroen van Ingen and Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $huawei = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $huawei->class();
@@ -553,7 +553,7 @@ Subclass for Huawei switches
=item F<HUAWEI-POE-MIB>
=item F<HUAWEI-ENTITY-EXTENT-MIB>
=item Inherited Classes' MIBs
See L<SNMP::Info::Layer3> for its own MIB requirements.

View File

@@ -248,14 +248,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $ibm = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $ibm->class();
@@ -335,7 +335,7 @@ Returns the software version
=item $ibm->hasLLDP()
Is LLDP is active in this device?
Is LLDP is active in this device?
Note: LLDP may be active, but nothing in C<lldpRemoteSystemsData> Tables so
the device would not return any useful topology information.
@@ -373,13 +373,13 @@ Ignores interfaces with descriptions of tunnel, loopback, and null.
=item $ibm->i_duplex()
Returns reference to hash of interface link duplex status.
Returns reference to hash of interface link duplex status.
(C<portInfoMode>)
=item $ibm->lldp_if()
Returns the mapping to the SNMP Interface Table. Tries to cross reference
Returns the mapping to the SNMP Interface Table. Tries to cross reference
(C<lldpInfoRemoteDevicesLocalPort>) with (C<ifDescr>) and (C<ifAlias>)
to get (C<ifIndex>).

View File

@@ -106,11 +106,11 @@ sub os {
sub layers {
my $juniper = shift;
my $layers = $juniper->SUPER::layers();
# Some models don't report L2 properly
# Some models don't report L2 properly
my $macs = $juniper->fw_mac();
if (keys %$macs) {
my $l = substr $layers, 6, 1, "1";
}
@@ -145,7 +145,7 @@ sub model {
# Query the junos device model.
my $mod = uc $l3->vc_model() || '';
if (not $mod eq '') {
if (not $mod eq '') {
return $mod;
}
# Fallback to old method
@@ -268,14 +268,14 @@ sub i_vlan {
return $i_vlan;
}
sub v_name {
sub v_name {
my $juniper = shift;
return $juniper->jnx_els_v_name() || $juniper->jnx_v_name();
}
# Index doesn't use VLAN ID, so override the HOA private method here to
# correct the mapping
# correct the mapping
sub _vlan_hoa {
my $juniper = shift;
my ( $v_ports, $partial ) = @_;
@@ -373,7 +373,7 @@ sub _e_is_virtual {
my $juniper = shift;
my $v_test = $juniper->jnxVirtualChassisMemberRole() || {};
#If we are functioning as a stack someone should be master
foreach my $iid ( keys %$v_test ) {
my $role = $v_test->{$iid};
@@ -418,7 +418,7 @@ sub e_index {
my $virtuals = $juniper->_e_virtual_index() || {};
my $is_virtual = $juniper->_e_is_virtual();
# Format into consistent integer format so that numeric sorting works
# Format into consistent integer format so that numeric sorting works
my %e_index;
if ($is_virtual) {
foreach my $key ( keys %$virtuals ) {
@@ -433,7 +433,7 @@ sub e_index {
foreach my $key ( keys %$contents ) {
$e_index{$key} = join( '', map { sprintf "%02d", $_ } split /\./, $key );
}
return \%e_index;
}
@@ -687,14 +687,14 @@ Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $juniper = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $juniper->class();
@@ -812,7 +812,7 @@ to a hash.
=item $juniper->qb_fdb_index()
Returns reference to hash: key = FDB ID, value = VLAN ID.
=item $juniper->v_index()
Returns (C<jnxL2aldVlanTag>) or (C<jnxExVlanTag>) depending upon switch
@@ -859,7 +859,7 @@ For example, ge-0/0/1 registers as PowerEthernet interface '1.2'
=head2 Pseudo F<ENTITY-MIB> information
These methods emulate F<ENTITY-MIB> Physical Table methods using
F<JUNIPER-MIB> and F<JUNIPER-VIRTUALCHASSIS-MIB>.
F<JUNIPER-MIB> and F<JUNIPER-VIRTUALCHASSIS-MIB>.
=over

View File

@@ -113,7 +113,7 @@ sub serial {
$serial = $1 if ( $descr =~ m/Lantronix EDS\w+ V[\d\.R]+ \((\w+)\)/ );
return $serial;
}
}
sub model {
my $device = shift;
@@ -162,14 +162,14 @@ J R Binks
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $device = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'mydevice',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $device->class();
@@ -246,10 +246,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
These are methods that return tables of information in the form of a reference
to a hash.
=over
=back
=head2 Overrides
=over

View File

@@ -104,14 +104,14 @@ begemot
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# 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();

View File

@@ -113,14 +113,14 @@ initial version based on SNMP::Info::Layer3::NetSNMP by Bradley Baetz and Bill F
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $mikrotik = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $mikrotik->class();
@@ -179,6 +179,7 @@ Returns the value of C<mtxrLicVersion>.
Returns the value of RouterOS level C<mtxrLicLevel>
=item $mikrotik->board_temp()
=item $mikrotik->cpu_temp()
Returns the appropriate temperature values
@@ -206,13 +207,8 @@ to a hash.
None.
=over
=back
=head2 Table Methods imported from SNMP::Info::Layer3
See documentation in L<SNMP::Info::Layer3> for details.
=cut

View File

@@ -183,14 +183,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $n1600 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $n1600->class();
@@ -200,10 +200,10 @@ Eric Miller
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from an
Avaya/Nortel N16XX device through SNMP.
Avaya/Nortel N16XX device through SNMP.
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.
my $n1600 = new SNMP::Info::Layer3::N1600(...);
@@ -243,7 +243,7 @@ Return C<1>. Bulkwalk is currently turned off for this class.
=item $n1600->model()
Returns model type. Checks $n1600->id() against the
Returns model type. Checks $n1600->id() against the
F<RAPID-CITY-MIB> and then parses out C<rcA>.
=item $n1600->vendor()
@@ -300,11 +300,11 @@ SNMP::Info::SONMP.
=item $n1600->i_duplex()
Returns reference to hash of interface operational link duplex status.
Returns reference to hash of interface operational link duplex status.
=item $n1600->i_duplex_admin()
Returns reference to hash of interface administrative link duplex status.
Returns reference to hash of interface administrative link duplex status.
=back

View File

@@ -143,14 +143,14 @@ Bradley Baetz and Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $netsnmp = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $netsnmp->class();

View File

@@ -277,7 +277,7 @@ sub i_up_admin {
my %i_up_admin;
foreach my $iid ( keys %$ns_i_map ) {
$i_up_admin{$iid}
$i_up_admin{$iid}
= $i_up->{$iid} eq "up" && "up"
|| $i_up_admin->{ $ns_i_map->{$iid} }
|| 0;
@@ -324,7 +324,7 @@ sub i_speed {
my %i_speed;
foreach my $iid ( keys %$ns_i_map ) {
$i_speed{$iid}
$i_speed{$iid}
= $i_speed->{ $ns_i_map->{$iid} }
|| $i_name->{$iid} =~ /tunnel/ && "vpn"
|| 0;
@@ -527,7 +527,7 @@ Kent Hamilton
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
@@ -536,11 +536,11 @@ Kent Hamilton
=head1 DESCRIPTION
Provides abstraction to the configuration information obtainable from a
Provides abstraction to the configuration information obtainable from a
Juniper Netscreen devices through SNMP.
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.
my $netscreen = new SNMP::Info::Layer3::Netscreen(...);
@@ -610,7 +610,7 @@ Returns serial number.
=item $netscreen->layers()
Returns 01001110. Device doesn't report layers properly, modified to reflect
Returns 01001110. Device doesn't report layers properly, modified to reflect
Layer 2 and 3 functionality.
=back
@@ -641,7 +641,7 @@ name.
Defaults to C<insIfDescr> if available, uses C<nsIfName> if not.
=item $netscreen->i_description()
=item $netscreen->i_description()
Description of the interface. Uses C<insIfDescr> if available, C<nsIfName>
if not.
@@ -658,12 +658,12 @@ Default SNMP IID to Interface index.
=item $netscreen->i_lastchange()
The value of C<sysUpTime> when this port last changed states (up,down),
The value of C<sysUpTime> when this port last changed states (up,down),
maps from C<ifIndex> to C<nsIfIndex>.
(C<ifLastChange>)
=item $netscreen->i_mac()
=item $netscreen->i_mac()
MAC address of the interface. Note this is just the MAC of the port, not
anything connected to it. Uses C<nsIfMAC> if available, C<ifPhysAddress>
@@ -691,7 +691,7 @@ Interface type. Maps from C<ifIndex> to C<nsIfIndex>.
(C<ifType>)
=item $netscreen->i_up()
=item $netscreen->i_up()
Link Status of the interface. Typical values are 'up' and 'down'.
@@ -732,7 +732,7 @@ Gives netmask setting for IP table entry.
Uses C<nsIpArpTable> to emulate the forwarding table.
=over
=over
=item $netscreen->fw_index()
@@ -760,21 +760,21 @@ identifier (IID).
=item $netscreen->at_index()
Returns reference to hash. Maps ARP table entries to Interface IIDs
Returns reference to hash. Maps ARP table entries to Interface IIDs
If the device doesn't support C<ipNetToMediaIfIndex>, this will try
the proprietary C<nsIpArpIfIdx>.
=item $netscreen->at_paddr()
Returns reference to hash. Maps ARP table entries to MAC addresses.
Returns reference to hash. Maps ARP table entries to MAC addresses.
If the device doesn't support C<ipNetToMediaPhysAddress>, this will try
the proprietary C<nsIpArpMac>.
=item $netscreen->at_netaddr()
Returns reference to hash. Maps ARP table entries to IP addresses.
Returns reference to hash. Maps ARP table entries to IP addresses.
If the device doesn't support C<ipNetToMediaNetAddress>, this will try
the proprietary C<nsIpArpIp>.
@@ -783,7 +783,7 @@ the proprietary C<nsIpArpIp>.
=head3 Wireless Information
=over
=over
=item $dot11->i_ssidlist()

View File

@@ -65,8 +65,8 @@ $VERSION = '3.64';
'mac' => 'dot1dBaseBridgeAddress',
);
%FUNCS = (
%SNMP::Info::Layer3::CiscoSwitch::FUNCS,
%FUNCS = (
%SNMP::Info::Layer3::CiscoSwitch::FUNCS,
'vrf_name' => 'cContextMappingVrfName',
);
@@ -258,7 +258,7 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $nexus = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -266,7 +266,7 @@ Eric Miller
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $nexus->class();
@@ -274,10 +274,10 @@ Eric Miller
=head1 DESCRIPTION
Abstraction subclass for Cisco Nexus Switches running NX-OS.
Abstraction subclass for Cisco Nexus Switches running NX-OS.
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.
my $nexus = new SNMP::Info::Layer3::Nexus(...);
@@ -340,12 +340,12 @@ C<dot1dBaseBridgeAddress>
=head3 IP Address Table
Each entry in this table is an IP address in use on this device. Some
Each entry in this table is an IP address in use on this device. Some
versions do not index the table with the IPv4 address in accordance with
the MIB definition, these overrides correct that behavior.
Also, the table is augmented with IP addresses in use by UDP sockets on the
device, as determined by checking F<RFC1213-MIB::udpLocalAddress>. Valid
Also, the table is augmented with IP addresses in use by UDP sockets on the
device, as determined by checking F<RFC1213-MIB::udpLocalAddress>. Valid
addresses from this table (any IPv4 that is not localhost, 0.0.0.0, Class D
(multicast) or Class E (experimental) are added as a /32 on interface ID 0.
This is a workaround to determine possible VPC Keepalive IP addresses on the

View File

@@ -110,12 +110,12 @@ sub i_ignore {
sub layers {
my $pfront = shift;
my $layers = $pfront->SUPER::layers();
# Some models or softwware versions don't report L2 properly
# so add L2 capability to the output if the device has bridge ports.
my $bports = $pfront->b_ports();
if ($bports) {
my $l = substr $layers, 6, 1, "1";
}
@@ -137,14 +137,14 @@ initial version based on SNMP::Info::Layer3::NetSNMP by Bradley Baetz and Bill F
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $pfront = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $pfront->class();
@@ -202,7 +202,7 @@ Returns the software version extracted from C<sysDescr>.
=item $pfront->serial()
Returns the value of C<productSerialNo>.
Returns the value of C<productSerialNo>.
=back
@@ -227,7 +227,7 @@ Ignores loopback
=item $pfront->layers()
L2 capability isn't always reported correctly by the device itself; what the
L2 capability isn't always reported correctly by the device itself; what the
device reports is augmented with L2 capability if the device has bridge ports.
=back

View File

@@ -676,7 +676,7 @@ sub fw_status {
my $qb = $passport->SUPER::fw_status($partial);
return $qb if (ref {} eq ref $qb and scalar keys %$qb);
return $passport->rcBridgeTpFdbStatus($partial);
}
@@ -1179,14 +1179,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $passport = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $passport->class();
@@ -1197,12 +1197,12 @@ Eric Miller
Abstraction subclass for modular Avaya Ethernet Routing Switch 8000 Series
(formerly Nortel/Bay Passport/Accelar) and VSP 9000 Series switches.
These devices have some of the same characteristics as the stackable Avaya
Ethernet Switches (Baystack). For example, extended interface information is
These devices have some of the same characteristics as the stackable Avaya
Ethernet Switches (Baystack). For example, extended interface information is
gleaned from F<RAPID-CITY>.
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.
my $passport = new SNMP::Info::Layer3::Passport(...);
@@ -1240,7 +1240,7 @@ These are methods that return scalar value from SNMP
=item $passport->model()
Returns model type. Checks $passport->id() against the
Returns model type. Checks $passport->id() against the
F<RAPID-CITY-MIB> and then parses out C<rcA>.
=item $passport->vendor()
@@ -1364,7 +1364,7 @@ problems with F<BRIDGE-MIB>
These methods utilize, in order; F<Q-BRIDGE-MIB>, F<BRIDGE-MIB>, and
F<RAPID-CITY> to obtain the forwarding table information.
=over
=over
=item $passport->fw_mac()

View File

@@ -132,7 +132,7 @@ Max Baker
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $pf = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -140,7 +140,7 @@ Max Baker
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $pf->class();
@@ -157,7 +157,7 @@ that the available CDP/LLDP modules for net-snmp don't work on FreeBSD (on
which pfSense is based) as they assume certain Linux specific Ethernet
structures. This problem is apparently solved on PF based firewall appliances
by using the ladvd package, for which a port may be found here:
L<http://www.freshports.org/net/ladvd/>. I'm not sure if this module ties into
L<http://www.freshports.org/net/ladvd/>. I'm not sure if this module ties into
Net-SNMP or not.
=head2 Inherited Classes
@@ -205,7 +205,7 @@ Returns 'Pf'
=item $pf->os_ver()
Tries to reference $pf->id() to one of the product MIBs listed above.
Will probably return a truncation of the default OID for pf-based systems
Will probably return a truncation of the default OID for pf-based systems
C<enterprises.12325.1.1.2.1.1>.
=back

View File

@@ -102,14 +102,14 @@ Jeroen van Ingen
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $pica8 = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $pica8->class();

View File

@@ -175,12 +175,6 @@ See documentation in L<SNMP::Info::Layer3/"GLOBALS"> for details.
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.

View File

@@ -72,7 +72,7 @@ sub model {
my $riverbed = shift;
my $model = $riverbed->rb_model() || '';
if ($model =~ /^(\d+)/) {
return $1;
}
@@ -85,19 +85,19 @@ sub os {
sub os_ver {
my $riverbed = shift;
my $ver = $riverbed->systemVersion() || '';
if ( $ver =~ /(\d+[\.\d]+)/ ) {
return $1;
}
return $ver;
}
sub serial {
my $riverbed = shift;
return $riverbed->serialNumber();
}
@@ -115,14 +115,14 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $riverbed = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $riverbed->class();
@@ -133,7 +133,7 @@ Eric Miller
Abstraction subclass for Riverbed Steelhead WAN optimization appliances.
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.
my $riverbed = new SNMP::Info::Layer3::Steelhead(...);

View File

@@ -113,14 +113,14 @@ begemot
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $sun = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'mysunrouter',
Community => 'public',
Version => 1
)
)
or die "Can't connect to DestHost.\n";
my $class = $sun->class();

View File

@@ -340,7 +340,7 @@ Eric Miller
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $tasman = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -348,7 +348,7 @@ Eric Miller
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $tasman->class();
@@ -400,7 +400,7 @@ Returns C<'avaya'>
=item $tasman->model()
Tries to get the model from C<nnchassisModel> and if not available
Tries to get the model from C<nnchassisModel> and if not available
cross references $tasman->id() to F<NT-ENTERPRISE-DATA-MIB>.
Substitutes 'SR' for C<'ntSecureRouter'> in the name for readability.
@@ -487,7 +487,7 @@ C<portAdminSpeed>
=head2 Pseudo F<ENTITY-MIB> information
These methods emulate F<ENTITY-MIB> Physical Table methods using
F<CHASSIS-MIB>.
F<CHASSIS-MIB>.
=over

View File

@@ -275,7 +275,7 @@ sub i_duplex_admin {
sub agg_ports {
my $alu = shift;
return $alu->agg_ports_ifstack();
}
@@ -402,7 +402,7 @@ Bill Fenner
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $alu = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
@@ -410,7 +410,7 @@ Bill Fenner
DestHost => 'myswitch',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $alu->class();
@@ -527,7 +527,7 @@ upon the transceiver inserted.
=item $alu->lldp_if()
Returns the mapping to the SNMP Interface Table. Utilizes (C<ifIndex>)
Returns the mapping to the SNMP Interface Table. Utilizes (C<ifIndex>)
from the (C<tmnxLldpRemEntry >) index.
=back

View File

@@ -43,12 +43,10 @@ $VERSION = '3.64';
%MIBS = (
%SNMP::Info::Layer2::MIBS, %SNMP::Info::Layer3::MIBS,
);
%GLOBALS = (
%SNMP::Info::Layer2::GLOBALS, %SNMP::Info::Layer3::GLOBALS,
);
%FUNCS = ( %SNMP::Info::Layer2::FUNCS, %SNMP::Info::Layer3::FUNCS, );
@@ -106,14 +104,14 @@ SNMP::Info::Layer3::VyOS - SNMP Interface to Vyatta Devices
=head1 SYNOPSIS
# Let SNMP::Info determine the correct subclass for you.
# Let SNMP::Info determine the correct subclass for you.
my $vyos = new SNMP::Info(
AutoSpecify => 1,
Debug => 1,
DestHost => 'myrouter',
Community => 'public',
Version => 2
)
)
or die "Can't connect to DestHost.\n";
my $class = $vyos->class();