[Freeipa-devel] updates and deletes
Rob Crittenden
rcritten at redhat.com
Thu Aug 16 13:50:58 UTC 2007
Karl MacMillan wrote:
> On Tue, 2007-08-14 at 10:27 -0400, Rob Crittenden wrote:
>> 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.
>>
>
> If we don't expose the attributes directly but hide them behind methods
> we could also track changes to the python object, generate a modlist
> from that, and pass only mods to the XML-RPC layer.
I'm going to leave this to Kevin to answer. I'm not sure how it would
work with the GUI. I think that everything goes through setValue() so we
could theoretically track changes.
The LDAP API provides a very nice function that generates the modlist
for us. It would be really nice to be able to use that.
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/20070816/9e9bdeb5/attachment.bin>
More information about the Freeipa-devel
mailing list