congress.datasources.monasca_driver module

congress.datasources.monasca_driver module

class congress.datasources.monasca_driver.MonascaDriver(name='', args=None)

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

TRANSLATORS = [{'table-name': 'metrics', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'id', 'val-col': 'value', 'translation-type': 'VDICT', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'dimensions', 'key-col': 'key'}, 'fieldname': 'dimensions'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'statistics', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'name', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'statistics.data', 'val-col': 'value_col', 'translation-type': 'LIST'}, 'fieldname': 'statistics'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}]
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_methods()
metric_translator = {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'id', 'val-col': 'value', 'translation-type': 'VDICT', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'dimensions', 'key-col': 'key'}, 'fieldname': 'dimensions'}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'metrics', 'translation-type': 'HDICT'}
statistics_translator = {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'name', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'statistics.data', 'val-col': 'value_col', 'translation-type': 'LIST'}, 'fieldname': 'statistics'}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'statistics', 'translation-type': 'HDICT'}
update_statistics()
class congress.datasources.monasca_driver.MonascaWebhookDriver(name='', args=None)

Bases: congress.datasources.datasource_driver.PushedDataSourceDriver

DIMENSIONS = 'alarms.metrics.dimensions'
METRICS = 'alarms.metrics'
TRANSLATORS = [{'table-name': 'alarm_notification', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_definition_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_description'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_timestamp'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'state'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'old_state'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'message'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'tenant_id'}, {'translator': {'parent-key': 'alarm_id', 'in-list': True, 'parent-key-desc': 'ALARM id', 'parent-col-name': 'alarm_id', 'table-name': 'alarms.metrics', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'id', 'val-col': 'value', 'translation-type': 'VDICT', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'alarms.metrics.dimensions', 'key-col': 'key'}, 'fieldname': 'dimensions'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}, 'fieldname': 'metrics'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}]
alarm_notification_translator = {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_definition_id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_description'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'alarm_timestamp'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'state'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'old_state'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'message'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'tenant_id'}, {'translator': {'parent-key': 'alarm_id', 'in-list': True, 'parent-key-desc': 'ALARM id', 'parent-col-name': 'alarm_id', 'table-name': 'alarms.metrics', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'id', 'val-col': 'value', 'translation-type': 'VDICT', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'alarms.metrics.dimensions', 'key-col': 'key'}, 'fieldname': 'dimensions'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}, 'fieldname': 'metrics'}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'alarm_notification', 'translation-type': 'HDICT'}
static get_datasource_info()
metric_translator = {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'id-col': 'id', 'val-col': 'value', 'translation-type': 'VDICT', 'translator': {'translation-type': 'VALUE'}, 'table-name': 'alarms.metrics.dimensions', 'key-col': 'key'}, 'fieldname': 'dimensions'}), 'in-list': True, 'parent-col-name': 'alarm_id', 'parent-key': 'alarm_id', 'parent-key-desc': 'ALARM id', 'selector-type': 'DICT_SELECTOR', 'table-name': 'alarms.metrics', 'translation-type': 'HDICT'}
set_up_periodic_tasks()
Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.