Exemplo n.º 1
0
    def process_kickstart(self, data):
        """Process the kickstart data."""

        self.set_enabled(data.autopart.autopart)

        if data.autopart.type is not None:
            self.set_type(AutoPartitioningType(data.autopart.type))

        if data.autopart.fstype:
            self.set_fstype(data.autopart.fstype)

        self.set_nohome(data.autopart.nohome)
        self.set_noboot(data.autopart.noboot)
        self.set_noswap(data.autopart.noswap)

        if data.autopart.encrypted:
            self.set_encrypted(data.autopart.encrypted)
            self.set_passphrase(data.autopart.passphrase)
            self.set_luks_version(data.autopart.luks_version)
            self.set_pbkdf(data.autopart.pbkdf)
            self.set_pbkdf_memory(data.autopart.pbkdf_memory)
            self.set_pbkdf_time(data.autopart.pbkdf_time)
            self.set_pbkdf_iterations(data.autopart.pbkdf_iterations)
            self.set_escrowcert(data.autopart.escrowcert)
            self.set_backup_passphrase_enabled(data.autopart.backuppassphrase)
            self.set_cipher(data.autopart.cipher)
Exemplo n.º 2
0
    def SetType(self, scheme: Int):
        """Set the partitioning scheme.

        Allowed values:
            0  Create regular partitions.
            1  Use the btrfs scheme.
            2  Use the lvm scheme.
            3  Use the lvm thinp scheme.

        :param scheme: an id of the partitioning scheme
        """
        self.implementation.set_type(AutoPartitioningType(scheme))
Exemplo n.º 3
0
    def type(self):
        """Type of a filesystem used on the partitions."""
        if self.is_type_default:
            return AutoPartitioningType(DEFAULT_AUTOPART_TYPE)

        return self._type