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

@@ -315,7 +315,6 @@ function device_by_id_cache($device_id, $refresh = false)
$device['lat'] = $model->location->lat ?? null;
$device['lng'] = $model->location->lng ?? null;
$device['attribs'] = $model->getAttribs();
$device['vrf_lite_cisco'] = $model->vrfLites->keyBy('context_name')->toArray();
return $device;
}