コード例 #1
0
ファイル: storage.py プロジェクト: m4d3bug/anaconda
    def apply_partitioning(self, module):
        """Apply a partitioning.

        :param module: a partitioning module
        :raise: InvalidStorageError of the partitioning is not valid
        """
        # Validate the partitioning.
        storage = module.storage
        task = StorageValidateTask(storage)
        task.run()

        # Apply the partitioning.
        self.set_storage(storage.copy())
        log.debug("Applied the partitioning %s.", module)
コード例 #2
0
    def apply_partitioning(self, object_path):
        """Apply a partitioning.

        :param object_path: an object path of a partitioning module
        :raise: InvalidStorageError of the partitioning is not valid
        """
        # Get the partitioning module.
        module = self._partitioning_modules.get(object_path)

        if not module:
            raise ValueError("Unknown partitioning {}.".format(object_path))

        # Validate the partitioning.
        storage = module.storage
        task = StorageValidateTask(storage)
        task.run()

        # Apply the partitioning.
        self.set_storage(storage.copy())
        log.debug("Applied the partitioning from %s.", object_path)
コード例 #3
0
ファイル: storage.py プロジェクト: rvykydal/anaconda
    def apply_partitioning(self, object_path):
        """Apply a partitioning.

        :param object_path: an object path of a partitioning module
        :raise: InvalidStorageError of the partitioning is not valid
        """
        # Get the partitioning module.
        module = self._partitioning_modules.get(object_path)

        if not module:
            raise ValueError("Unknown partitioning {}.".format(object_path))

        # Validate the partitioning.
        storage = module.storage
        task = StorageValidateTask(storage)
        task.run()

        # Apply the partitioning.
        self.set_storage(storage.copy())
        log.debug("Applied the partitioning from %s.", object_path)
コード例 #4
0
    def apply_partitioning(self, module):
        """Apply a partitioning.

        :param module: a partitioning module
        :raise: InvalidStorageError of the partitioning is not valid
        """
        # Validate the partitioning.
        storage = module.storage.copy()
        task = StorageValidateTask(storage)
        report = task.run()

        if not report.is_valid():
            raise InvalidStorageError(" ".join(report.error_messages))

        # Apply the partitioning.
        self._set_storage_playground(storage)
        self._set_applied_partitioning(module)