On 10/09/2009 02:32 PM, Stephen Gallagher wrote:
This patch adds a python API for managing the SSSD configuration. It
corresponds to the API specification at
https://fedorahosted.org/sssd/wiki/SSSDPythonConfigApi
Don't be scared by the size of the patch: two-thirds of it are unit tests.
This patch does not include any Makefile or specfile changes for this
API yet.
To run the tests, merely cd into the sssd/server/config directory and
run 'python SSSDConfigTest.py'
There is one known limitation with this patch. The config file, when
output, is not using a logical ordering of the sections. I will fix this
in a subsequent patch, but this patch is fully functional, and intended
to be used for automatic or GUI-driven configuration, so making the
output pretty is a nice enhancement, but not urgent.
_______________________________________________
sssd-devel mailing list
sssd-devel(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/sssd-devel
Thanks to a code review by Simo, we identified a few places to improve
the API:
Listing the options will return a 3-tuple of (type, subtype, default)
instead of (type, subtype)
Don't silently ignore plugin schema files if they can't be opened.
set_option() calls will invoke remove_option() if "None" is passed for
the value.
Remove name changes from domains. This is a recipe for disaster. The
same behavior can be achieved by copying a domain if a user really wants
to do so.
And fix a few mistakes:
Don't delete options when removing providers, some options are shared
between provider types. Future enhancement: tracking these better.
Close file descriptors for schema files after reading them.
New patch attached.
--
Stephen Gallagher
RHCE 804006346421761
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/