The watcher.decision_engine.solution.base
Module¶
A Solution is the result of execution of a strategy (i.e., an algorithm). Each solution is composed of many pieces of information:
- A set of actions generated by the strategy in order to achieve the goal of an associated audit.
- A set of efficacy indicators as defined by the associated goal
- A global efficacy which is computed by the associated goal using the aforementioned efficacy indicators.
A Solution is different from an Action Plan because it contains the non-scheduled list of Actions which is produced by a Strategy. In other words, the list of Actions in a Solution has not yet been re-ordered by the Watcher Planner.
Note that some algorithms (i.e. Strategies) may generate several Solutions. This gives rise to the problem of determining which Solution should be applied.
Two approaches to dealing with this can be envisaged:
- fully automated mode: only the Solution with the highest ranking (i.e., the highest Optimization Efficacy) will be sent to the Watcher Planner and translated into concrete Actions.
- manual mode: several Solutions are proposed to the Administrator with a detailed measurement of the estimated Optimization Efficacy and he/she decides which one will be launched.
-
class
watcher.decision_engine.solution.base.
BaseSolution
(goal, strategy)[source]¶ Bases:
object
-
add_action
(action_type, resource_id, input_parameters=None)[source]¶ Add a new Action in the Solution
Parameters: - action_type – the unique id of an action type defined in entry point ‘watcher_actions’
- resource_id – the unique id of the resource to which the Action applies.
- input_parameters – An array of input parameters provided as key-value pairs of strings. Each key-pair contains names and values that match what was previously defined in the Action type schema.
-