and more whitespace cleanup

This commit is contained in:
inphobia
2019-01-19 05:07:12 +01:00
parent ca48defd24
commit 6118b0d012
10 changed files with 73 additions and 73 deletions

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(...);