[SSSD] [PATCH] Add SSSDConfig python API

Stephen Gallagher sgallagh at redhat.com
Mon Oct 12 17:54:43 UTC 2009


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 at 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/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-new-SSSDConfig-python-API.patch
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091012/3ec22307/attachment.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20091012/3ec22307/attachment.sig>


More information about the sssd-devel mailing list