diff options
author | Elena Ezhova <eezhova@mirantis.com> | 2013-04-19 18:11:37 +0400 |
---|---|---|
committer | Elena Ezhova <eezhova@mirantis.com> | 2013-08-06 12:54:09 +0400 |
commit | 6f954d2c2982a6096c13053dafd96ebddc6017bb (patch) | |
tree | 684aba5dabfceb5d14ff5ec41bc30c2a4a4ad43b /keystone/identity | |
parent | 1289bbf12e8cf6e7792df0de44a3bc9bf6e9c505 (diff) | |
download | keystone-6f954d2c2982a6096c13053dafd96ebddc6017bb.tar.gz keystone-6f954d2c2982a6096c13053dafd96ebddc6017bb.tar.xz keystone-6f954d2c2982a6096c13053dafd96ebddc6017bb.zip |
Abstract out attribute_ignore assigning in LDAP driver
This is used to avoid code duplication in keystone/identity/
backends/ldap.py. All changes are fully covered by test_*option_
name*_attribute_ignore() in test_backend_ldap.py.
bp refactor-ldap-driver
Change-Id: Ia0fc0b3d4a92416dcd65ddb49b3b0bf9a0777363
Diffstat (limited to 'keystone/identity')
-rw-r--r-- | keystone/identity/backends/ldap.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/keystone/identity/backends/ldap.py b/keystone/identity/backends/ldap.py index 5aa4edee..a359c63f 100644 --- a/keystone/identity/backends/ldap.py +++ b/keystone/identity/backends/ldap.py @@ -210,7 +210,6 @@ class UserApi(common_ldap.EnabledEmuMixIn, common_ldap.BaseLdap): DEFAULT_STRUCTURAL_CLASSES = ['person'] DEFAULT_ID_ATTR = 'cn' DEFAULT_OBJECTCLASS = 'inetOrgPerson' - DEFAULT_ATTRIBUTE_IGNORE = ['tenant_id', 'tenants'] NotFound = exception.UserNotFound options_name = 'user' attribute_options_names = {'password': 'pass', @@ -225,8 +224,6 @@ class UserApi(common_ldap.EnabledEmuMixIn, common_ldap.BaseLdap): super(UserApi, self).__init__(conf) self.enabled_mask = conf.ldap.user_enabled_mask self.enabled_default = conf.ldap.user_enabled_default - self.attribute_ignore = (getattr(conf.ldap, 'user_attribute_ignore') - or self.DEFAULT_ATTRIBUTE_IGNORE) def _ldap_res_to_model(self, res): obj = super(UserApi, self)._ldap_res_to_model(res) @@ -271,7 +268,6 @@ class GroupApi(common_ldap.BaseLdap): DEFAULT_OBJECTCLASS = 'groupOfNames' DEFAULT_ID_ATTR = 'cn' DEFAULT_MEMBER_ATTRIBUTE = 'member' - DEFAULT_ATTRIBUTE_IGNORE = [] NotFound = exception.GroupNotFound options_name = 'group' attribute_options_names = {'description': 'desc', @@ -283,8 +279,6 @@ class GroupApi(common_ldap.BaseLdap): super(GroupApi, self).__init__(conf) self.member_attribute = (getattr(conf.ldap, 'group_member_attribute') or self.DEFAULT_MEMBER_ATTRIBUTE) - self.attribute_ignore = (getattr(conf.ldap, 'group_attribute_ignore') - or self.DEFAULT_ATTRIBUTE_IGNORE) def create(self, values): self.affirm_unique(values) |