2008-03-12 17:12:17 +00:00
|
|
|
<?php
|
|
|
|
|
2015-04-17 14:59:47 -04:00
|
|
|
if ($config['enable_inventory']) {
|
2016-10-06 10:40:37 +10:00
|
|
|
// Legacy entPhysical - junos/timos/cisco
|
|
|
|
include 'includes/discovery/entity-physical/entity-physical.inc.php';
|
2008-03-12 17:12:17 +00:00
|
|
|
|
2016-10-06 10:40:37 +10:00
|
|
|
// Cisco CIMC
|
|
|
|
if ($device['os'] == 'cimc') {
|
|
|
|
include 'includes/discovery/entity-physical/cimc.inc.php';
|
2009-05-06 16:50:51 +00:00
|
|
|
}
|
2008-03-12 17:12:17 +00:00
|
|
|
|
2016-10-06 10:40:37 +10:00
|
|
|
// Delete any entries that have not bee accounted for.
|
|
|
|
$sql = 'SELECT * FROM `entPhysical` WHERE `device_id` = ?';
|
|
|
|
foreach (dbFetchRows($sql, array($device['device_id'])) as $test) {
|
|
|
|
$id = $test['entPhysicalIndex'];
|
|
|
|
if (!$valid[$id]) {
|
|
|
|
echo '-';
|
|
|
|
dbDelete('entPhysical', 'entPhysical_id = ?', array ($test['entPhysical_id']));
|
2015-07-13 20:10:26 +02:00
|
|
|
}
|
2016-10-06 10:40:37 +10:00
|
|
|
}
|
2016-08-28 12:32:58 -05:00
|
|
|
} else {
|
2015-07-13 20:10:26 +02:00
|
|
|
echo 'Disabled!';
|
|
|
|
}//end if
|