It seems somewhat verbose and redundant to specify the same parameters on both sides of a plug/slot connection. For example, why do we need to specify the dbus-name and dbus-bus on the plug side when the slot can be used to determine what we’re plugging into? Until the connection is created there is no requirement to know what the connection is going into so we can build the correct rules once the connection is finally made based on what the slot says is being connected.
Take:
slots:
my-dbus:
interface: dbus
bus: session
name: my-super-dbus-name
Now we know that whenever a plug is inserted into my-dbus
slot that we need to expose the my-super-dbus-name
over the session
bus to the consuming snap. Until the consumer is connected there is no need to know what it’s going to connect into other than providing a name for the connection:
plugs:
- my-dbus-plug
or maybe to remain compatible with previous usage where we defined the plug even though we have no need to:
plugs:
my-dbus-plug: {}