aria.orchestrator.context¶
Contexts for workflows and operations.
aria.orchestrator.context.common¶
Common code for contexts.
-
class
aria.orchestrator.context.common.BaseContext(name, service_id, model_storage, resource_storage, execution_id, workdir=None, **kwargs)¶ Bases:
objectBase class for contexts.
-
download_resource(destination, path=None)¶ Download a service template resource from the storage resource API (“RAPI”).
-
download_resource_and_render(destination, path=None, variables=None)¶ Downloads a service template resource from the resource storage and renders its content as a Jinja template using the provided variables.
ctxis available to the template without providing it explicitly.
-
get_resource(path=None)¶ Reads a service instance resource as string from the resource storage.
-
get_resource_and_render(path=None, variables=None)¶ Reads a service instance resource as string from the resource storage and renders it as a Jinja template using the provided variables.
ctxis available to the template without providing it explicitly.
-
id¶ Operation ID.
-
logging_handlers(*args, **kwds)¶
-
model¶ Storage model API (“MAPI”).
-
name¶ Operation name.
-
resource¶ Storage resource API (“RAPI”).
-
service¶ Service instance model.
-
service_template¶ Service template model.
-
aria.orchestrator.context.exceptions¶
Context exceptions.
-
exception
aria.orchestrator.context.exceptions.ContextException¶ Bases:
aria.orchestrator.exceptions.OrchestratorErrorContext based exception
aria.orchestrator.context.operation¶
Operation contexts.
-
class
aria.orchestrator.context.operation.BaseOperationContext(task_id, actor_id, **kwargs)¶ Bases:
aria.orchestrator.context.common.BaseContextBase class for contexts used during operation creation and execution.
-
close()¶
-
classmethod
instantiate_from_dict(model_storage=None, resource_storage=None, **kwargs)¶
-
persist_changes¶
-
plugin_workdir¶ A work directory that is unique to the plugin and the deployment id
-
serialization_dict¶
-
task¶ The task in the model storage :return: Task model
-
-
class
aria.orchestrator.context.operation.NodeOperationContext(task_id, actor_id, **kwargs)¶ Bases:
aria.orchestrator.context.operation.BaseOperationContextContext for node operations.
-
node¶ The node instance of the current operation :return:
-
node_template¶ the node of the current operation :return:
-
-
class
aria.orchestrator.context.operation.RelationshipOperationContext(task_id, actor_id, **kwargs)¶ Bases:
aria.orchestrator.context.operation.BaseOperationContextContext for relationship operations.
-
relationship¶ The relationship instance of the current operation :return:
-
source_node¶ The source node instance :return:
-
source_node_template¶ The source node :return:
-
target_node¶ The target node instance :return:
-
target_node_template¶ The target node :return:
-
aria.orchestrator.context.toolbelt¶
Tools for operations.
-
class
aria.orchestrator.context.toolbelt.NodeToolBelt(operation_context)¶ Bases:
objectNode operation tool belt.
-
host_ip¶ The host ip of the current node :return:
-
-
class
aria.orchestrator.context.toolbelt.RelationshipToolBelt(operation_context)¶ Bases:
objectRelationship operation tool belt.
-
aria.orchestrator.context.toolbelt.toolbelt(operation_context)¶ Get a toolbelt from to the current operation executor.
Parameters: operation_context –
aria.orchestrator.context.workflow¶
Workflow context.
-
class
aria.orchestrator.context.workflow.WorkflowContext(workflow_name, parameters=None, task_max_attempts=1, task_retry_interval=0, task_ignore_failure=False, *args, **kwargs)¶ Bases:
aria.orchestrator.context.common.BaseContextContext used during workflow creation and execution.
-
execution¶ Execution model.
-
node_templates¶ Iterates over nodes templates.
-
nodes¶ Iterates over nodes.
-
persist_changes¶
-
workflow_name¶
-