def process_kickstart(self, data): """Process the kickstart data.""" self.set_enabled(data.autopart.autopart) request = PartitioningRequest() if data.autopart.type is not None: request.partitioning_scheme = data.autopart.type if data.autopart.fstype: request.file_system_type = data.autopart.fstype if data.autopart.noboot: request.excluded_mount_points.append("/boot") if data.autopart.nohome: request.excluded_mount_points.append("/home") if data.autopart.noswap: request.excluded_mount_points.append("swap") if data.autopart.encrypted: request.encrypted = True request.passphrase = data.autopart.passphrase request.cipher = data.autopart.cipher request.luks_version = data.autopart.luks_version request.pbkdf = data.autopart.pbkdf request.pbkdf_memory = data.autopart.pbkdf_memory request.pbkdf_time = data.autopart.pbkdf_time request.pbkdf_iterations = data.autopart.pbkdf_iterations request.escrow_certificate = data.autopart.escrowcert request.backup_passphrase_enabled = data.autopart.backuppassphrase self.set_request(request)
def schedule_partitions_with_task_test(self, publisher): """Test SchedulePartitionsWithTask.""" self.module.on_storage_changed(Mock()) request = PartitioningRequest() request.partitioning_scheme = AUTOPART_TYPE_PLAIN task_path = self.interface.SchedulePartitionsWithTask( PartitioningRequest.to_structure(request)) obj = check_task_creation(self, task_path, publisher, InteractiveAutoPartitioningTask) self.assertEqual(obj.implementation._storage, self.module.storage) self.assertTrue(compare_data(obj.implementation._request, request))