.. title:: Workload lisa.wlgen.workload.Workload ============================ .. autoclass:: lisa.wlgen.workload::Workload :no-members: :no-inherited-members: :no-undoc-members: :no-private-members: :no-special-members: .. rubric:: Attributes .. list-table:: :align: left * - :attr:`~lisa.wlgen.workload.Workload.REQUIRED_TOOLS` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload The tools required to execute the workload. See :meth:`lisa.target.Target.install_tools`. .. rubric:: Properties .. list-table:: :align: left * - :attr:`~lisa.utils.Loggable.logger` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Convenience short-hand for ``self.get_logger()``. .. rubric:: Methods .. list-table:: :align: left * - :meth:`~lisa.wlgen.workload.Workload.__del__` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload * - :meth:`~lisa.wlgen.workload.Workload.__enter__` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload * - :meth:`~lisa.wlgen.workload.Workload.__exit__` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Cleanup the artifacts of the workload on the target. * - :meth:`~lisa.wlgen.workload.Workload.__init_subclass__` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload._WorkloadBase Automatically decorate ``_run()`` so that it returns a context manager. * - :meth:`~lisa.wlgen.workload.Workload.cleanup` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Remove all the artifacts installed on the target with :meth:`deploy`. * - :meth:`~lisa.wlgen.workload.Workload.deploy` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Deploy the workload on the target. * - :meth:`~lisa.wlgen.workload.Workload.run` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Run the workload and returns the post-processed output. * - :meth:`~lisa.wlgen.workload.Workload.run_background` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Run the command asynchronously and give control back to the caller. * - :meth:`~lisa.wlgen.workload.Workload.wipe_run_dir` - .. withrefctx:: :module: lisa.wlgen.workload :class: lisa.wlgen.workload.Workload Wipe all content from the ``run_dir`` target directory and all its empty parents. * - :meth:`~lisa.utils.PartialInit.factory` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.PartialInit Decorator to use on alternative constructors, i.e. classmethods that return instances of the class. * - :meth:`~lisa.utils.Loggable.get_logger` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Provides a :class:`logging.Logger` named after ``cls``. * - :meth:`~lisa.utils.Loggable.log_locals` :sup:`inherited` - .. withrefctx:: :module: lisa.utils :class: lisa.utils.Loggable Debugging aid: log the local variables of the calling function. Attributes ---------- .. autoattribute:: lisa.wlgen.workload::Workload.REQUIRED_TOOLS Properties ---------- .. autoproperty:: lisa.wlgen.workload::Workload.logger .. autoproperty:: lisa.wlgen.workload::Workload.output Methods ------- .. automethod:: lisa.wlgen.workload::Workload.__del__ .. automethod:: lisa.wlgen.workload::Workload.__enter__ .. automethod:: lisa.wlgen.workload::Workload.__exit__ .. automethod:: lisa.wlgen.workload::Workload.__init_subclass__ .. automethod:: lisa.wlgen.workload::Workload.cleanup .. automethod:: lisa.wlgen.workload::Workload.deploy .. automethod:: lisa.wlgen.workload::Workload.run .. automethod:: lisa.wlgen.workload::Workload.run_background .. automethod:: lisa.wlgen.workload::Workload.wipe_run_dir .. automethod:: lisa.wlgen.workload::Workload.factory .. automethod:: lisa.wlgen.workload::Workload.get_logger .. automethod:: lisa.wlgen.workload::Workload.log_locals