discoverying and polling VRF

This commit is contained in:
HenocKA
2016-01-26 15:22:49 +01:00
parent ea5d2c66e6
commit 0ac8f584b2
11 changed files with 957 additions and 682 deletions
+10
View File
@@ -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;