On 04/22/2014 04:29 AM, Pavel Březina wrote:
Hi,
I'm sending some patches that I'll use for OpenLMI provider. It
supports few modifications of sssd.conf through augeas.
For the moment, I think we should not bound to any particular API so
even though I made it a separate object, I don't have any intentions
to make it publicly usable library.
This code will be used from D-Bus responder. I may extend the API if
needed.
I have a conceptual problem with this approach. Sorry to throw the
wrench when a lot of work has been done. But I have not seen this
coming. I read there thesis and there was nothing about augeas there,
actually there was nothing about the architecture of the actual
management at all. That was one of the parts of my feedback.
So why augeas?
I thought that we will use the python API instead of doing it in C. That
was the whole reason why i have not added this same capability to
manipulate the configuration and save it.
In general I think that if we want to do changes in C we should stick to
libini_config and use it to make the modifications.
I see several reasons for that approach:
* we want one place to merge files and make modifications, if there are
two unrelated pieces of code that do that we will have problems. We
already have two we actually adding third: python, ding-libs merge code
and now augeas
* we want to rely on the syntax checking in future. When this part is
added you can not only validate the data coming from the config file but
would also prevent modifications that can potentially lead to
misconfiguration because you are sticking a logical value instead of
string or number and vice verse.
So I am strongly against bringing augeas without a higher level strategy
here. I can see bringing augeas only if we try to consolidate on it in
the long run but I am not sure it is the idea due to the two points above.
I would say that adding the functionality to ding-libs is pretty
trivial. I can tun around a patch pretty quickly if we decide to do it
this way.
Something to discuss first though...
Thanks
Dmitri
Unit tests are attached.
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/sssd-devel
--
Thank you,
Dmitri Pal
Sr. Engineering Manager IdM portfolio
Red Hat, Inc.