sortColumn = DRV_SORT_DEFAULT; $sortCriteria->ascending = true; $drives = get_all_drives($user, $sortCriteria); //error_log("All Drives".print_r($drives, true)); foreach ($driveGuids as $driveGuid) { reset_drive($user, $driveGuid); //send_snmp_audit_logging_drive_reboot_trap($user, $partition_name, $wwnn, $element_address, $serial_number); error_log("checking driveGUID: ".$driveGuid); foreach($drives as $drive) { error_log(" Checking drive: ".$drive->name." location: ".$drive->location." Guid: ".$drive->guid); if($driveGuid == $drive->guid) { error_log("send_snmp_audit_logging_drive_reboot_trap"); send_snmp_audit_logging_drive_reboot_trap($user, $drive->name, $drive->wwnn, $drive->logicalAddress, $drive->serialNumber, "A drive has been power cycled from the web UI"); break; } } } $returnMessage = "Drive Reset was successfully completed."; } ?> Set Drive Id