[Freeipa-devel] updates and deletes

Rob Crittenden rcritten at redhat.com
Tue Aug 14 14:27:15 UTC 2007


Rob Crittenden wrote:
> We need to come to some decision on how we're going to handle updates 
> and deletes (or really inactivations).
> 
> The LDAP API for updates is a list of tuples in the form 
> (mod_op,mod_type,mod_vals), where mod_op is the operation (one of 
> MOD_ADD, MOD_DELETE, or MOD_REPLACE), mod_type is a string indicating 
> the attribute type name, and mod_vals is either a string value or a list 
> of string values to add, delete or replace respectively. With deletes id 
> mod_vals is None then all attributes are deleted (probably something to 
> test for and reject, I doubt we'd ever want this).

You know, reading docs can be highly beneficial. The python-ldap package 
provides a function to generate the modlist given a new entry and the 
original entry. So we have 2 choices:

1. Have an API where the old and new records are both passed in (not 
very efficient over XML-RPC)
2. Have an API where the new record is passed in and I do a search to 
get the original record (not very efficient)

I'm going to start poking at this, using model #1 for starters.

rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3245 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20070814/98a44416/attachment.bin>


More information about the Freeipa-devel mailing list