コード例 #1
0
    def mount_existing_system_test(self, mount):
        storage = create_storage()
        device = StorageDevice("dev1", fmt=get_format("ext4"))
        storage.devicetree._add_device(device)

        task = MountExistingSystemTask(storage, device, True)
        task.run()

        mount.assert_called_once_with(storage=storage,
                                      root_device=device,
                                      read_only=True)
コード例 #2
0
ファイル: handler.py プロジェクト: skycastlelily2/anaconda
    def mount_existing_system_with_task(self, device_name, read_only):
        """Mount existing GNU/Linux installation.

        :param device_name: a name of the root device
        :param read_only: mount the system in read-only mode
        :return: a task
        """
        return MountExistingSystemTask(storage=self.storage,
                                       device=self._get_device(device_name),
                                       read_only=read_only)
コード例 #3
0
ファイル: handler.py プロジェクト: tuan-hoang1/anaconda
    def mount_existing_system_with_task(self, device_name, read_only):
        """Mount existing GNU/Linux installation.

        :param device_name: a name of the root device
        :param read_only: mount the system in read-only mode
        :return: a path to the task
        """
        task = MountExistingSystemTask(
            storage=self.storage,
            device=self._get_device(device_name),
            read_only=read_only
        )

        path = self.publish_task(DEVICE_TREE_HANDLER.namespace, task)
        return path