[SSSD] [PATCH] First batch of infrastructure patches for review

Stef Walter stefw at redhat.com
Fri Jan 10 11:26:59 UTC 2014


As was discussed yesterday, I'm working on the sssd dbus infrastructure,
so we can have rich access to sssd information via Dbus. Jakub has been
working on implementing methods that expose that.

These are infrastructure patches, that take the basic DBus support that
sssd has (ie: sbus) and start to mature it so that we can handle things
like properties, NNN-instances of objects, automatic introspection,
object manager, automatic unpacking of args for handlers, and so on.

As I mentioned earlier, some of these concepts may seem foreign, for
example using DBus interface definitions to drive things.

However this has many benefits as we get into implementing more dbus stuff:

 * Removes boiler-plate all over the place.
 * Lets the compiler check dbus interface implementations and usage.
 * Makes it possible to do complex stuff (PropertiesChanged or
   ObjectManager) that would otherwise be insane.

I have tried to balance things and not go crazy with changing style all
over the place and keep to the sssd way of doing things most of the time.

Yes, this does involve a codegen, much like flex or bison. It has real
concrete benefits. While it is possible to handcraft the necessary meta
data structs (see patch 0001), you lose compile-time checking and some
robustness.

The codegen generates as little code as possible, and we have tests to
verify that it is correct (thanks Sumit for that idea).

It's important to note that an interface, and an implemented instance of
that interface are two different things.

There's a lot more to do. Next up will be implementing automatic
introspection generation, and property access.

If you prefer to access this as a branch, see:

https://github.com/stefwalter/sssd/tree/dbus-infra

Cheers,

Stef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-sbus-Add-meta-data-structures-and-code-generator.patch
Type: text/x-patch
Size: 34244 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-sbus-Add-sbus_vtable-and-update-codegen-to-support-i.patch
Type: text/x-patch
Size: 9137 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-nss-Stop-using-one-DBus-interface-with-totally-diffe.patch
Type: text/x-patch
Size: 1651 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-sbus-Rework-sbus-to-use-interface-metadata-and-vtabl.patch
Type: text/x-patch
Size: 31836 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-sbus-Generate-constants-from-interface-definitions.patch
Type: text/x-patch
Size: 3283 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-sbus-Use-constants-to-make-dbus-calls.patch
Type: text/x-patch
Size: 14570 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/sssd-devel/attachments/20140110/6ab78003/attachment-0005.bin>


More information about the sssd-devel mailing list