Update comments for ActiveActionsTracker

Change-Id: If17a90c26ce945d38f1ed8eb1be0e15c94d61583
This commit is contained in:
Yujun Zhang 2018-01-09 16:03:59 +08:00
parent 042858d98a
commit 755a6a2e78

View File

@ -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):