discoverying and polling VRF

This commit is contained in:
HenocKA
2016-01-25 11:31:07 +01:00
parent 3c3cf96247
commit 30eb276155
11 changed files with 957 additions and 682 deletions
+10
View File
@@ -290,6 +290,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;