The karbor.services.protection.flows.workflow Module

The karbor.services.protection.flows.workflow Module

class karbor.services.protection.flows.workflow.TaskFlowEngine

Bases: karbor.services.protection.flows.workflow.WorkFlowEngine

add_tasks(flow, *nodes, **kwargs)
build_flow(flow_name, flow_type='graph')
create_task(function, requires=None, provides=None, inject=None, **kwargs)
get_engine(flow, **kwargs)
karbor_atom_watch(state, details)
karbor_flow_watch(state, details)
output(flow_engine, target=None)
run_engine(flow_engine)
search_task(flow, task_id)
class karbor.services.protection.flows.workflow.WorkFlowEngine

Bases: object

add_tasks(flow, *nodes, **kwargs)
build_flow(flow_name, flow_type='graph')

build flow

Parameters:flow_name – the flow name

:param flow_type:’linear’ or ‘graph’,default:’graph’ :return:linear flow or graph flow

create_task(function, requires=None, provides=None, inject=None, **kwargs)

create a task

:param function:make a task from this callable :param requires: A OrderedSet of inputs this task requires to function. :param provides:A set, string or list of items that this will be

providing (or could provide) to others
:param inject:An immutable input_name => value dictionary which
specifies any initial inputs that should be automatically injected into the task scope before the task execution commences
get_engine(flow, **kwargs)

Link existing node as a runtime dependency of existing node v

Parameters:
  • u – task or flow to create a link from (must exist already)
  • v – task or flow to create a link to (must exist already)
  • flow – graph flow
output(flow_engine, target=None)
run_engine(flow_engine)
search_task(flow, task_id)
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.