[#202] Detect failed OUI and MIB downloads
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
* Be more strict about Node Search matching ports/wifi within date range
|
* Be more strict about Node Search matching ports/wifi within date range
|
||||||
* Allow filtering out of Device Ports on Node (MAC) search
|
* Allow filtering out of Device Ports on Node (MAC) search
|
||||||
* Display Voice VLAN on Cisco devices
|
* Display Voice VLAN on Cisco devices
|
||||||
|
* [#202] Detect failed OUI and MIB downloads
|
||||||
|
|
||||||
[BUG FIXES]
|
[BUG FIXES]
|
||||||
|
|
||||||
|
|||||||
@@ -195,7 +195,7 @@ sub deploy_oui {
|
|||||||
@lines = split /\n/, $resp->{content};
|
@lines = split /\n/, $resp->{content};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scalar @lines) {
|
if (scalar @lines > 50) {
|
||||||
foreach my $line (@lines) {
|
foreach my $line (@lines) {
|
||||||
if ($line =~ m/^\s*(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) {
|
if ($line =~ m/^\s*(.{2}-.{2}-.{2})\s+\(hex\)\s+(.*)\s*$/i) {
|
||||||
my ($oui, $company) = ($1, $2);
|
my ($oui, $company) = ($1, $2);
|
||||||
@@ -225,7 +225,7 @@ sub deploy_oui {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print color 'bold red';
|
print color 'bold red';
|
||||||
say 'OUI update failed.';
|
say 'OUI update failed!';
|
||||||
}
|
}
|
||||||
|
|
||||||
print color 'reset';
|
print color 'reset';
|
||||||
@@ -276,10 +276,15 @@ sub deploy_mibs {
|
|||||||
my $ae = Archive::Extract->new(archive => $file, type => 'tgz');
|
my $ae = Archive::Extract->new(archive => $file, type => 'tgz');
|
||||||
$ae->extract(to => $mibhome->parent->stringify);
|
$ae->extract(to => $mibhome->parent->stringify);
|
||||||
unlink $file;
|
unlink $file;
|
||||||
|
|
||||||
|
print color 'bold blue';
|
||||||
|
say 'MIBs update complete.';
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
print color 'bold red';
|
||||||
|
say 'MIB download failed!';
|
||||||
}
|
}
|
||||||
|
|
||||||
print color 'bold blue';
|
|
||||||
say 'MIBs update complete.';
|
|
||||||
print color 'reset';
|
print color 'reset';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user