Module ImportFrom alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Import alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases AttributeLoad NameLoad attr body Expr Str Assign NameStore NameLoad Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults NameLoad vararg kwarg body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults kwarg body If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr attr For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq Call NameLoad NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str NameLoad Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore NameLoad For NameStore Call AttributeLoad NameLoad attr Str TupleLoad body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Continue Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad If CompareLtE Call NameLoad Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp SubscriptLoad NameLoad Index Str comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareEq Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore Call AttributeLoad NameLoad attr NameLoad body If CompareNotIn NameLoad NameLoad body Continue orelse If Call AttributeLoad NameLoad attr NameLoad body Continue Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Index Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad orelse If Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad Lambda arguments args NameParam defaults SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn SubscriptLoad NameLoad Index Str AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str NameLoad Return Assign SubscriptStore NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body If CompareNotIn SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign SubscriptStore NameLoad Index Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If UnaryOpNot NameLoad body Return Assign NameStore Call NameLoad NameLoad For NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str If BoolOpAnd CompareIsNot NameLoad NameLoad Call AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad TupleLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad For NameStore NameLoad body If BoolOpAnd Call AttributeLoad NameLoad attr NameLoad CompareNotIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index Str attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body If CompareIn NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore NameLoad While NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body If BoolOpOr CompareNotIn Str NameLoad CompareNotIn Str NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad If CompareNotIn SubscriptLoad NameLoad Index Str NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str If CompareIn Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str orelse Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpSub Call NameLoad NameLoad Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad While NameLoad body Assign NameStore ListLoad Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index NameLoad If CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq SubscriptLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Index Str AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Continue Assign NameStore Call Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Continue Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str orelse Expr Call AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareIn Str AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str orelse Raise Call AttributeLoad NameLoad attr Str Return Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad Index Str body Assign NameStore Call Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad AttributeLoad NameLoad attr NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr body Continue Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str AugAssignAdd NameStore Call AttributeLoad Str attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AugAssignAdd NameStore Str Raise Call AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body If UnaryOpNot Call AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Raise Call AttributeLoad NameLoad attr Call AttributeLoad Str attr keyword Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore Call NameLoad NameLoad keyword Call AttributeLoad Str attr GeneratorExp Call NameLoad NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad decorator_list decorator_list
N/A collections defaultdict N/A N/A collections OrderedDict N/A N/A N/A ImportError N/A ordereddict OrderedDict N/A networkx nx N/A six nailgun consts nailgun errors nailgun.logger logger nailgun objects nailgun.orchestrator priority_serializers ps nailgun.orchestrator.tasks_serializer TaskSerializers nailgun.policy.name_match NameMatchingPolicy nailgun.utils.role_resolver RoleResolver GraphSolver N/A N/A nx DiGraph N/A N/A DirectedGraph used to generate configs for speficific orchestrators

    In case of astute - we are working with priorities
    In - mistral - we will serialize workbook from this graph

    General task format

    id: string
    type: string - one of - role, stage, puppet, shell, upload_file, sync
    required_for: direct dependencies
    requires: reverse dependencies

    groups: direct dependencies for different levels
    tasks: reverse dependencies for different levels

    stage: direct dependency
    parameters: specific for each task type parameters
     N/A node_dict_factory OrderedDict N/A adjlist_dict_factory OrderedDict __init__ N/A N/A self tasks N/A None args kwargs N/A N/A N/A N/A N/A super GraphSolver self __init__ args kwargs N/A N/A self node N/A N/A self node_dict_factory N/A N/A self adj N/A N/A self adjlist_dict_factory N/A N/A self pred N/A N/A self adjlist_dict_factory N/A N/A self succ N/A self adj N/A N/A tasks None N/A N/A N/A N/A self add_tasks tasks N/A add_node N/A N/A self n N/A attr N/A N/A N/A n N/A self succ N/A N/A N/A N/A self succ N/A n N/A N/A self adjlist_dict_factory N/A N/A N/A self pred N/A n N/A N/A self adjlist_dict_factory N/A N/A N/A self node N/A n attr N/A N/A N/A N/A super GraphSolver self add_node n attr N/A add_edge N/A N/A self u v N/A attr N/A N/A N/A u N/A self succ N/A N/A N/A N/A self succ N/A u N/A N/A self adjlist_dict_factory N/A N/A N/A self pred N/A u N/A N/A self adjlist_dict_factory N/A N/A N/A self node N/A u N/A N/A self node_dict_factory N/A N/A v N/A self succ N/A N/A N/A N/A self succ N/A v N/A N/A self adjlist_dict_factory N/A N/A N/A self pred N/A v N/A N/A self adjlist_dict_factory N/A N/A N/A self node N/A v N/A N/A self node_dict_factory N/A N/A N/A N/A super GraphSolver self add_edge u v attr N/A add_tasks N/A N/A self tasks N/A N/A N/A task tasks N/A N/A N/A N/A self add_task task N/A N/A N/A self _update_dependencies N/A add_task N/A N/A self task N/A N/A N/A N/A N/A self add_node N/A task N/A id task N/A req N/A N/A task get required_for N/A N/A N/A N/A N/A self add_edge N/A task N/A id req N/A req N/A N/A task get requires N/A N/A N/A N/A N/A self add_edge req N/A task N/A id N/A N/A stage task N/A N/A N/A N/A self add_edge N/A task N/A id N/A task N/A stage N/A _update_dependencies N/A N/A self N/A N/A N/A Create dependencies that rely on regexp matching. N/A task N/A N/A six itervalues N/A self node N/A N/A available_groups N/A N/A N/A N/A self get_groups_subgraph nodes N/A group N/A N/A task get groups N/A N/A N/A pattern N/A N/A NameMatchingPolicy create group N/A not_matched N/A N/A available_group available_groups N/A N/A N/A N/A pattern match available_group N/A N/A N/A N/A self add_edge N/A task N/A id available_group N/A N/A N/A N/A not_matched append available_group N/A N/A N/A len available_groups N/A len not_matched N/A N/A N/A N/A self add_edge N/A task N/A id group N/A N/A N/A logger warning Group "%s" is an invalid dependency group N/A available_groups not_matched N/A req N/A N/A task get tasks N/A N/A N/A N/A N/A self add_edge req N/A task N/A id N/A is_acyclic N/A N/A self N/A N/A N/A Verify that graph doesnot contain any cycles in it. N/A N/A N/A nx is_directed_acyclic_graph self N/A get_next_groups N/A N/A self processed_nodes N/A N/A N/A Get nodes that have predecessors in processed_nodes list.

        All predecessors should be taken into account, not only direct
        parents

        :param processed_nodes: set of nodes names
        :returns: list of nodes names
         N/A result N/A N/A node N/A N/A self nodes N/A N/A N/A node processed_nodes N/A N/A N/A predecessors N/A N/A nx dfs_predecessors N/A N/A self reverse node N/A N/A N/A set N/A N/A predecessors keys processed_nodes N/A N/A N/A N/A result append node N/A result N/A get_groups_subgraph N/A N/A self N/A N/A N/A Return subgraph containing all the groups of tasks. N/A roles N/A N/A t N/A id N/A t N/A N/A six itervalues N/A self node N/A N/A N/A t get type N/A N/A consts ORCHESTRATOR_TASK_TYPES group N/A N/A N/A self subgraph roles N/A get_group_tasks N/A N/A self group_name N/A N/A N/A rst N/A N/A predecessors N/A N/A self predecessors group_name N/A task N/A N/A nx topological_sort self N/A N/A N/A task predecessors N/A N/A N/A N/A N/A N/A self should_exclude_task task N/A N/A N/A N/A N/A rst append N/A N/A self node N/A task N/A rst N/A should_exclude_task N/A N/A self task N/A N/A N/A Stores all conditions when task should be excluded from execution.

        :param task: task name
         N/A N/A N/A N/A N/A self node N/A task N/A type N/A consts INTERNAL_TASKS N/A N/A N/A N/A logger debug Excluding task %s that is used for internal reasons. task N/A True N/A N/A N/A N/A N/A N/A self node N/A task get skipped N/A N/A N/A N/A logger debug Task %s will be skipped. task N/A True N/A False N/A topology N/A N/A self N/A N/A N/A N/A map N/A N/A N/A t N/A N/A N/A self node N/A t N/A N/A nx topological_sort self N/A property make_skipped_task N/A N/A self task N/A N/A N/A Make some task in graph skipped

        We can not just remove node because it also stores edges, that connects
        graph in correct order

        :param task: dict with task data
         N/A N/A N/A task N/A type N/A consts INTERNAL_TASKS N/A N/A N/A N/A logger debug Task of type group/stage cannot be skipped.
Task: %s task N/A N/A N/A task N/A skipped True N/A only_tasks N/A N/A self task_ids N/A N/A N/A Leave only tasks that are specified in request.

        :param task_ids: list of task ids
         N/A N/A task_ids N/A N/A N/A task N/A N/A N/A self node values N/A N/A N/A N/A task N/A id task_ids N/A N/A N/A N/A self make_skipped_task task N/A N/A N/A task N/A skipped False N/A reexecutable_tasks N/A N/A self task_filter N/A N/A N/A Keep only reexecutable tasks which match the filter.

        Filter is the list of values. If task has reexecute_on key and its
        value matches the value from filter then task is not skipped.
        :param task_filter: filter (list)
         N/A N/A task_filter N/A N/A N/A task_filter N/A set task_filter N/A task N/A N/A six itervalues N/A self node N/A N/A reexecute_on N/A N/A task get reexecute_on N/A N/A N/A reexecute_on None N/A N/A task_filter issubset reexecute_on N/A N/A N/A task N/A skipped False N/A N/A N/A N/A self make_skipped_task task N/A find_subgraph N/A N/A self start end N/A None None N/A N/A Find subgraph by provided start and end endpoints

        :param end: task name
        :param start: task name
        :param include: iterable with task names
        :returns: GraphSolver instance (subgraph from original)
         N/A working_graph self N/A start N/A N/A working_graph N/A N/A self subgraph N/A N/A nx dfs_postorder_nodes working_graph start N/A end N/A N/A working_graph N/A N/A self subgraph N/A N/A nx dfs_postorder_nodes N/A N/A working_graph reverse end N/A working_graph N/A filter_subgraph N/A N/A self start end include N/A None None N/A N/A N/A Exclude tasks that is not meant to be executed

        :param include: container with task names
         N/A wgraph N/A N/A self find_subgraph start start end end N/A task wgraph N/A N/A N/A N/A N/A self should_exclude_task task N/A task include N/A N/A N/A N/A wgraph remove_node task N/A wgraph N/A N/A AstuteGraph N/A object N/A N/A This object stores logic that required for working with astute __init__ N/A N/A self cluster tasks N/A None N/A N/A N/A self cluster cluster N/A N/A self tasks N/A tasks N/A N/A N/A objects Cluster get_deployment_tasks cluster N/A N/A self graph N/A GraphSolver N/A N/A N/A N/A self graph add_tasks N/A self tasks N/A N/A self serializers N/A TaskSerializers N/A only_tasks N/A N/A self task_ids N/A N/A N/A N/A N/A N/A self graph only_tasks task_ids N/A reexecutable_tasks N/A N/A self task_filter N/A N/A N/A N/A N/A N/A self graph reexecutable_tasks task_filter N/A group_nodes_by_roles N/A N/A self nodes N/A N/A N/A Group nodes by roles

        :param nodes: list of node db object
        :param roles: list of roles names
        :returns: dict of {role_name: nodes_list} pairs
         N/A res N/A defaultdict list N/A node nodes N/A N/A N/A N/A N/A res N/A N/A node N/A role append node N/A res N/A get_nodes_with_roles N/A N/A self grouped_nodes roles N/A N/A N/A Returns nodes with provided roles.

        :param grouped_nodes: sorted nodes by role keys
        :param roles: list of roles
        :returns: list of nodes (dicts)
         N/A result N/A N/A role roles N/A N/A N/A role grouped_nodes N/A N/A N/A N/A result extend N/A grouped_nodes N/A role N/A result N/A assign_parallel_nodes N/A N/A self priority nodes N/A N/A N/A Assign parallel nodes

        It is possible that same node have 2 or more roles that can be
        deployed in parallel. We can not allow it. That is why priorities
        will be assigned in chunks

        :params priority: PriorityStrategy instance
        :params nodes: list of serialized nodes (dicts)
         N/A current_nodes nodes N/A current_nodes N/A N/A next_nodes N/A N/A group N/A N/A added_uids N/A N/A node current_nodes N/A N/A N/A N/A uid node N/A role node N/A N/A N/A N/A errors InvalidSerializedNode N/A N/A uid and role are mandatory fields. Node: {0} format node N/A N/A N/A node N/A uid added_uids N/A N/A N/A N/A group append node N/A N/A N/A added_uids append N/A node N/A uid N/A N/A N/A N/A next_nodes append node N/A N/A N/A priority in_parallel group N/A current_nodes next_nodes N/A process_parallel_nodes N/A N/A self priority parallel_groups grouped_nodes N/A N/A N/A Process both types of parallel deployment nodes

        :param priority: PriorityStrategy instance
        :param parallel_groups: list of dict objects
        :param grouped_nodes: dict with {role: nodes} mapping
         N/A parallel_nodes N/A N/A group parallel_groups N/A N/A nodes N/A N/A self get_nodes_with_roles grouped_nodes N/A group N/A role N/A N/A amount N/A N/A group N/A parameters N/A strategy N/A N/A N/A N/A priority in_parallel_by nodes N/A N/A N/A group N/A parameters N/A strategy N/A amount N/A N/A N/A N/A parallel_nodes extend nodes N/A parallel_nodes N/A N/A N/A N/A self assign_parallel_nodes priority parallel_nodes N/A add_priorities N/A N/A self nodes N/A N/A N/A Add priorities and tasks for all nodes

        :param nodes: list of node db object
         N/A priority N/A N/A ps PriorityStrategy N/A groups_subgraph N/A N/A N/A self graph get_groups_subgraph N/A all_groups N/A N/A groups_subgraph nodes N/A grouped_nodes N/A N/A self group_nodes_by_roles nodes N/A processed_groups N/A N/A set all_groups N/A set N/A N/A grouped_nodes keys N/A current_groups N/A N/A groups_subgraph get_next_groups processed_groups N/A current_groups N/A N/A one_by_one N/A N/A parallel N/A N/A r current_groups N/A N/A group N/A N/A N/A self graph node N/A r N/A N/A N/A N/A N/A group N/A parameters N/A strategy N/A type N/A N/A consts DEPLOY_STRATEGY one_by_one N/A N/A N/A N/A one_by_one append group N/A N/A N/A N/A N/A N/A group N/A parameters N/A strategy N/A type N/A N/A consts DEPLOY_STRATEGY parallel N/A N/A N/A N/A parallel append group N/A group one_by_one N/A N/A nodes N/A N/A self get_nodes_with_roles grouped_nodes N/A group N/A role N/A N/A N/A priority one_by_one nodes N/A N/A N/A self process_parallel_nodes priority parallel grouped_nodes N/A N/A N/A processed_groups update current_groups N/A current_groups N/A N/A groups_subgraph get_next_groups processed_groups N/A stage_tasks_serialize N/A N/A self tasks nodes N/A N/A N/A Serialize tasks for certain stage

        :param stage: oneof consts.STAGES
        :param nodes: list of node db objects
         N/A serialized N/A N/A role_resolver N/A RoleResolver nodes N/A task tasks N/A N/A N/A N/A N/A self graph should_exclude_task N/A task N/A id N/A N/A N/A serializer N/A N/A N/A N/A self serializers get_stage_serializer task task N/A self cluster nodes role_resolver role_resolver N/A N/A N/A N/A serializer should_execute N/A N/A N/A N/A N/A serialized extend N/A N/A serializer serialize N/A serialized N/A post_tasks_serialize N/A N/A self nodes N/A N/A N/A Serialize tasks for post_deployment hook

        :param nodes: list of node db objects
         N/A N/A deploy_end N/A self graph N/A N/A subgraph N/A N/A N/A self graph find_subgraph start deploy_end N/A N/A N/A N/A errors NotEnoughInformation *deploy_end* stage must be provided N/A N/A N/A self stage_tasks_serialize N/A subgraph topology nodes N/A pre_tasks_serialize N/A N/A self nodes N/A N/A N/A Serialize tasks for pre_deployment hook

        :param nodes: list of node db objects
         N/A N/A deploy_start N/A self graph N/A N/A subgraph N/A N/A N/A self graph find_subgraph end deploy_start N/A N/A N/A N/A errors NotEnoughInformation *deploy_start* stage must be provided N/A N/A N/A self stage_tasks_serialize N/A subgraph topology nodes N/A deploy_task_serialize N/A N/A self node N/A N/A N/A Serialize tasks with necessary for orchestrator attributes

        :param node: dict with serialized node
         N/A serialized N/A N/A priority N/A N/A ps PriorityStrategy N/A task N/A N/A N/A self graph get_group_tasks N/A node N/A role N/A N/A serializer N/A N/A N/A N/A self serializers get_deploy_serializer task task N/A self cluster node N/A N/A N/A N/A serializer should_execute N/A N/A N/A N/A N/A serialized extend N/A N/A serializer serialize N/A N/A N/A priority one_by_one serialized N/A serialized N/A check N/A N/A self N/A N/A N/A N/A N/A N/A N/A self graph is_acyclic N/A N/A err Graph cannot be processed because it contains cycles in it: N/A err N/A N/A ,  join N/A N/A N/A six moves map str N/A N/A nx simple_cycles N/A N/A nx DiGraph N/A self graph N/A err N/A N/A N/A errors InvalidData err N/A non_existing_tasks N/A N/A invalid_tasks N/A N/A N/A node_key node_value N/A N/A six iteritems N/A N/A self graph node N/A N/A N/A N/A N/A node_value get id N/A N/A successors N/A N/A N/A self graph successors node_key N/A predecessors N/A N/A N/A self graph predecessors node_key N/A neighbors N/A successors predecessors N/A N/A N/A non_existing_tasks append node_key N/A N/A N/A invalid_tasks extend neighbors N/A non_existing_tasks N/A N/A N/A N/A errors InvalidData N/A N/A Tasks '{non_existing_tasks}' can't be in requires|required_for|groups|tasks for [{invalid_tasks}] because they don't exist in the graph format non_existing_tasks N/A N/A ,  join N/A N/A str x N/A x N/A sorted non_existing_tasks invalid_tasks N/A N/A ,  join N/A N/A str x N/A x N/A sorted N/A set invalid_tasks N/A N/A