out(); return; } else if( $_SERVER[REQUEST_METHOD] == "GET" ) { // Get the list of hosts. $sortCriteria = new SortCriteria($h_columnMap["h_name"], "1"); $hosts = get_registered_hosts($user, $sortCriteria); // Build a list of currently 'mapped' hosts. this list will be checked when unregistering a host // Step 1: Build a list of all DPSEnabled and mapped drives $driveGuids = array(); $tmpdrives = get_all_drives_by_type($user, (int)$TapeDriveModel_LTO_5, (int)$FiberChannel, $sortCriteria); foreach($tmpdrives as $tmpdrive) { $dpsLicense = get_dps_license($user, $tmpdrive->guid); if ($dpsLicense->LMEnabled == 1) { array_push($driveGuids, $tmpdrive->guid); } } // Step 2: Build a list of hosts that are mapped $mappedHosts = ""; $delim = ""; if (count($driveGuids) > 0) { //error_log("hostAccessRegistration.htm driveGuids = " . print_r($driveGuids,true)); foreach($hosts as $host) { $accessListItems = get_host_mappings($user, $host->wwnn); if (count($accessListItems) > 0) { //error_log("count accessListItems = " + count($accessListItems)); foreach($accessListItems as $accessListItem ) { foreach($driveGuids as $driveGuid) { //error_log("driveGuid = " . $driveGuid); //error_log("accessListItem->guid = " . $accessListItem->guid); if($driveGuid == $accessListItem->guid) { // This host is mapped, add it to the list if ($accessListItem->map) { //error_log("hostAccessRegistration.htm mapped host = " . print_r($host,true)); $mappedHosts.= $delim; $mappedHosts.= $host->wwnn; $delim="*"; } } } } } } error_log("hostAccessRegistration.htm mappedHosts = " . $mappedHosts); } error_log("GET hosts = " . print_r($hosts, true)); $self = $_SERVER[REQUEST_URI]; } $isDPSLicensed = is_dps_licensed($user); ?>