congress.datasources.swift_driver module

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 = {'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'count'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'bytes'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}), 'selector-type': 'DICT_SELECTOR', 'table-name': 'containers', 'translation-type': 'HDICT'}
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
get_swift_credentials_v1(creds)
initialize_update_methods()
objects_translator = {'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', 'table-name': 'objects', 'translation-type': 'HDICT'}
value_trans = {'translation-type': 'VALUE'}
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.