The watcher.decision_engine.planner.weight Module

class watcher.decision_engine.planner.weight.WeightPlanner(config)[source]

Bases: watcher.decision_engine.planner.base.BasePlanner

Weight planner implementation

This implementation builds actions with parents in accordance with weights. Set of actions having a lower weight will be scheduled before the other ones. There are two config options to configure: action_weights and parallelization.

Limitations

  • This planner requires to have action_weights and parallelization configs tuned well.
static chunkify(lst, n)[source]

Yield successive n-sized chunks from lst.

compute_action_graph(sorted_weighted_actions)[source]
create_action_plan(context, audit_id, solution)[source]
create_scheduled_actions(action_plan, graph)[source]
static format_action(action_plan_id, action_type, input_parameters=None, parents=())[source]
classmethod get_config_opts()[source]
get_sorted_actions_by_weight(context, action_plan, solution)[source]
schedule(context, audit_id, solution)[source]