contrib whitespace cleanup

This commit is contained in:
inphobia
2019-01-19 05:37:23 +01:00
parent d938a2c0d6
commit e68fa13289
7 changed files with 24 additions and 24 deletions

View File

@@ -58,7 +58,7 @@
# Avoid Devel::Cover and Devel::CoverX::Covered files. # Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b \bcover_db\b
\bcovered\b \bcovered\b
# Avoid MYMETA files # Avoid MYMETA files
^MYMETA\. ^MYMETA\.

View File

@@ -6,7 +6,7 @@ Coding Guidelines:
- always update ChangeLog before committing - always update ChangeLog before committing
- check-in required mibs to netdisco-mibs and release new package if needed - check-in required mibs to netdisco-mibs and release new package if needed
Release and Testing Instructions: Release and Testing Instructions:
- for netdisco see: - for netdisco see:
-> https://github.com/netdisco/netdisco/wiki/Developing -> https://github.com/netdisco/netdisco/wiki/Developing
-> https://metacpan.org/pod/App::Netdisco -> https://metacpan.org/pod/App::Netdisco
@@ -17,17 +17,17 @@ Release and Testing Instructions:
-> https://github.com/netdisco/netdisco-mibs/wiki -> https://github.com/netdisco/netdisco-mibs/wiki
FAQ: FAQ:
- Do I have to update the version number and timestamp in modified files before committing? - Do I have to update the version number and timestamp in modified files before committing?
-> No. These are RCS tags that are automatically updated by CVS when you commit -> No. These are RCS tags that are automatically updated by CVS when you commit
- Should I add changes at the top of the ChangeLog? - Should I add changes at the top of the ChangeLog?
-> Yes. The changelog is created one commit at a time. If there isn't a -> Yes. The changelog is created one commit at a time. If there isn't a
section for the current version, then add one at the top and put your section for the current version, then add one at the top and put your
changes after. You can leave the date field for the release empty (). changes after. You can leave the date field for the release empty ().
- What should I change the $VERSION to? - What should I change the $VERSION to?
-> If you are the first person to get to a file after a release, update it -> If you are the first person to get to a file after a release, update it
to either release++ or "release++ dash cvs". to either release++ or "release++ dash cvs".
Example: File is marked 2.01, change it to 2.02-cvs with your new changes. Example: File is marked 2.01, change it to 2.02-cvs with your new changes.
Example: File is marked 2.02-cvs, no change until packaging for release when the -cvs is removed. Example: File is marked 2.02-cvs, no change until packaging for release when the -cvs is removed.
TODO: Is there still an odd/even scheme as introduced by Eric? TODO: Is there still an odd/even scheme as introduced by Eric?

View File

@@ -28,7 +28,7 @@ if ($@) {
} else { } else {
$graph{$vendor}->{$family}=[]; $graph{$vendor}->{$family}=[];
} }
} }
} }
my $now = scalar localtime; my $now = scalar localtime;
@@ -83,7 +83,7 @@ foreach my $vendor (sort sort_nocase keys %$matrix){
} elsif (defined $vendor_defaults->{$a}){ } elsif (defined $vendor_defaults->{$a}){
$val = $vendor_defaults->{$a}; $val = $vendor_defaults->{$a};
$class = 'vendor'; $class = 'vendor';
} }
print " <TD CLASS='$class'>",join("<BR>\n",@$val),"</TD>\n"; print " <TD CLASS='$class'>",join("<BR>\n",@$val),"</TD>\n";
} }
print "</TR></TABLE>\n"; print "</TR></TABLE>\n";
@@ -141,7 +141,7 @@ sub parse_data {
my ($cmd,$value); my ($cmd,$value);
if ($line =~ /^([a-z-_]+)\s*:\s*(.*)$/) { if ($line =~ /^([a-z-_]+)\s*:\s*(.*)$/) {
$cmd = $1; $value = $2; $cmd = $1; $value = $2;
} else { } else {
print "What do i do with this line : $line \n"; print "What do i do with this line : $line \n";
next; next;
@@ -164,18 +164,18 @@ sub parse_data {
$family = $value; $family = $value;
$model = undef; $model = undef;
print "$family has no vendor.\n" unless defined $vendor; print "$family has no vendor.\n" unless defined $vendor;
$Matrix->{$vendor}->{families}->{$family} = {} $Matrix->{$vendor}->{families}->{$family} = {}
unless defined $Matrix->{$vendor}->{families}->{$family}; unless defined $Matrix->{$vendor}->{families}->{$family};
$class = $Matrix->{$vendor}->{families}->{$family}; $class = $Matrix->{$vendor}->{families}->{$family};
$class->{defaults}->{type}='family'; $class->{defaults}->{type}='family';
next; next;
} }
if ($cmd eq 'device') { if ($cmd eq 'device') {
$model = $value; $model = $value;
print "$model has no family.\n" unless defined $family; print "$model has no family.\n" unless defined $family;
print "$model has no vendor.\n" unless defined $vendor; print "$model has no vendor.\n" unless defined $vendor;
$Matrix->{$vendor}->{families}->{$family}->{models}->{$model} = {} $Matrix->{$vendor}->{families}->{$family}->{models}->{$model} = {}
unless defined $Matrix->{$vendor}->{families}->{$family}->{models}->{$model}; unless defined $Matrix->{$vendor}->{families}->{$family}->{models}->{$model};
$class = $Matrix->{$vendor}->{families}->{$family}->{models}->{$model}; $class = $Matrix->{$vendor}->{families}->{$family}->{models}->{$model};
$class->{defaults}->{type}='device'; $class->{defaults}->{type}='device';
@@ -233,7 +233,7 @@ sub html_head {
.vendor { font-size:12pt; color:#777777; } .vendor { font-size:12pt; color:#777777; }
.family { font-size:12pt; color:blue; } .family { font-size:12pt; color:blue; }
.model { font-size:12pt; color:red; } .model { font-size:12pt; color:red; }
.note { color:red; } .note { color:red; }
//--> //-->
</STYLE> </STYLE>
</HEAD> </HEAD>
@@ -304,7 +304,7 @@ be assumed working.
Discovery Protocol (LLDP), Cisco Discovery Protocol (CDP), Discovery Protocol (LLDP), Cisco Discovery Protocol (CDP),
SynOptics/Bay/Nortel/Avaya Network Management Protocol (SONMP), SynOptics/Bay/Nortel/Avaya Network Management Protocol (SONMP),
Foundry/Brocade Discovery Protocol (FDP), Extreme Discovery Foundry/Brocade Discovery Protocol (FDP), Extreme Discovery
Protocol (EDP), and Alcatel Mapping Adjacency Protocol (AMAP). Protocol (EDP), and Alcatel Mapping Adjacency Protocol (AMAP).
</TD> </TD>
</TR> </TR>
<TR> <TR>
@@ -325,7 +325,7 @@ be assumed working.
</BODY> </BODY>
</HTML> </HTML>
end_tail end_tail
} }
sub print_headers { sub print_headers {

View File

@@ -80,7 +80,7 @@ unless ( defined $sysdescr ) {
SNMP::loadModules(@ARGV); SNMP::loadModules(@ARGV);
# Create a hash of MIB Modules for which we want results # Create a hash of MIB Modules for which we want results
my %mib_hash = map {$_ => 1} @ARGV; my %mib_hash = map {$_ => 1} @ARGV;
# Add the common MIB Modules we always want # Add the common MIB Modules we always want
my @common_mibs = ('SNMPv2-MIB', 'IF-MIB'); my @common_mibs = ('SNMPv2-MIB', 'IF-MIB');

View File

@@ -35,7 +35,7 @@ sub glob_rec {
foreach my $f (@files) { foreach my $f (@files) {
next if $f eq '\.$'; next if $f eq '\.$';
if (-d $f) { if (-d $f) {
push @pms, glob_rec($f); push @pms, glob_rec($f);
next; next;

View File

@@ -250,11 +250,11 @@ test_class.pl [options]
Options: Options:
-c|class SNMP::Info class to use, Layer2::Catalyst -c|class SNMP::Info class to use, Layer2::Catalyst
-d|dev Device -d|dev Device
-s|comm SNMP community -s|comm SNMP community
-v|ver SNMP version -v|ver SNMP version
-p|print Print values -p|print Print values
-i|ignore Ignore Net-SNMP configuration file -i|ignore Ignore Net-SNMP configuration file
-m|mibdir Directory containing MIB Files -m|mibdir Directory containing MIB Files
-n|nobulk Disable bulkwalk -n|nobulk Disable bulkwalk
@@ -294,7 +294,7 @@ SNMP version. Default 2.
=item B<-print> =item B<-print>
Print values of a class method rather than summarizing. May be repeated Print values of a class method rather than summarizing. May be repeated
multiple times. multiple times.
-print i_description -print i_type -print i_description -print i_type
@@ -308,7 +308,7 @@ provided.
=item B<-mibdir> =item B<-mibdir>
Directory containing MIB Files. Multiple directories should be separated by a Directory containing MIB Files. Multiple directories should be separated by a
colon ':'. colon ':'.
-mibdir /usr/local/share/snmp/mibs/rfc:/usr/local/share/snmp/mibs/net-snmp -mibdir /usr/local/share/snmp/mibs/rfc:/usr/local/share/snmp/mibs/net-snmp

View File

@@ -385,9 +385,9 @@ test_class_mocked.pl [options]
Options: Options:
-class SNMP::Info class to use, Layer2::Catalyst -class SNMP::Info class to use, Layer2::Catalyst
-file File containing data gathered using make_snmpdata.pl -file File containing data gathered using make_snmpdata.pl
-print Print values -print Print values
-debug Debugging flag -debug Debugging flag
-ignore Ignore Net-SNMP configuration file -ignore Ignore Net-SNMP configuration file
-mibdir Directory containing MIB Files -mibdir Directory containing MIB Files
@@ -414,7 +414,7 @@ mandatory option.
=item B<-print> =item B<-print>
Print values of a class method rather than summarizing. May be repeated Print values of a class method rather than summarizing. May be repeated
multiple times. multiple times.
-print i_description -print i_type -print i_description -print i_type
@@ -434,7 +434,7 @@ provided.
=item B<-mibdir> =item B<-mibdir>
Directory containing MIB Files. Multiple directories should be separated by a Directory containing MIB Files. Multiple directories should be separated by a
colon ':'. colon ':'.
-mibdir /usr/local/share/snmp/mibs/rfc:/usr/local/share/snmp/mibs/net-snmp -mibdir /usr/local/share/snmp/mibs/rfc:/usr/local/share/snmp/mibs/net-snmp