mistral package¶
Subpackages¶
- mistral.actions package
- mistral.api package
- Subpackages
- mistral.api.controllers package
- Subpackages
- mistral.api.controllers.v2 package
- Submodules
- mistral.api.controllers.v2.action module
- mistral.api.controllers.v2.action_execution module
- mistral.api.controllers.v2.cron_trigger module
- mistral.api.controllers.v2.environment module
- mistral.api.controllers.v2.event_trigger module
- mistral.api.controllers.v2.execution module
- mistral.api.controllers.v2.member module
- mistral.api.controllers.v2.resources module
- mistral.api.controllers.v2.root module
- mistral.api.controllers.v2.service module
- mistral.api.controllers.v2.task module
- mistral.api.controllers.v2.types module
- mistral.api.controllers.v2.validation module
- mistral.api.controllers.v2.workbook module
- mistral.api.controllers.v2.workflow module
- Module contents
- mistral.api.controllers.v2 package
- Submodules
- mistral.api.controllers.resource module
- mistral.api.controllers.root module
- Module contents
- Subpackages
- mistral.api.hooks package
- mistral.api.controllers package
- Submodules
- mistral.api.access_control module
- mistral.api.app module
- mistral.api.service module
- mistral.api.wsgi module
- Module contents
- Subpackages
- mistral.cmd package
- mistral.db package
- Subpackages
- mistral.db.sqlalchemy package
- Subpackages
- mistral.db.sqlalchemy.migration package
- Subpackages
- mistral.db.sqlalchemy.migration.alembic_migrations package
- Subpackages
- mistral.db.sqlalchemy.migration.alembic_migrations.versions package
- Submodules
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.001_kilo module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.002_kilo module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.003_cron_trigger_constraints module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.004_add_description_for_execution module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.005_increase_execution_columns_size module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.006_add_processed_to_delayed_calls_v2 module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.007_move_system_flag_to_base_definition module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.008_increase_size_of_state_info_column module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.009_add_database_indices module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.010_add_resource_members_v2_table module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.011_add_workflow_id_for_execution module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.012_add_event_triggers_v2_table module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.013_split_execution_table_increase_names module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.014_fix_past_scripts_discrepancies module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.015_add_unique_keys_for_non_locking_model module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.016_increase_size_of_task_unique_key module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.017_add_named_lock_table module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.018_increate_task_execution_unique_key_size module
- mistral.db.sqlalchemy.migration.alembic_migrations.versions.019_change_scheduler_schema module
- Module contents
- mistral.db.sqlalchemy.migration.alembic_migrations.versions package
- Submodules
- mistral.db.sqlalchemy.migration.alembic_migrations.env module
- Module contents
- Subpackages
- mistral.db.sqlalchemy.migration.alembic_migrations package
- Submodules
- mistral.db.sqlalchemy.migration.cli module
- Module contents
- Subpackages
- mistral.db.sqlalchemy.migration package
- Submodules
- mistral.db.sqlalchemy.base module
- mistral.db.sqlalchemy.model_base module
- mistral.db.sqlalchemy.sqlite_lock module
- mistral.db.sqlalchemy.types module
- Module contents
- Subpackages
- mistral.db.v2 package
- mistral.db.sqlalchemy package
- Module contents
- Subpackages
- mistral.engine package
- Subpackages
- mistral.engine.rpc_backend package
- Subpackages
- Submodules
- mistral.engine.rpc_backend.base module
- mistral.engine.rpc_backend.rpc module
- Module contents
- mistral.engine.rpc_backend package
- Submodules
- mistral.engine.action_handler module
- mistral.engine.actions module
- mistral.engine.base module
- mistral.engine.default_engine module
- mistral.engine.default_executor module
- mistral.engine.dispatcher module
- mistral.engine.policies module
- mistral.engine.task_handler module
- mistral.engine.tasks module
- mistral.engine.utils module
- mistral.engine.workflow_handler module
- mistral.engine.workflows module
- Module contents
- Subpackages
- mistral.hacking package
- mistral.services package
- Submodules
- mistral.services.action_manager module
- mistral.services.actions module
- mistral.services.event_engine module
- mistral.services.expiration_policy module
- mistral.services.periodic module
- mistral.services.scheduler module
- mistral.services.security module
- mistral.services.triggers module
- mistral.services.workbooks module
- mistral.services.workflows module
- Module contents
- mistral.tests package
- Subpackages
- mistral.tests.unit package
- Subpackages
- mistral.tests.unit.actions package
- Subpackages
- Submodules
- mistral.tests.unit.actions.test_action_manager module
- mistral.tests.unit.actions.test_javascript_action module
- mistral.tests.unit.actions.test_std_echo_action module
- mistral.tests.unit.actions.test_std_email_action module
- mistral.tests.unit.actions.test_std_fail_action module
- mistral.tests.unit.actions.test_std_http_action module
- Module contents
- mistral.tests.unit.api package
- Subpackages
- mistral.tests.unit.api.v2 package
- Submodules
- mistral.tests.unit.api.v2.test_action_executions module
- mistral.tests.unit.api.v2.test_actions module
- mistral.tests.unit.api.v2.test_cron_triggers module
- mistral.tests.unit.api.v2.test_environment module
- mistral.tests.unit.api.v2.test_event_trigger module
- mistral.tests.unit.api.v2.test_executions module
- mistral.tests.unit.api.v2.test_keycloak_auth module
- mistral.tests.unit.api.v2.test_members module
- mistral.tests.unit.api.v2.test_root module
- mistral.tests.unit.api.v2.test_services module
- mistral.tests.unit.api.v2.test_tasks module
- mistral.tests.unit.api.v2.test_workbooks module
- mistral.tests.unit.api.v2.test_workflows module
- Module contents
- mistral.tests.unit.api.v2 package
- Submodules
- mistral.tests.unit.api.base module
- mistral.tests.unit.api.test_access_control module
- mistral.tests.unit.api.test_auth module
- mistral.tests.unit.api.test_cors_middleware module
- mistral.tests.unit.api.test_service module
- Module contents
- Subpackages
- mistral.tests.unit.db package
- mistral.tests.unit.engine package
- Subpackages
- Submodules
- mistral.tests.unit.engine.base module
- mistral.tests.unit.engine.test_action_context module
- mistral.tests.unit.engine.test_action_defaults module
- mistral.tests.unit.engine.test_adhoc_actions module
- mistral.tests.unit.engine.test_commands module
- mistral.tests.unit.engine.test_cron_trigger module
- mistral.tests.unit.engine.test_dataflow module
- mistral.tests.unit.engine.test_default_engine module
- mistral.tests.unit.engine.test_direct_workflow module
- mistral.tests.unit.engine.test_direct_workflow_rerun module
- mistral.tests.unit.engine.test_direct_workflow_with_cycles module
- mistral.tests.unit.engine.test_environment module
- mistral.tests.unit.engine.test_error_handling module
- mistral.tests.unit.engine.test_error_result module
- mistral.tests.unit.engine.test_execution_fields_size_limitation module
- mistral.tests.unit.engine.test_javascript_action module
- mistral.tests.unit.engine.test_join module
- mistral.tests.unit.engine.test_noop_task module
- mistral.tests.unit.engine.test_policies module
- mistral.tests.unit.engine.test_profiler module
- mistral.tests.unit.engine.test_race_condition module
- mistral.tests.unit.engine.test_reverse_workflow module
- mistral.tests.unit.engine.test_reverse_workflow_rerun module
- mistral.tests.unit.engine.test_run_action module
- mistral.tests.unit.engine.test_safe_rerun module
- mistral.tests.unit.engine.test_state_info module
- mistral.tests.unit.engine.test_subworkflows module
- mistral.tests.unit.engine.test_task_defaults module
- mistral.tests.unit.engine.test_task_publish module
- mistral.tests.unit.engine.test_with_items module
- mistral.tests.unit.engine.test_workflow_cancel module
- mistral.tests.unit.engine.test_workflow_resume module
- mistral.tests.unit.engine.test_workflow_stop module
- mistral.tests.unit.engine.test_workflow_variables module
- mistral.tests.unit.engine.test_yaql_functions module
- Module contents
- mistral.tests.unit.hacking package
- mistral.tests.unit.mstrlfixtures package
- mistral.tests.unit.services package
- Submodules
- mistral.tests.unit.services.test_action_manager module
- mistral.tests.unit.services.test_action_service module
- mistral.tests.unit.services.test_event_engine module
- mistral.tests.unit.services.test_expired_executions_policy module
- mistral.tests.unit.services.test_scheduler module
- mistral.tests.unit.services.test_trigger_service module
- mistral.tests.unit.services.test_workbook_service module
- mistral.tests.unit.services.test_workflow_service module
- Module contents
- mistral.tests.unit.utils package
- mistral.tests.unit.workbook package
- mistral.tests.unit.workflow package
- mistral.tests.unit.actions package
- Submodules
- mistral.tests.unit.base module
- mistral.tests.unit.config module
- mistral.tests.unit.fake_policy module
- mistral.tests.unit.test_command_dispatcher module
- mistral.tests.unit.test_coordination module
- mistral.tests.unit.test_exception_base module
- mistral.tests.unit.test_expressions module
- Module contents
- Subpackages
- mistral.tests.unit package
- Module contents
- Subpackages
- mistral.utils package
- Subpackages
- Submodules
- mistral.utils.filter_utils module
- mistral.utils.inspect_utils module
- mistral.utils.javascript module
- mistral.utils.profiler module
- mistral.utils.rest_utils module
- mistral.utils.rpc_utils module
- mistral.utils.serializers module
- mistral.utils.ssh_utils module
- mistral.utils.wf_trace module
- mistral.utils.yaql_utils module
- Module contents
- mistral.workbook package
- Subpackages
- mistral.workbook.v2 package
- Submodules
- mistral.workbook.v2.actions module
- mistral.workbook.v2.base module
- mistral.workbook.v2.policies module
- mistral.workbook.v2.retry_policy module
- mistral.workbook.v2.task_defaults module
- mistral.workbook.v2.tasks module
- mistral.workbook.v2.workbook module
- mistral.workbook.v2.workflows module
- Module contents
- mistral.workbook.v2 package
- Submodules
- mistral.workbook.base module
- mistral.workbook.parser module
- mistral.workbook.types module
- Module contents
- Subpackages
- mistral.workflow package
- Submodules
- mistral.workflow.base module
- mistral.workflow.commands module
- mistral.workflow.data_flow module
- mistral.workflow.direct_workflow module
- mistral.workflow.lookup_utils module
- mistral.workflow.reverse_workflow module
- mistral.workflow.states module
- mistral.workflow.utils module
- mistral.workflow.with_items module
- Module contents
Submodules¶
mistral.config module¶
Configuration options registration and useful routines.
mistral.context module¶
-
class
mistral.context.
BaseContext
(_BaseContext__mapping=None, **kwargs)¶ Bases:
object
Container for context variables.
-
to_dict
()¶
-
-
class
mistral.context.
JsonPayloadSerializer
¶ Bases:
oslo_messaging.serializer.NoOpSerializer
-
static
serialize_entity
(context, entity)¶
-
static
-
class
mistral.context.
MistralContext
(_BaseContext__mapping=None, **kwargs)¶ Bases:
mistral.context.BaseContext
mistral.coordination module¶
-
class
mistral.coordination.
Service
(group_type)¶ Bases:
object
-
register_membership
(*args, **kwargs)¶ Registers group membership.
Because this method will be invoked on each service startup almost at the same time, so it must be synchronized, in case all the services are started within same process.
-
stop
()¶
-
-
class
mistral.coordination.
ServiceCoordinator
(my_id=None)¶ Bases:
object
Service coordinator.
This class uses the tooz library to manage group membership.
To ensure that the other agents know this agent is still alive, the heartbeat method should be called periodically.
-
get_members
(group_id)¶ Gets members of coordination group.
ToozError exception must be handled when this function is invoded, we leave it to the invoker for the handling decision.
-
heartbeat
()¶
-
is_active
()¶
-
join_group
(*args, **kw)¶
-
leave_group
(group_id)¶
-
start
()¶
-
stop
()¶
-
mistral.exceptions module¶
-
exception
mistral.exceptions.
ActionException
(message=None)¶
-
exception
mistral.exceptions.
ActionRegistrationException
(message=None)¶
-
exception
mistral.exceptions.
ApplicationContextNotFoundException
(message=None)¶
-
exception
mistral.exceptions.
CoordinationException
(message=None)¶
-
exception
mistral.exceptions.
DBDuplicateEntryError
(message=None)¶ Bases:
mistral.exceptions.DBError
-
exception
mistral.exceptions.
DBEntityNotFoundError
(message=None)¶ Bases:
mistral.exceptions.DBError
-
exception
mistral.exceptions.
DBError
(message=None)¶
-
exception
mistral.exceptions.
DBQueryEntryError
(message=None)¶ Bases:
mistral.exceptions.DBError
-
exception
mistral.exceptions.
DSLParsingException
(message=None)¶
-
exception
mistral.exceptions.
DataAccessException
(message=None)¶
-
exception
mistral.exceptions.
EngineException
(message=None)¶
-
exception
mistral.exceptions.
EventTriggerException
(message=None)¶
-
exception
mistral.exceptions.
InputException
(message=None)¶
-
exception
mistral.exceptions.
InvalidActionException
(message=None)¶
-
exception
mistral.exceptions.
InvalidModelException
(message=None)¶
-
exception
mistral.exceptions.
InvalidResultException
(message=None)¶
-
exception
mistral.exceptions.
KombuException
(e)¶ Bases:
exceptions.Exception
-
exception
mistral.exceptions.
MistralError
(message=None)¶ Bases:
exceptions.Exception
Mistral specific error.
Reserved for situations that can’t be automatically handled. When it occurs it signals that there is a major environmental problem like invalid startup configuration or implementation problem (e.g. some code doesn’t take care of certain corner cases). From architectural perspective it’s pointless to try to handle this type of problems except doing some finalization work like transaction rollback, deleting temporary files etc.
-
exception
mistral.exceptions.
MistralException
(message=None)¶ Bases:
exceptions.Exception
Mistral specific exception.
Reserved for situations that are not critical for program continuation. It is possible to recover from this type of problems automatically and continue program execution. Such problems may be related with invalid user input (such as invalid syntax) or temporary environmental problems.
In case if an instance of a certain exception type bubbles up to API layer then this type of exception it must be associated with an http code so it’s clear how to represent it for a client.
To correctly use this class, inherit from it and define a ‘message’ and ‘http_code’ properties.
-
exception
mistral.exceptions.
NotAllowedException
(message=None)¶
-
exception
mistral.exceptions.
SizeLimitExceededException
(field_name, size_kb, size_limit_kb)¶
-
exception
mistral.exceptions.
WorkflowException
(message=None)¶
-
exception
mistral.exceptions.
YaqlEvaluationException
(message=None)¶
-
exception
mistral.exceptions.
YaqlGrammarException
(message=None)¶
mistral.expressions module¶
-
class
mistral.expressions.
Evaluator
¶ Bases:
object
Expression evaluator interface.
Having this interface gives the flexibility to change the actual expression language used in Mistral DSL for conditions, output calculation etc.
-
classmethod
evaluate
(expression, context)¶ Evaluates the expression against the given data context.
Parameters: - expression – Expression string
- context – Data context
Returns: Expression result
-
classmethod
is_expression
(expression)¶ Check expression string and decide whether it is expression or not.
Parameters: expression – Expression string Returns: True if string is expression
-
classmethod
validate
(expression)¶ Parse and validates the expression.
Parameters: expression – Expression string Returns: True if expression is valid
-
classmethod
-
class
mistral.expressions.
InlineYAQLEvaluator
¶ Bases:
mistral.expressions.YAQLEvaluator
-
classmethod
evaluate
(expression, data_context)¶
-
classmethod
find_inline_expressions
(s)¶
-
classmethod
is_expression
(s)¶
-
classmethod
validate
(expression)¶
-
classmethod
-
class
mistral.expressions.
YAQLEvaluator
¶ Bases:
mistral.expressions.Evaluator
-
classmethod
evaluate
(expression, data_context)¶
-
classmethod
is_expression
(s)¶
-
classmethod
validate
(expression)¶
-
classmethod
mistral.messaging module¶
This module contains common structures and functions that help to handle AMQP messages based on olso.messaging framework.
-
class
mistral.messaging.
NotificationEndpoint
(event_engine)¶ Bases:
object
Message listener endpoint.
Only handle notifications that match the NotificationFilter rule set into the filter_rule attribute of the endpoint.