Re: [389-devel] lib389: cleanup __init__
On 10/31/2013 09:58 AM, Roberto Polli wrote: Hi @all, I started investigating in mocking with fakeldap, and it seems an easy and viable way of adding unittests. A main issue is the DSAdmin.__init__ complexity. I thought - a long time ago actually - to remove from DSAdmin all cached references to backends, suffixes and configuration. If we want to add a cache layer we can do it afterward. And with some cache pattern. Part of the complexity is due to trying to keep data across a restart - that is, if you call stop() then start(), you want start() to automatically re-establish the connection - to do that, you need to store the credentials. Let me know + Peace, R. -- 389-devel mailing list 389-de...@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/389-devel
Re: [389-devel] lib389: cleanup __init__
Hi Rich, On Thursday 31 October 2013 10:32:13 Rich Megginson wrote: I thought - a long time ago actually - to remove from DSAdmin all cached references to backends, suffixes and configuration. Part of the complexity is due to trying to keep data across a restart I agree with credential caching - as they should be quite unmutable, and I was talking about __initPart2() which is called by __init__. Are all the __initPart2() attributes essential? Peace, R: -- Roberto Polli Community Manager Babel S.r.l. - http://www.babel.it T: +39.06.9826.9651 M: +39.340.652.2736 F: +39.06.9826.9680 P.zza S.Benedetto da Norcia, 33 - 00040 Pomezia (Roma) CONFIDENZIALE: Questo messaggio ed i suoi allegati sono di carattere confidenziale per i destinatari in indirizzo. E' vietato l'inoltro non autorizzato a destinatari diversi da quelli indicati nel messaggio originale. Se ricevuto per errore, l'uso del contenuto e' proibito; si prega di comunicarlo al mittente e cancellarlo immediatamente. -- 389-devel mailing list 389-de...@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/389-devel
Re: [389-devel] lib389: cleanup __init__
On 10/31/2013 10:35 AM, Roberto Polli wrote: Hi Rich, On Thursday 31 October 2013 10:32:13 Rich Megginson wrote: I thought - a long time ago actually - to remove from DSAdmin all cached references to backends, suffixes and configuration. Part of the complexity is due to trying to keep data across a restart I agree with credential caching - as they should be quite unmutable, and I was talking about __initPart2() which is called by __init__. Are all the __initPart2() attributes essential? No. You could do lazy evaluation of those fields. For example, instead of having a .dbdir field, have a .getdbdir() member that would do an ldapsearch if .dbdir is None. Peace, R: -- 389-devel mailing list 389-de...@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/389-devel
Re: [389-devel] lib389: cleanup __init__
On Thursday 31 October 2013 10:40:25 Rich Megginson wrote: Are all the __initPart2() attributes essential? No. You could do lazy evaluation of those fields. For example, instead of having a .dbdir field, have a .getdbdir() member that would do an ldapsearch if .dbdir is None. That's good. We could put that in Config. Peace, R: -- Roberto Polli Community Manager Babel S.r.l. - http://www.babel.it T: +39.06.9826.9651 M: +39.340.652.2736 F: +39.06.9826.9680 P.zza S.Benedetto da Norcia, 33 - 00040 Pomezia (Roma) CONFIDENZIALE: Questo messaggio ed i suoi allegati sono di carattere confidenziale per i destinatari in indirizzo. E' vietato l'inoltro non autorizzato a destinatari diversi da quelli indicati nel messaggio originale. Se ricevuto per errore, l'uso del contenuto e' proibito; si prega di comunicarlo al mittente e cancellarlo immediatamente. -- 389-devel mailing list 389-de...@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/389-devel