Ejemplo n.º 1
0
 def __init__(self, datasource_info_mapper):
     self._tracker = {}
     alarms_score = \
         datasource_info_mapper.get_datasource_priorities('vitrage')
     all_scores = datasource_info_mapper.get_datasource_priorities()
     self._action_tools = {
         ActionType.SET_STATE: pt.SetStateTools(all_scores),
         ActionType.RAISE_ALARM: pt.RaiseAlarmTools(alarms_score),
         ActionType.ADD_CAUSAL_RELATIONSHIP: pt.BaselineTools,
         ActionType.MARK_DOWN: pt.BaselineTools
     }
Ejemplo n.º 2
0
 def __init__(self, conf, db_connection):
     info_mapper = DatasourceInfoMapper(conf)
     self._db = db_connection
     alarms_score = info_mapper.get_datasource_priorities('vitrage')
     all_scores = info_mapper.get_datasource_priorities()
     self._action_tools = {
         ActionType.SET_STATE: pt.SetStateTools(all_scores),
         ActionType.RAISE_ALARM: pt.RaiseAlarmTools(alarms_score),
         ActionType.ADD_CAUSAL_RELATIONSHIP: pt.BaselineTools,
         ActionType.MARK_DOWN: pt.BaselineTools,
         ActionType.EXECUTE_MISTRAL: pt.BaselineTools
     }
Ejemplo n.º 3
0
 def _init_action_tools(cls, conf):
     if cls.action_tools:
         return
     info_mapper = DatasourceInfoMapper(conf)
     alarms_score = info_mapper.get_datasource_priorities('vitrage')
     all_scores = info_mapper.get_datasource_priorities()
     cls.action_tools = {
         ActionType.SET_STATE: pt.SetStateTools(all_scores),
         ActionType.RAISE_ALARM: pt.RaiseAlarmTools(alarms_score),
         ActionType.ADD_CAUSAL_RELATIONSHIP: pt.BaselineTools,
         ActionType.MARK_DOWN: pt.BaselineTools,
         ActionType.EXECUTE_MISTRAL: pt.BaselineTools
     }