The achieved goal should be returned by each strategy

Registered by Vincent Mahe on 2016-02-17

Today, there is no way to know what goal is achieved by a given strategy. The link between goal and strategies is done in the Watcher configuration.

There should be a goal attribute in the base strategy class saying what goal it achieves.

Beyond that, it will enable all strategies that achieve the same goal to derive from a common base class that returns the appropriate goal value.
For example, for the EnergyOptimization goal, there could be 3 different strategies with the same EnergyConsumptionBaseStrategy base class returning the following goal attribute "Decrease Energy Consumption".

It will also enable watcher to return the list of available goals depending on which strategies have been deployed on the node where the Watcher Decision Engine is running.

Blueprint information

Status:
Complete
Approver:
Antoine Cabot
Priority:
Medium
Drafter:
Vincent Mahe
Direction:
Approved
Assignee:
Vincent Françoise
Definition:
Approved
Series goal:
Accepted for newton
Implementation:
Implemented
Milestone target:
milestone icon newton-1
Started by
Vincent Françoise on 2016-03-23
Completed by
Vincent Françoise on 2016-05-27

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:bp/get-goal-from-strategy,n,z

Addressed by: https://review.openstack.org/293862
    Achieved goal should be returned by each strategy

Addressed by: https://review.openstack.org/296633
    Added Goal and Strategy into Watcher DB

Addressed by: https://review.openstack.org/296634
    Added Goal object

Addressed by: https://review.openstack.org/296635
    Added Goal in Strategy + Goal API reads from DB

Addressed by: https://review.openstack.org/296636
    Add strategy & goal fields in audit template

Addressed by: https://review.openstack.org/298807
    Added Strategy model

Addressed by: https://review.openstack.org/298808
    DB registration for Strategies

Addressed by: https://review.openstack.org/299539
    Updated purge to now include goals and strategies

Addressed by: https://review.openstack.org/299899
    Added /strategies endpoint in Watcher API

Addressed by: https://review.openstack.org/299900
    Documentation update for get-goal-from-strategy

Addressed by: https://review.openstack.org/299902
    Remove watcher_goals section from devstack plugin

Addressed by: https://review.openstack.org/301516
    Added Goals and Strategies to Dashboard

Gerrit topic: https://review.openstack.org/#q,topic:301753,n,z

Addressed by: https://review.openstack.org/301774
    Achieved goal should be returned by each strategy Today, there is no way to know what goal is achieved by a given strategy. The mapping between goal and strategies is done in the Watcher configuration.

Addressed by: https://review.openstack.org/304751
    Refactored Strategy selector to select from DB

Addressed by: https://review.openstack.org/305965
    Syncer now syncs stale audit templates

Addressed by: https://review.openstack.org/306485
    Remove [watcher_goals] config section

Addressed by: https://review.openstack.org/307144
    Added .pot file

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.