The congress.datasources.aodh_driver Module

class congress.datasources.aodh_driver.AodhDriver(name=”, args=None)

Bases: congress.datasources.datasource_driver.PollingDataSourceDriver, congress.datasources.datasource_driver.ExecutionDriver

ALARMS = ‘alarms’
ALARM_THRESHOLD_RULE = ‘alarms.threshold_rule’
TRANSLATORS = [{‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘alarm_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘state’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘enabled’}, {‘col’: ‘threshold_rule_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘threshold_rule_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘alarms.threshold_rule’}, ‘fieldname’: ‘threshold_rule’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘description’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘time_constraints’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘user_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘project_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘alarm_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ok_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘insufficient_data_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘repeat_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘timestamp’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘state_timestamp’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘alarms’}]
alarms_translator = {‘field-translators’: ({‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘alarm_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘name’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘state’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘enabled’}, {‘col’: ‘threshold_rule_id’, ‘translator’: {‘key-col’: ‘key’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘id-col’: ‘threshold_rule_id’, ‘val-col’: ‘value’, ‘translation-type’: ‘VDICT’, ‘table-name’: ‘alarms.threshold_rule’}, ‘fieldname’: ‘threshold_rule’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘type’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘description’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘time_constraints’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘user_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘project_id’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘alarm_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘ok_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘insufficient_data_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘repeat_actions’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘timestamp’}, {‘translator’: {‘translation-type’: ‘VALUE’}, ‘fieldname’: ‘state_timestamp’}), ‘translation-type’: ‘HDICT’, ‘selector-type’: ‘DICT_SELECTOR’, ‘table-name’: ‘alarms’}
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_method()
safe_id(x)
value_trans = {‘translation-type’: ‘VALUE’}