[Freeipa-devel] Move ipaldap to ipalib?

Petr Viktorin pviktori at redhat.com
Wed Jan 30 15:33:00 UTC 2013


On 01/30/2013 04:28 PM, Rob Crittenden wrote:
> John Dennis wrote:
>> On 01/30/2013 09:41 AM, Petr Viktorin wrote:
>>> On 01/30/2013 03:28 PM, Rob Crittenden wrote:
>>>> Petr Viktorin wrote:
>>>>> Hello,
>>>>>
>>>>> I've noticed that the client installer uses python-ldap directly, and
>>>>> duplicates some code we already have.
>>>>>
>>>>> Most recently, a convert_ldap_error function appeared in ipautil.
>>>>> Similar mechanisms are already in ipaldap, ipa-csreplica-manage,
>>>>> ipa-replica-manage, and my patches remove one in ldap2.
>>>>>
>>>>> Are there any objections to moving ipaldap.py to ipalib?
>>>>>
>>>>
>>>> ipaldap.py is going away eventually, right?
>>>
>>> No, the common code is in ipaldap.py.
>>> ldap2.py only has the ldap2 class, which is a CRUDBackend, manages the
>>> magic per-thread connections, and has some extra helpers that can assume
>>> IPA is installed.
>>>
>>>> It is probably better suited for ipapython if we move it though.
>>>
>>> Sure, makes no difference to me :)
>>> To be honest though, I never got the difference between ipalib and
>>> ipapython. Could you explain it for me?
>>>
>>
>> I asked the same question a while ago, see this thread for the answers
>>
>> https://www.redhat.com/archives/freeipa-devel/2011-October/msg00392.html
>>
>> FWIW I still couldn't fully reconcile what was said with what is in the
>> code, I suspect that's because we might not have been disciplined when
>> adding new code. I continue to find it a source of confusion FWIW. What
>> was said in that thread implies the client should not depend on ipalib,
>> but it does, go figure.
>>
>> Getting everything partitioned into their logical locations, namespaces,
>> imports, etc. is a code clean-up effort that should be addressed at some
>> point. Hopefully we'll iterate on that piecemeal, but only if we
>> actually understand the rules :-)
>>
>
> ipalib contains framework code.
>
> ipapython contains other common code between client, server and tools.
>

Thank you both! That makes it much clearer.


-- 
Petr³




More information about the Freeipa-devel mailing list