mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
discoverying and polling VRF
This commit is contained in:
@@ -306,6 +306,16 @@ function device_by_id_cache($device_id, $refresh = '0') {
|
||||
}
|
||||
else {
|
||||
$device = dbFetchRow("SELECT * FROM `devices` WHERE `device_id` = ?", array($device_id));
|
||||
|
||||
//order vrf_lite_cisco with context, this will help to get the vrf_name and instance_name all the time
|
||||
$vrfs_lite_cisco = dbFetchRows("SELECT * FROM `vrf_lite_cisco` WHERE `device_id` = ?", array($device_id));
|
||||
$device['vrf_lite_cisco'] = array();
|
||||
if(!empty($vrfs_lite_cisco)){
|
||||
foreach ($vrfs_lite_cisco as $vrf){
|
||||
$device['vrf_lite_cisco'][$vrf['context_name']] = $vrf;
|
||||
}
|
||||
}
|
||||
|
||||
$cache['devices']['id'][$device_id] = $device;
|
||||
}
|
||||
return $device;
|
||||
|
||||
Reference in New Issue
Block a user