guid] = $drive->vendor.$drive->driveType; } // Required to support the operation in progress dialog. $operationInProgress = true; $status = new ReturnStatus(); if( $maxLicense != 0 ) // Only do this if DPS is licensed. { // If the drives are HP LTO5 or HP LTO6 then release the old licneses if( $driveTypes[$OrigCPGUID] == "HPLTO-5" || $driveTypes[$OrigCPGUID] == "HPLTO-6" ) { // Delete all the OLD control paths and failovers... error_log("Releasing the CPF license for the OLD CP drive while preserving LMEEnabled and DPF."); $DPSLicense = get_dps_license($user, $OrigCPGUID); $return = submit_dps_license($user, $OrigCPGUID, 0, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, $DPSLicense->FIPSEnabled); //error_log("submit_dps_license1 returned ". $return); if( $OrigfailOverGUID != "" ) { error_log("Releasing the CPF license for OLD Failover drive while preserving LMEEnabled and DPF."); $DPSLicense = get_dps_license($user, $OrigfailOverGUID); $return = submit_dps_license($user, $OrigfailOverGUID, 0, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, $DPSLicense->FIPSEnabled); //error_log("submit_dps_license2 returned ". $return); } } else error_log("Not an HP LTO-5 or HP LTO-6 - Skipping all SNW licensing..."); } // See if a CPF drive was set. Only run one of the CP functions - not both. if( $failOverGUID != "" ) { // No need to check the licnesing here we could not have got here it it was not licnesed. error_log("Setting the FailOver Drive to $failOverGUID - Consuming 2 SNW licenses"); // Consume a DPS license for the command path and the failover. $DPSLicense = get_dps_license($user, $controlPathGUID); $return = submit_dps_license($user, $controlPathGUID, 1, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, $DPSLicense->FIPSEnabled); //error_log("submit_dps_license3 returned ". $return); $DPSLicense = get_dps_license($user, $failOverGUID); $return = submit_dps_license($user, $failOverGUID, 1, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, $DPSLicense->FIPSEnabled); //error_log("submit_dps_license4 returned ". $return); $Ret = set_command_path_failover($user, $libraryGUID, $controlPathGUID, $failOverGUID); error_log("set_command_path_failover returned a $Ret"); } else { error_log( "- - - - - - - - set_controlPath($user, $libraryGUID, $controlPathGUID) " ); set_command_path_drive($user, $libraryGUID, $controlPathGUID); } print $status->out(); return; } return; } // Get the number of logical libraies so we know if we need to bring up the partition Select page or not. $libs = get_logical_libraries_brief($user); // Remove any library-managed partitions from the list, as they // can't have control paths. foreach($libs as $k => $lib) { if($lib->library_managed) { unset($libs[$k]); continue; } // Set the number of SNW licenses in use for each partition $libs[$k]->snwCount = get_dps_used_count_for_partition($user, $lib->guid); } $lib_count = count($libs); $usedDpsLicneses = get_dps_used_count($user); ?>