atomic
atomic copied to clipboard
Make D-Bus methods take dicts of options instead
Right now, the D-Bus methods include the parameter names in the signature. This is bound to become obsolete and break backwards compatibility as more options are added. It would probably make more sense to change them all to take in a dict of option name to option value (i.e. a{sv}
).
Makes sense.
The impression that I got from the cockpit team was that this is not desirable. Let's hook in @larskarlitski for his input.
Also, it is worth noting that I am changing many of the options (as I get to each method) where only a fraction of the parameters are required (like the command line). Else defaults are used.
I prefer proper parameters over dictionaries, but if you expect a lot of change in those APIs it might make sense to add a a{sv]
to the end of the parameter list, indeed.
Since the cockpit team is the driver for this feature, I would go with what they want.