summaryrefslogtreecommitdiffstats
path: root/keystone/common
diff options
context:
space:
mode:
authorElena Ezhova <eezhova@mirantis.com>2013-04-19 18:11:37 +0400
committerElena Ezhova <eezhova@mirantis.com>2013-08-06 12:54:09 +0400
commit6f954d2c2982a6096c13053dafd96ebddc6017bb (patch)
tree684aba5dabfceb5d14ff5ec41bc30c2a4a4ad43b /keystone/common
parent1289bbf12e8cf6e7792df0de44a3bc9bf6e9c505 (diff)
downloadkeystone-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/common')
-rw-r--r--keystone/common/ldap/core.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/keystone/common/ldap/core.py b/keystone/common/ldap/core.py
index 71423064..39ea78de 100644
--- a/keystone/common/ldap/core.py
+++ b/keystone/common/ldap/core.py
@@ -172,6 +172,10 @@ class BaseLdap(object):
if self.notfound_arg is None:
self.notfound_arg = self.options_name + '_id'
+
+ attribute_ignore = '%s_attribute_ignore' % self.options_name
+ self.attribute_ignore = getattr(conf.ldap, attribute_ignore)
+
self.use_dumb_member = getattr(conf.ldap, 'use_dumb_member')
self.dumb_member = (getattr(conf.ldap, 'dumb_member') or
self.DUMB_MEMBER_DN)