コード例 #1
0
    def storage(self):
        """The storage model.

        :return: an instance of Blivet
        """
        if self._current_storage is None:
            raise UnavailableStorageError()

        return self._current_storage
コード例 #2
0
ファイル: dasd.py プロジェクト: martinpitt/anaconda-1
    def storage(self):
        """The storage model.

        :return: an instance of Blivet
        :raise: UnavailableStorageError if not available
        """
        if self._storage is None:
            raise UnavailableStorageError()

        return self._storage
コード例 #3
0
ファイル: base.py プロジェクト: qiyuann/anaconda
    def storage(self):
        """The storage model.

        Provides a copy of the current storage model,
        that can be safely used for partitioning.

        :return: an instance of Blivet
        """
        if self._current_storage is None:
            raise UnavailableStorageError()

        if self._storage_playground is None:
            self._storage_playground = self._current_storage.copy()

        return self._storage_playground