atomic icon indicating copy to clipboard operation
atomic copied to clipboard

Make D-Bus methods take dicts of options instead

Open jlebon opened this issue 8 years ago • 5 comments

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}).

jlebon avatar Nov 30 '16 14:11 jlebon

Makes sense.

rhatdan avatar Nov 30 '16 14:11 rhatdan

The impression that I got from the cockpit team was that this is not desirable. Let's hook in @larskarlitski for his input.

baude avatar Feb 21 '17 21:02 baude

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.

baude avatar Feb 21 '17 22:02 baude

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.

larskarlitski avatar Feb 22 '17 08:02 larskarlitski

Since the cockpit team is the driver for this feature, I would go with what they want.

rhatdan avatar Feb 22 '17 14:02 rhatdan