The 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

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

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_methods()
metric_translator = {‘table-name’: ‘metrics’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘dimensions’, ‘translator’: {‘table-name’: ‘dimensions’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘translation-type’: ‘VDICT’, ‘val-col’: ‘value’, ‘id-col’: ‘id’, ‘key-col’: ‘key’}})}
statistics_translator = {‘table-name’: ‘statistics’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘statistics’, ‘translator’: {‘table-name’: ‘statistics.data’, ‘id-col’: ‘name’, ‘translation-type’: ‘LIST’, ‘translator’: {‘translation-type’: ‘VALUE’}, ‘val-col’: ‘value_col’}})}
update_statistics()
value_trans = {‘translation-type’: ‘VALUE’}