sortColumn = DRV_SORT_DEFAULT; $sortCriteria->ascending = true; $drives = get_all_drives($user, $sortCriteria); foreach ($drives as $drive) { $i = 0; foreach($driveGuids as $driveGuid) { if(strcmp($drive->guid, $driveGuid) == 0) { if (strcmp($dinterfaces[$i], "SCSI") == 0) { // call the extension to do the actual change if($drive->scsiId != $driveIds[$i]) { error_log("scsiID changed"); set_scsi_id($user, $driveGuid, $driveIds[$i]); send_snmp_audit_logging_drive_config_changed_trap($user, $drive->name, $drive->wwnn, $drive->logicalAddress, $drive->serialNumber, "A tape drive configuration setting has been changed from the web UI"); } } else { // call the extension to do the actual change if($drive->loopId != $driveIds[$i]) { error_log("non gen5 or gen6 fc changed"); set_fc_ids($user, $driveGuid, intval($driveIds[$i]), $drive->topology, $drive->speed, 0); send_snmp_audit_logging_drive_config_changed_trap($user, $drive->name, $drive->wwnn, $drive->logicalAddress, $drive->serialNumber, "A tape drive configuration setting has been changed from the web UI"); } } if ($status->errorCode != 0) { $errorCode = $status->errorCode; } } $i++; } } // this takes care of LTO-5 and LTO-6 foreach ($drives as $drive) { $i = 0; foreach($driveGuids_5or6 as $driveGuid_5or6) { if(strcmp($drive->guid, $driveGuid_5or6) == 0) { if(($drive->loopId != $driveId1s_5or6[$i]) || ($drive->loopId2 != $driveId2s_5or6[$i])) { error_log("gen 5 fc changed"); send_snmp_audit_logging_drive_config_changed_trap($user, $drive->name, $drive->wwnn, $drive->logicalAddress, $drive->serialNumber, "A tape drive configuration setting has been changed from the web UI"); set_fc_ids($user, $driveGuid_5or6, $driveId1s_5or6[$i], $drive->topology, $drive->speed, $driveId2s_5or6[$i], $drive->topology2, $drive->speed2, 0); } if ($status->errorCode != 0) { $errorCode = $status->errorCode; } } $i++; } } $returnMessage = "Set Drive ID Complete."; } ?> Set Drive Id