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/assignment | |
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/assignment')
-rw-r--r-- | keystone/assignment/backends/ldap.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/keystone/assignment/backends/ldap.py b/keystone/assignment/backends/ldap.py index 34cd9c2f..718d38c3 100644 --- a/keystone/assignment/backends/ldap.py +++ b/keystone/assignment/backends/ldap.py @@ -263,7 +263,6 @@ class ProjectApi(common_ldap.EnabledEmuMixIn, common_ldap.BaseLdap): DEFAULT_OBJECTCLASS = 'groupOfNames' DEFAULT_ID_ATTR = 'cn' DEFAULT_MEMBER_ATTRIBUTE = 'member' - DEFAULT_ATTRIBUTE_IGNORE = [] NotFound = exception.ProjectNotFound notfound_arg = 'project_id' # NOTE(yorik-sar): while options_name = tenant options_name = 'tenant' @@ -277,8 +276,6 @@ class ProjectApi(common_ldap.EnabledEmuMixIn, common_ldap.BaseLdap): super(ProjectApi, self).__init__(conf) self.member_attribute = (getattr(conf.ldap, 'tenant_member_attribute') or self.DEFAULT_MEMBER_ATTRIBUTE) - self.attribute_ignore = (getattr(conf.ldap, 'tenant_attribute_ignore') - or self.DEFAULT_ATTRIBUTE_IGNORE) def create(self, values): self.affirm_unique(values) @@ -375,7 +372,6 @@ class RoleApi(common_ldap.BaseLdap): DEFAULT_STRUCTURAL_CLASSES = [] DEFAULT_OBJECTCLASS = 'organizationalRole' DEFAULT_MEMBER_ATTRIBUTE = 'roleOccupant' - DEFAULT_ATTRIBUTE_IGNORE = [] NotFound = exception.RoleNotFound options_name = 'role' attribute_options_names = {'name': 'name'} @@ -385,8 +381,6 @@ class RoleApi(common_ldap.BaseLdap): super(RoleApi, self).__init__(conf) self.member_attribute = (getattr(conf.ldap, 'role_member_attribute') or self.DEFAULT_MEMBER_ATTRIBUTE) - self.attribute_ignore = (getattr(conf.ldap, 'role_attribute_ignore') - or self.DEFAULT_ATTRIBUTE_IGNORE) def get(self, id, filter=None): model = super(RoleApi, self).get(id, filter) |