From 755a6a2e78dd7c399cd6e6253df133b4c2625f84 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Tue, 9 Jan 2018 16:03:59 +0800 Subject: [PATCH] Update comments for ActiveActionsTracker Change-Id: If17a90c26ce945d38f1ed8eb1be0e15c94d61583 --- vitrage/evaluator/scenario_evaluator.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/vitrage/evaluator/scenario_evaluator.py b/vitrage/evaluator/scenario_evaluator.py index 530023ea2..bde2b7356 100644 --- a/vitrage/evaluator/scenario_evaluator.py +++ b/vitrage/evaluator/scenario_evaluator.py @@ -426,13 +426,23 @@ class ScenarioEvaluator(EvaluatorBase): class ActiveActionsTracker(object): """Keeps track of all active actions and relative dominance/priority. - Actions are organized according to resource-id - and action details. + Actions are organized according to resource-id and action details. + Examples: - - all set_state actions on a given resource share the same entry, + + - all set_state actions on a given resource are considered similar action regardless of state - - all raise_alarm of type alarm_name on a given resource share the same - entry, regardless of severity + - all raise_alarm of type alarm_name on a given resource are considered + similar action, regardless of severity + + Each action is assigned a score by mapping the value property to the + priority defined in datasource values config. + + - Alarm: severity + - Resource: state + + The score is used to determine which action in each group of similar + actions to be executed next. """ def __init__(self, conf, db_connection):