The congress.datasources.swift_driver Module

class congress.datasources.swift_driver.SwiftDriver(name='', args=None)

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

CONTAINERS = 'containers'
OBJECTS = 'objects'
TRANSLATORS = [{'table-name': 'containers', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'count'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'bytes'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'objects', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'bytes'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'last_modified'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'hash'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'content_type'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'container_name'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}]
containers_translator = {'table-name': 'containers', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'count'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'bytes'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
get_swift_credentials_v1(creds)
initialize_update_methods()
objects_translator = {'table-name': 'objects', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'bytes'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'last_modified'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'hash'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'content_type'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'container_name'}), 'selector-type': 'DICT_SELECTOR', 'translation-type': 'HDICT'}
value_trans = {'translation-type': 'VALUE'}