$part) { print_debug_vars($part); $part_index = 1024 + $index; $inventory[$part_index] = [ 'entPhysicalDescr' => $part['s5ChasPsuInfoDescription'], 'entPhysicalClass' => 'powerSupply', 'entPhysicalName' => "psu-$index", 'entPhysicalSerialNum' => $part['s5ChasPsuInfoSerialNumber'], 'entPhysicalAssetID' => '', 'entPhysicalIsFRU' => 'true', 'entPhysicalContainedIn' => $chassis_index, // ENTITY-MIB exposes the chassis with index 1. 'entPhysicalParentRelPos' => 1, 'entPhysicalMfgName' => $part['s5ChasPsuInfoManufacturer'], 'entPhysicalHardwareRev' => $part['s5ChasPsuInfoModelRevision'], 'entPhysicalModelName' => $part['s5ChasPsuInfoSuppPartNum'], ]; discover_inventory($device, $part_index, $inventory[$part_index], $mib); } // EOF