[Freeipa-devel] [PATCH] 93 Add custom mapping object for LDAP entry data

Jan Cholasta jcholast at redhat.com
Wed Jan 16 15:45:21 UTC 2013


Hi,

this patch adds initial support for custom LDAP entry objects, as 
described in <http://freeipa.org/page/V3/LDAP_code>.

The LDAPEntry class implements the mapping object. The current version 
works like a dict, plus it has a DN property and validates and 
normalizes attribute names (there is no case preservation yet).

The LDAPEntryCompat class provides compatibility with old code that uses 
(dn, attrs) tuples. The reason why this is a separate class is that our 
code currently has 2 contradicting requirements on the entry object: 
tuple unpacking must work with it (i.e. iter(entry) yields dn and 
attribute dict), but it also must work as an argument to dict 
constructor (i.e. iter(entry) yields attribute names). This class will 
be removed once our code is converted to use LDAPEntry.

Honza

-- 
Jan Cholasta
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeipa-jcholast-93-Add-custom-mapping-object-for-LDAP-entry-data.patch
Type: text/x-patch
Size: 6262 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20130116/53b9a734/attachment.bin>


More information about the Freeipa-devel mailing list