partition = ""; $this->action_id = 0; $this->basic_interval = 0; $this->normal_interval = 0; $this->full_interval = 0; $this->ta_threshold = 3; $this->ta_scan_type = 0; $this->import_scan_type = 0; $this->suspect_count_scan_type = 0; $this->post_ras_fail_type = 0; $this->concurrent_scans = 0; $this->priority = 1; $this->export_media_fail_type = 0; $this->request_copy_fail_type = 0; $this->report_media_inaccessible = 0; $this->paused = 0; } function setFromPostdata($postdata) { $this->action_id = intval($postdata["action_id"]); $this->request_copy_fail_type = intval($postdata["request_copy_fail_type"]); $this->suspect_count_scan_type = intval($postdata["suspect_count_scan_type"]); $this->basic_interval = intval($postdata["basic_interval"]); $this->normal_interval = intval($postdata["normal_interval"]); $this->full_interval = intval($postdata["full_interval"]); $this->ta_scan_type = intval($postdata["ta_scan_type"]); $this->ta_threshold = intval($postdata["ta_threshold"]); $this->import_scan_type = intval($postdata["import_scan_type"]); $this->post_ras_fail_type = $postdata["post_ras_fail_type"] == "true"; $this->concurrent_scans = intval($postdata["concurrent_scans"]); $this->priority = 1; $this->export_media_fail_type = 0; $this->report_media_inaccessible = $postdata["report_media_inaccessible"] == "true"; $this->paused = 0; } } // Get EKM license counts so we make sure the user doesn't exceed them. $ekmMax = get_ekm_drive_cnt($user); $ekmUsed = get_ekm_used_count($user); // Same for DPS licenses $dpsMax = get_max_dps_drive_cnt($user); $dpsUsed = get_dps_used_count($user); $hasEdlm = is_feature_licensed($user, "EDLM"); // Check for inprogress edlm test sessions $edlm_inprogress=edlm_get_inprogress_sessions($user); error_log("In progress edlm sessions: ".print_r($edlm_inprogress,true)); if ($_SERVER[REQUEST_METHOD] == "POST") { $operationInProgress = true; $status = new ReturnStatus(); $action = $_POST["action"]; if($action == "delete") { // Release DPS licenses used by the partition. // XXX I don't think we should be handling this in PHP code, but // I'm taking the path of least resistence for now. $drives = get_all_drives_by_library($user, $_POST["guid"], $sortCriteria, (int)0, (int)MEDIA_TYPE_ANY); if($dpsMax != 0) { foreach($drives as $drive ) { $DPSLicense = get_dps_license($user, $drive->guid); if($DPSLicense->UsesFeature) { submit_dps_license($user, $drive->guid, 0, 0, 0, 0); } } } // Now delete the partition. delete_logical_library($user, $_POST["guid"]); } else if($action == "auto") { auto_partition($user, $_POST["count"]); } else if($action == "create") { // Create Partition $libraryManaged = intval($_POST['library_managed']); $libName = $_POST['name']; $autoClean = ($_POST['ac_enabled'] == "true"); $acMotionHours = intval($_POST['ac_motion_hours']); $acScanCount = intval($_POST['ac_scan_count']); $drives = explode(":", $_POST['selected_drives']); $slotCount = intval($_POST['slots']); $emulationType = intval($_POST['emulation']); $barcodePolicy = intval($_POST['barcode_format']); create_logical_library($user, $libName, $emulationType, $barcodePolicy, $autoClean, $drives, $slotCount, $libraryManaged); $guid = get_partition_id_from_name($user, $libName); // JEG: PCR 56253 - Allow cleaning interval period to be set // regardless on library auto cleaning enabled. // Configure the autoclean settings if enabled //if($autoClean) //{ set_partition_autoclean_settings($user, $guid, $autoClean, $acMotionHours, $acScanCount); //} // Create EDLM Policy (only if EDLM is licensed) if($hasEdlm) { error_log("Setting edlm config"); $config = new EdlmPolicy(); $config->partition = $guid; $config->setFromPostdata($_POST); error_log("Comitting edlm config"); edlm_set_partition_config($user, $config); } } else if($action == "modify") { $libGUID = $_POST['guid']; $libName = $_POST['name']; $autoClean = ($_POST['ac_enabled'] == "true"); $acMotionHours = intval($_POST['ac_motion_hours']); $acScanCount = intval($_POST['ac_scan_count']); $newDrives = explode(":", $_POST['selected_drives']); $slotCount = intval($_POST['slots']); $emulationType = intval($_POST['emulation']); $barcodePolicy = intval($_POST['barcode_format']); $drives = get_all_drives_by_library($user, $libGUID, $sortCriteria, (int)0,(int)MEDIA_TYPE_ANY); // Commit the basic changes modify_logical_library($user, $libGUID, $libName, $emulationType, $barcodePolicy, $autoClean, $newDrives, $slotCount); // Commit the autoclean settings set_partition_autoclean_settings($user, $libGUID, $autoClean, $acMotionHours, $acScanCount); // Update DPS licenses, if necessary if( $dpsMax != 0 ) { // Release all FIPS Licensing for the OLD drives foreach($drives as $drive ) { $DPSLicense = get_dps_license($user, $drive->guid); submit_dps_license($user, $drive->guid, $DPSLicense->CPFEnabled, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, 0); } // Get the new Drive List and Set Fips accordingly $drives = get_all_drives_by_library($user, $libGUID, $sortCriteria, (int)0,(int)MEDIA_TYPE_ANY); $encryption = get_partition_enryption( $user, $libGUID ); foreach($drives as $drive ) { $DPSLicense = get_dps_license($user, $drive->guid); submit_dps_license($user, $drive->guid, $DPSLicense->CPFEnabled, $DPSLicense->LMEnabled, $DPSLicense->DPFEnabled, $encryption->fips_mode); } } // Update EDLM Policy (only if EDLM is licensed) if($hasEdlm) { $new_policy = new EdlmPolicy(); $new_policy->partition = $libGUID; $new_policy->setFromPostdata($_POST); edlm_set_partition_config($user, $new_policy); } } print $status->out(); return; } $emulationMap = get_emulation_map($user); $barcodeFormatMap = get_barcodeformat_map($user); $typeMap = array(0 => "Standard", 1 => "Library Managed (EDLM)"); $scanTypeMap = edlm_get_scan_type_map(); $copyTriggerMap = array(0 => "[Disabled]", 1 => "Suspect Only", 2 => "Bad Only", 3 => "Bad or Suspect"); $taThresholdArray = range(0, 15); unset($taThresholdArray[0]); // Remove because zero is not a valid selection. // Options for cleaning $acIntervalOptions = array(100 => "100 Hours", 200 => "200 Hours", 400 => "400 Hours", 800 => "800 Hours", 10 => "10 Scans", 25 => "25 Scans"); $edlmApps = edlm_get_external_apps(); // Create a mapping of id -> app name for the extapps $appMap = array(0 => "None"); foreach($edlmApps as $app) { $appMap[$app->id] = $app->name; } $ekm_type = get_ekm_type($user); $counts = get_library_summary_info($user); $libs = $counts->libs; // Get cleaning slot count $clnSlotCount = get_num_cleaning_slots($user); // Host partitions must use licensed slots $hostLibAvailSlots = $counts->unassigned_slot_count; // EDLM partitions can use any unassigned slot $edlmLibAvailSlots = $counts->edlm_unassigned_slot_count; $edlmDefaultSlots = $counts->unlicensed_slot_count - $counts->edlm_assigned_slot_count; if($edlmDefaultSlots < 0) $edlmDefaultSlots = 0; // Determine if we have resources to create partitions $edlmDrivesAvailable = count(edlm_get_drives($user, true)); $hostDrivesAvailable = $counts->unassigned_drive_count - $edlmDrivesAvailable; // Can we auto create? $canAutoPartition = (($hostLibAvailSlots > 0) and ($hostDrivesAvailable > 0)); // Can we create EDLM partitions? $canCreateEdlmLib = $hasEdlm && ($edlmDrivesAvailable > 0); // Can we create Host partitions? $canCreateHostLib = $canAutoPartition; // Determine if LME is available on an EDLM partition, and count the // number of EDLM LME partitions, and the nubmer of standard partitions with policies and LME $edlmHasLME = false; $edlmLMEPartitionCount = 0; $stdPartWithLMEandEDLMCount = 0; foreach($libs as $lib) { if($lib->libraryManaged) { if($lib->method == 4) { $edlmHasLME = true; $edlmLMEPartitionCount++; } } else { if($lib->method == 4 && $lib->edlm_policy->active) { $stdPartWithLMEandEDLMCount++; } } } // Iterate through libraries to see if we have an EDLM partition. // If not, we will display a warning on the EDLM policy settings page. // Also determine if any non-edlm partitions have policies configured. // Also, count the number of edlm partitions $hasEdlmPartition = false; $hasEdlmPolicy = false; $edlmPartitionCount = 0; foreach($libs as $lib) { if($lib->libraryManaged) { $hasEdlmPartition = true; $edlmPartitionCount++; } else if($lib->edlm_policy->active) { $hasEdlmPolicy = true; } } function getNewLibDefaultName($type) { // The default name is either library_X or edlm_X, where "X" // is the next available letter in alphabetic sequence. global $libs; // Because of PHP retardedness, we need to keep a junk char in the 0-index position. $letters = array('*','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r'); $prefix = $type ? "edlm_" : "library_"; foreach($libs as $lib) { // Delete letters that are used from the array if((strlen($lib->name) == (strlen($prefix) + 1)) and (startsWith($lib->name, $prefix))) { $letter = $lib->name[strlen($prefix)]; $key = array_search($letter, $letters); if($key != false) { unset($letters[$key]); } } } // Now the first letter in the array is the first unused one. $first = array_slice($letters, 1, 2); return $prefix.($first[0]); } ?> Setup Partition

Setup - Partitions

Create, Modify, or Delete a Library Partition.

There are currently no partitions on the library.

$lib) { ?> edlm_policy->active ) { ?>
NameTypeEmulationMode Policy
0 ? "" : 'checked="checked"' ?>/> name ?> libraryManaged] ?> libraryManaged ? "N/A" : $emulationMap[$lib->emulationTypeEnum] ?> libraryManaged ? "N/A" : $lib->status ?> EDLM None
0 ?>

Automatically Create Partitions

Automatic partitioning assigns library resources proportionately among the partitions, see online help for more information.

Enter the number of partitions you would like to create.

unassigned_slot_count ?>

mailbox_count ?>

cleaning_count ?>

Modify Partition - Basic Settings

Set up general settings for the partition.

Current Settings: New Settings:

(this setting cannot be modified)

(max 12 characters)

[] Available

Library-Initiated Cleaning

Warning: No cleaning slots configured!

 

 

 

Warning: No cleaning slots configured!

 

Periodic Drive Cleaning  


Location Interface Type Mode State

Modify Partition - EDLM Policy Settings

Set up EDLM scan policies, scan type and notifications for the partition.

No EDLM Library Managed Partition has been created. These settings cannot be modified until an EDLM Library Managed Partition exists.

Current Settings: New Settings:

"Unlimited", 1, 2, 3, 4), "concurrent_scans", "concurrent_scans", 1) ?>

Days (0 = off)

Days (0 = off)

Create Partition - Basic Settings

Set up general settings for the new partition.

(max 12 characters)

[] Available

Library-Initiated Cleaning

Warning: No cleaning slots configured!

 

Warning: No cleaning slots configured!

Periodic Drive Cleaning


Location Interface Type Mode State

Create Partition - EDLM Policy Settings

Set up EDLM scan policies, scan type and notifications for the new partition.

No EDLM Library Managed Partition has been created. These settings cannot be modified until an EDLM Library Managed Partition exists.

General Settings:

"Unlimited", 1, 2, 3, 4), "concurrent_scans", "new_concurrent_scans") ?>

Scan Settings:

Days (0 = off)

Days (0 = off)

Result Action Settings: