congress.datasources.vitrage_driver module

class congress.datasources.vitrage_driver.VitrageDriver(name='', args=None)

Bases: congress.datasources.datasource_driver.PushedDataSourceDriver

Datasource driver that accepts Vitrage webhook alarm notification.

TRANSLATORS = [{'translation-type': 'HDICT', 'table-name': 'alarms', 'selector-type': 'DICT_SELECTOR', 'objects-extract-fn': <function VitrageDriver.flatten_and_timestamp_alarm_webhook>, 'field-translators': ({'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_type', 'col': 'type', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_operational_severity', 'col': 'operational_severity', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'update_timestamp', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'receive_timestamp', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_project_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_operational_state', 'col': 'resource_operational_state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_type', 'col': 'resource_type', 'translator': {'translation-type': 'VALUE'}})}]
flatten_and_timestamp_alarm_webhook()
static get_datasource_info()
set_up_periodic_tasks()
value_trans = {'translation-type': 'VALUE'}
webhook_alarm_translator = {'field-translators': ({'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_type', 'col': 'type', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_operational_severity', 'col': 'operational_severity', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'vitrage_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'update_timestamp', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'receive_timestamp', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_name', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_project_id', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_operational_state', 'col': 'resource_operational_state', 'translator': {'translation-type': 'VALUE'}}, {'fieldname': 'resource_vitrage_type', 'col': 'resource_type', 'translator': {'translation-type': 'VALUE'}}), 'objects-extract-fn': <function VitrageDriver.flatten_and_timestamp_alarm_webhook>, 'selector-type': 'DICT_SELECTOR', 'table-name': 'alarms', 'translation-type': 'HDICT'}