The congress.datasources.keystonev3_driver Module

class congress.datasources.keystonev3_driver.KeystoneV3Driver(name='', args=None)

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

DOMAINS = 'domains'
PROJECTS = 'projects'
ROLES = 'roles'
TRANSLATORS = [{'selector-type': 'DOT_SELECTOR', 'table-name': 'users', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'The ID for the user.', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'user description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'username, unique within domain', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'user is enabled or not', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'ID of the default project for the user', 'fieldname': 'project_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'The ID of the domain for the user.', 'fieldname': 'domain_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'email address for the user', 'fieldname': 'email', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DOT_SELECTOR', 'table-name': 'roles', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'role ID', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'role name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DOT_SELECTOR', 'table-name': 'projects', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'project is enabled or not', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'project description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'project name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'The ID of the domain for the project', 'fieldname': 'domain_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'ID for the project', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}, {'selector-type': 'DOT_SELECTOR', 'table-name': 'domains', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'domain is enabled or disabled', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain ID', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}]
USERS = 'users'
domains_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'domains', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'domain is enabled or disabled', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'domain ID', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}
execute(action, action_args)

Overwrite ExecutionDriver.execute().

static get_datasource_info()
initialize_update_methods()
projects_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'projects', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'project is enabled or not', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'project description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'project name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'The ID of the domain for the project', 'fieldname': 'domain_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'ID for the project', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}})}
roles_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'roles', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'role ID', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'role name', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}})}
users_translator = {'selector-type': 'DOT_SELECTOR', 'table-name': 'users', 'translation-type': 'HDICT', 'field-translators': ({'desc': 'The ID for the user.', 'fieldname': 'id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'user description', 'fieldname': 'description', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'username, unique within domain', 'fieldname': 'name', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'user is enabled or not', 'fieldname': 'enabled', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'ID of the default project for the user', 'fieldname': 'project_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'The ID of the domain for the user.', 'fieldname': 'domain_id', 'translator': {'translation-type': 'VALUE'}}, {'desc': 'email address for the user', 'fieldname': 'email', 'translator': {'translation-type': 'VALUE'}})}
value_trans = {'translation-type': 'VALUE'}