Common contexts for polling (#13158)

* Common contexts for polling
Don't store contexts on the device array, use the device model
Also should be easier to add different contexts later.

* rename variables for consistency
This commit is contained in:
Tony Murray
2021-08-23 01:22:28 -05:00
committed by GitHub
parent 54964e0c42
commit d8d0ccd03d
10 changed files with 30 additions and 55 deletions

View File

@@ -131,11 +131,6 @@ if (! isset($query)) {
foreach (dbFetch($query) as $device) {
DeviceCache::setPrimary($device['device_id']);
if ($device['os_group'] == 'cisco') {
$device['vrf_lite_cisco'] = dbFetchRows('SELECT * FROM `vrf_lite_cisco` WHERE `device_id` = ' . $device['device_id']);
} else {
$device['vrf_lite_cisco'] = '';
}
if (! poll_device($device, $module_override)) {
$unreachable_devices++;