pyanaconda.modules.common.task.task_interface ============================================= .. py:module:: pyanaconda.modules.common.task.task_interface Classes ------- .. autoapisummary:: pyanaconda.modules.common.task.task_interface.TaskInterface pyanaconda.modules.common.task.task_interface.ValidationTaskInterface Module Contents --------------- .. py:class:: TaskInterface Bases: :py:obj:`pyanaconda.modules.common.base.base_template.InterfaceTemplate` Base class for implementing Task. This class has only interface of the Task. Logic will be implemented by each module. .. py:method:: connect_signals() Connect signals to the implementation. .. py:property:: Name :type: Str Get the name of this task. .. py:property:: Progress :type: Tuple[Int, Str] Get immediate progress of this task. :returns: Tuple with actual step count and description of this step. .. py:method:: ProgressChanged(step, message) Signal making progress for this task. :param step: Number of the actual step. Please look on the self.Steps to calculate progress percentage. :param message: Short description of what is this task currently trying to do. .. py:property:: Steps :type: Int Get total number of steps for this task. .. py:property:: IsRunning :type: Bool Return True if this Task is running already. .. py:method:: Started() Signal when this task starts. .. py:method:: Stopped() Signal when this task stops. .. py:method:: Failed() Signal when this task fails. .. py:method:: Succeeded() Signal when this task succeeds. .. py:method:: Start() Run the task work. .. py:method:: Cancel() Cancel the task. .. py:method:: Finish() Finish the task after it stopped. This method will raise an error if the task has failed. .. py:method:: convert_result(value) :staticmethod: Convert the value of the result. Convert the value into a variant. :param value: a value of the result :return: a variant with the value :raises: NoResultError by default .. py:method:: GetResult() Get the result of the task if any. :return: a variant with the result :raises: NoResultError by default .. py:class:: ValidationTaskInterface Bases: :py:obj:`TaskInterface` DBus interface for a validation task. .. py:method:: convert_result(value) :staticmethod: Convert the validation report. Convert the validation report into a variant. :param value: a validation report :return: a variant with the structure