The watcher.decision_engine.planner.weight Module

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 higher 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(graph)[source]
classmethod get_config_opts()[source]

Defines the configuration options to be associated to this loadable

Returns:A list of configuration options relative to this Loadable
Return type:list of oslo_config.cfg.Opt instances
get_sorted_actions_by_weight(context, action_plan, solution)[source]
schedule(context, audit_id, solution)[source]

The planner receives a solution to schedule

Parameters:
  • solution (BaseSolution subclass instance) – A solution provided by a strategy for scheduling
  • audit_uuid (str) – the audit uuid
Returns:

Action plan with an ordered sequence of actions such that all security, dependency, and performance requirements are met.

Return type:

watcher.objects.ActionPlan instance

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.