The congress.datasources.keystone_driver Module

class congress.datasources.keystone_driver.KeystoneDriver(name='', args=None)

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

ROLES = 'roles'
TENANTS = 'tenants'
TRANSLATORS = [{'table-name': 'users', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'username'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'enabled'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'tenantId'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'email'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'roles', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}, {'table-name': 'tenants', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'enabled'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'description'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}]
USERS = 'users'
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
get_keystone_credentials_v2(args)
initialize_update_methods()
roles_translator = {'table-name': 'roles', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}
tenants_translator = {'table-name': 'tenants', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'enabled'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'description'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}
users_translator = {'table-name': 'users', 'field-translators': ({'translator': {'translation-type': 'VALUE'}, 'fieldname': 'username'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'name'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'enabled'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'tenantId'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'id'}, {'translator': {'translation-type': 'VALUE'}, 'fieldname': 'email'}), 'selector-type': 'DOT_SELECTOR', 'translation-type': 'HDICT'}
value_trans = {'translation-type': 'VALUE'}