def configure_storage(storage, data=None, interactive=False): """Setup storage state from the kickstart data. :param storage: an instance of the Blivet's storage object :param data: an instance of kickstart data or None :param interactive: use a task for the interactive partitioning """ auto_part_proxy = STORAGE.get_proxy(AUTO_PARTITIONING) if interactive: task = InteractivePartitioningTask(storage) elif auto_part_proxy.Enabled: luks_version = auto_part_proxy.LUKSVersion or storage.default_luks_version passphrase = auto_part_proxy.Passphrase or storage.encryption_passphrase escrow_cert = storage.get_escrow_certificate(auto_part_proxy.Escrowcert) pbkdf_args = get_pbkdf_args( luks_version=luks_version, pbkdf_type=auto_part_proxy.PBKDF or None, max_memory_kb=auto_part_proxy.PBKDFMemory, iterations=auto_part_proxy.PBKDFIterations, time_ms=auto_part_proxy.PBKDFTime ) luks_format_args = { "passphrase": passphrase, "cipher": auto_part_proxy.Cipher, "luks_version": luks_version, "pbkdf_args": pbkdf_args, "escrow_cert": escrow_cert, "add_backup_passphrase": auto_part_proxy.BackupPassphraseEnabled, "min_luks_entropy": MIN_CREATE_ENTROPY, } task = AutomaticPartitioningTask( storage, auto_part_proxy.Type, auto_part_proxy.Encrypted, luks_format_args ) elif STORAGE.get_proxy(MANUAL_PARTITIONING).Enabled: task = ManualPartitioningTask(storage) else: task = CustomPartitioningTask(storage, data) task.run()
def configure_storage(storage, data=None, interactive=False): """Setup storage state from the kickstart data. :param storage: an instance of the Blivet's storage object :param data: an instance of kickstart data or None :param interactive: use a task for the interactive partitioning """ auto_part_proxy = STORAGE.get_proxy(AUTO_PARTITIONING) if interactive: task = InteractivePartitioningTask(storage) elif auto_part_proxy.Enabled: request = PartitioningRequest.from_structure(auto_part_proxy.Request) task = AutomaticPartitioningTask(storage, request) elif STORAGE.get_proxy(MANUAL_PARTITIONING).Enabled: task = ManualPartitioningTask(storage) else: task = CustomPartitioningTask(storage, data) task.run()
def configure_with_task(self): """Complete the scheduled partitioning.""" task = InteractivePartitioningTask(self.storage) path = self.publish_task(BLIVET_PARTITIONING.namespace, task) return path
def configure_with_task(self): """Complete the scheduled partitioning.""" return InteractivePartitioningTask(self.storage)