Added efficacy indicators to /action_plans

I this changeset, I added the efficacy indicators both at the DB
and at the API level alongside the associated logic.

Partially Implements: blueprint efficacy-indicator

Change-Id: I824553637621da67966103c1b0c01348b09bd836
This commit is contained in:
Vincent Françoise
2016-05-20 16:16:33 +02:00
parent 2b95a4cbc4
commit 442512cd71
23 changed files with 380 additions and 103 deletions

View File

@@ -66,11 +66,12 @@ class BaseStrategy(loadable.Loadable):
super(BaseStrategy, self).__init__(config)
self._name = self.get_name()
self._display_name = self.get_display_name()
self._goal = self.get_goal()
# default strategy level
self._strategy_level = level.StrategyLevel.conservative
self._cluster_state_collector = None
# the solution given by the strategy
self._solution = default.DefaultSolution()
self._solution = default.DefaultSolution(goal=self.goal, strategy=self)
self._osc = osc
self._collector_manager = None
self._model = None
@@ -99,7 +100,7 @@ class BaseStrategy(loadable.Loadable):
@classmethod
@abc.abstractmethod
def get_goal_name(cls):
"""The goal name for the strategy"""
"""The goal name the strategy achieves"""
raise NotImplementedError()
@classmethod
@@ -151,6 +152,8 @@ class BaseStrategy(loadable.Loadable):
self.do_execute()
self.post_execute()
self.solution.compute_global_efficacy()
return self.solution
@property