Hi ,
I would like to add 2 new attributes to every new created entries in my 389 servers . In these attributes i would to add calculated values for initial users information . Is it possible to do that without developping a new plugin ? In case i have to write a new pluggins which languages 389 supports Does something like triggers in BDD exist in 389 ?
On Sun, 2018-11-18 at 21:44 +0000, Olivier JUDITH wrote:
Hi ,
I would like to add 2 new attributes to every new created entries in my 389 servers . In these attributes i would to add calculated values for initial users information . Is it possible to do that without developping a new plugin ? In case i have to write a new pluggins which languages 389 supports Does something like triggers in BDD exist in 389 ?
At the moment we don't have a plugin like this, but I think it would be valuable to have one. Most of our plugins today are in C, but we want to support Rust in the future.
You could do this with CoS templates instead as an option.
If you do go down the plugin route, I'd be happy to help advise and assist in the process :) feel free to email me directly if you want to work on this,
Thanks,
389-users mailing list -- 389-users@lists.fedoraproject.org To unsubscribe send an email to 389-users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/389-users@lists.fedoraproject....
Thank you for your reply.
I'm not a C developer and i prefer Python but i'll try to write my plugin. It's a challenge for me I started to read plugins development documentation on Redhat page. From my understanding i have to call SLAPI_PLUGIN_POST_ADD_FN , right ?.
If a use CoS template can i add a specific value. I would like to add a generated value into this attributes.
I'll come back to you for your advises.
Thank again !!
On 19 Nov 2018, at 09:30, Olivier JUDITH gnulux@gmail.com wrote:
Thank you for your reply.
I'm not a C developer and i prefer Python but i'll try to write my plugin. It's a challenge for me I started to read plugins development documentation on Redhat page. From my understanding i have to call SLAPI_PLUGIN_POST_ADD_FN , right ?.
It’s a bit more than that. You have to call that function to register your function pointer. After that our server framework will call your function many times (threaded so in parallel too!). There is some more boilerplate around it too, but that’s the core of it, yes.
Also I’d probably do this as a “SLAPI_PLUGI_PRE_ADD_BETXN_FN”. That means it happens before the entry is commited to the database, and it happens within the write transaction so it’s properly able to be rolled back and such. We’d need to work out how to make the schema check pass for this situation however … (SLAPI_PLUGIN_PRE_ADD_FN could be before schema enforcement?).
If a use CoS template can i add a specific value. I would like to add a generated value into this attributes.
CoS allows you to add a specific value to any entry matching a filter condition. So I think this may do exactly what you want. The only difference is CoS is “in memory” so all servers must be configured the same way to support it.
I'll come back to you for your advises.
Thank again !! _______________________________________________ 389-users mailing list -- 389-users@lists.fedoraproject.org To unsubscribe send an email to 389-users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/389-users@lists.fedoraproject....
— Sincerely,
William
Hi,
Sorry i read the documentation several times but still don't catch how i can gather values from new added user entries , generate new values from them then put it in CoS templates. Did i miss something ? For instance , i add a new user with an filled attribute employeeID . i want to gather it's value then concatenate it with another number and put it in another attribute already declared in my own schema. Are you sure i can do that with CoS ?
I would need to check the documentation myself in order to answer this I’m sorry. I’m quite busy at the moment, but I will try to look at this tomorrow,
On 21 Nov 2018, at 08:39, Olivier JUDITH gnulux@gmail.com wrote:
Hi,
Sorry i read the documentation several times but still don't catch how i can gather values from new added user entries , generate new values from them then put it in CoS templates. Did i miss something ? For instance , i add a new user with an filled attribute employeeID . i want to gather it's value then concatenate it with another number and put it in another attribute already declared in my own schema. Are you sure i can do that with CoS ? _______________________________________________ 389-users mailing list -- 389-users@lists.fedoraproject.org To unsubscribe send an email to 389-users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/389-users@lists.fedoraproject....
— Sincerely,
William
389-users@lists.fedoraproject.org