The congress.datasources.heatv1_driver Module

class congress.datasources.heatv1_driver.HeatV1Driver(name=”, args=None)

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

DEPLOYMENTS = ‘deployments’
DEPLOYMENT_OUTPUT_VALUES = ‘deployment_output_values’
EVENTS = ‘events’
RESOURCES = ‘resources’
STACKS = ‘stacks’
TRANSLATORS = [{‘table-name’: ‘stacks’, ‘selector-type’: ‘DOT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘description’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘creation_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘updated_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_owner’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘parent’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘stacks_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}, {‘table-name’: ‘deployments’, ‘selector-type’: ‘DOT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘server_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘config_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘action’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘output_values’, ‘translator’: {‘table-name’: ‘deployment_output_values’, ‘selector-type’: ‘DICT_SELECTOR’, ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘deploy_stdout’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_stderr’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_status_code’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘result’, ‘translator’: {‘translation-type’: ‘VALUE’}})}})}, {‘table-name’: ‘resources’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘physical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘logical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_type’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘creation_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘updated_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘resources_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘physical_resource_id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}, {‘table-name’: ‘events’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘physical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘logical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘event_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘events_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}]
deployments_output_values_translator = {‘table-name’: ‘deployment_output_values’, ‘selector-type’: ‘DICT_SELECTOR’, ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘deploy_stdout’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_stderr’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_status_code’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘result’, ‘translator’: {‘translation-type’: ‘VALUE’}})}
events_translator = {‘table-name’: ‘events’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘physical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘logical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘event_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘events_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_methods()
resources_translator = {‘table-name’: ‘resources’, ‘selector-type’: ‘DICT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘physical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘logical_resource_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_type’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘creation_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘updated_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘resource_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘resources_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘physical_resource_id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}
software_deployment_translator = {‘table-name’: ‘deployments’, ‘selector-type’: ‘DOT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘server_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘config_id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘action’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘output_values’, ‘translator’: {‘table-name’: ‘deployment_output_values’, ‘selector-type’: ‘DICT_SELECTOR’, ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘deploy_stdout’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_stderr’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘deploy_status_code’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘result’, ‘translator’: {‘translation-type’: ‘VALUE’}})}})}
stacks_translator = {‘table-name’: ‘stacks’, ‘selector-type’: ‘DOT_SELECTOR’, ‘translation-type’: ‘HDICT’, ‘field-translators’: ({‘fieldname’: ‘id’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_name’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘description’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘creation_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘updated_time’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_status’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_status_reason’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘stack_owner’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘parent’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘links’, ‘translator’: {‘table-name’: ‘stacks_links’, ‘selector-type’: ‘DICT_SELECTOR’, ‘field-translators’: ({‘fieldname’: ‘href’, ‘translator’: {‘translation-type’: ‘VALUE’}}, {‘fieldname’: ‘rel’, ‘translator’: {‘translation-type’: ‘VALUE’}}), ‘parent-key’: ‘id’, ‘translation-type’: ‘HDICT’, ‘in-list’: True}})}
value_trans = {‘translation-type’: ‘VALUE’}