test_class.pl script: also test devices without layers / sysServices
The test_class.pl script refused to test devices that don't implement sysServices. Since SNMP::Info has been modified to check connectivity by testing sysDescr as well, test_class.pl should follow that behaviour.
This commit is contained in:
@@ -82,9 +82,10 @@ print "Detected Class: ", $dev->device_type(), "\n";
|
|||||||
print "Using Class: $Class (-c to change)\n";
|
print "Using Class: $Class (-c to change)\n";
|
||||||
|
|
||||||
my $layers = $dev->layers();
|
my $layers = $dev->layers();
|
||||||
|
my $descr = $dev->description();
|
||||||
|
|
||||||
unless (defined $layers){
|
unless (defined $layers or defined $descr){
|
||||||
die "Are you sure you got the right community string and version?\nCan't fetch layers.\n";
|
die "Are you sure you got the right community string and version?\nCan't fetch layers or description.\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
print "Fetching global info...\n\n";
|
print "Fetching global info...\n\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user