mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
OSPF instances and missing mandatory fields fix attempt (#15712)
* dirty fix * better fix * more column checks * double check not necessary * get out of both loops
This commit is contained in:
@@ -87,6 +87,11 @@ class Ospf implements Module
|
||||
if (empty($ospf_entry['ospfRouterId'])) {
|
||||
continue; // skip invalid data
|
||||
}
|
||||
foreach (['ospfRxNewLsas', 'ospfOriginateNewLsas', 'ospfAreaBdrRtrStatus', 'ospfTOSSupport', 'ospfExternLsaCksumSum', 'ospfExternLsaCount', 'ospfASBdrRtrStatus', 'ospfVersionNumber', 'ospfAdminStat'] as $column) {
|
||||
if (! array_key_exists($column, $ospf_entry) || is_null($ospf_entry[$column])) {
|
||||
continue 2; // This column must exist and not be null
|
||||
}
|
||||
}
|
||||
|
||||
$instance = OspfInstance::updateOrCreate([
|
||||
'device_id' => $os->getDeviceId(),
|
||||
|
Reference in New Issue
Block a user