watcher.applier.workflow_engine.base
Module¶watcher.applier.workflow_engine.base.
BaseTaskFlowActionContainer
(name, db_action, engine, **kwargs)[source]¶Bases: taskflow.task.Task
execute
(*args, **kwargs)[source]¶Activate a given atom which will perform some operation and return.
This method can be used to perform an action on a given set of input
requirements (passed in via *args
and **kwargs
) to accomplish
some type of operation. This operation may provide some named
outputs/results as a result of it executing for later reverting (or for
other atoms to depend on).
NOTE(harlowja): the result (if any) that is returned should be persistable so that it can be passed back into this atom if reverting is triggered (especially in the case where reverting happens in a different python process or on a remote machine) and so that the result can be transmitted to other atoms (which may be local or remote).
Parameters: |
|
---|
post_execute
()[source]¶Code to be run after executing the atom.
A common pattern for cleaning up global state of the system after the
execution of atoms is to define some code in a base class that all your
atoms inherit from. In that class, you can define a post_execute
method and it will always be invoked just after your atoms execute,
regardless of whether they succeeded or not.
This pattern is useful if you have global shared database sessions that need to be cleaned up, for example.
pre_execute
()[source]¶Code to be run prior to executing the atom.
A common pattern for initializing the state of the system prior to
running atoms is to define some code in a base class that all your
atoms inherit from. In that class, you can define a pre_execute
method and it will always be invoked just prior to your atoms running.
revert
(*args, **kwargs)[source]¶Revert this atom.
This method should undo any side-effects caused by previous execution
of the atom using the result of the execute()
method and
information on the failure which triggered reversion of the flow the
atom is contained in (if applicable).
Parameters: |
|
---|
watcher.applier.workflow_engine.base.
BaseWorkFlowEngine
(config, context=None, applier_manager=None)[source]¶Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.