PBN devices support CDP but does not output like Cisco so using a different function to grab the first array needed

This commit is contained in:
laf
2015-08-04 20:37:05 +00:00
parent a10c488915
commit de0f9ee697

View File

@@ -41,7 +41,12 @@ if ($device['os'] == 'ironware' && $config['autodiscovery']['xdp'] === true) {
echo ' CISCO-CDP-MIB: ';
unset($cdp_array);
if ($config['autodiscovery']['xdp'] === true) {
$cdp_array = snmpwalk_cache_twopart_oid($device, 'cdpCache', array(), 'CISCO-CDP-MIB');
if ($device['os'] == 'pbn') {
$cdp_array = snmpwalk_cache_oid($device, 'cdpCache', array(), 'CISCO-CDP-MIB');
}
else {
$cdp_array = snmpwalk_cache_twopart_oid($device, 'cdpCache', array(), 'CISCO-CDP-MIB');
}
d_echo($cdp_array);
if ($cdp_array) {
unset($cdp_links);