Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
repo: use PlugInfo and SlotInfo for permanent plugs/slots #4120
Merged
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
6d060ce
Use PlugInfo/SlotInfo for all *permanent* methods of interfaces.
stolowski eae9ba2
Merge branch 'master' into permanent-use-plugslotinfo
stolowski 970d5d1
Merge remote-tracking branch 'zyga/fix/ofono' into permanent-use-plug…
stolowski 81ac55a
Merge branch 'master' of github.com:snapcore/snapd into permanent-use…
zyga 5e6eae2
Merge branch 'fix/udev-hooks' into permanent-use-plugslotinfo
zyga 97d54dc
Merge branch 'master' of github.com:snapcore/snapd into permanent-use…
zyga
Jump to file or symbol
Failed to load files and symbols.
| @@ -56,10 +56,10 @@ type apparmorDefiner2 interface { | ||
| AppArmorConnestedSlot(spec *apparmor.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type apparmorDefiner3 interface { | ||
| - AppArmorPermanentPlug(spec *apparmor.Specification, plug *interfaces.Plug) error | ||
| + AppArmorPermanentPlug(spec *apparmor.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type apparmorDefiner4 interface { | ||
| - AppArmorPermanentSlot(spec *apparmor.Specification, slot *interfaces.Slot) error | ||
| + AppArmorPermanentSlot(spec *apparmor.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type dbusDefiner1 interface { | ||
| @@ -72,7 +72,7 @@ type dbusDefiner3 interface { | ||
| DBusPermanestPlug(spec *dbus.Specification, plug *interfaces.Plug) error | ||
| } | ||
| type dbusDefiner4 interface { | ||
| - DBusPermanentSlot(spec *dbus.Specification, slot *interfaces.Slot) error | ||
| + DBusPermanentSlot(spec *dbus.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type kmodDefiner1 interface { | ||
| @@ -82,10 +82,10 @@ type kmodDefiner2 interface { | ||
| KModConnectedSlot(spec *kmod.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type kmodDefiner3 interface { | ||
| - KModPermanentPlug(spec *kmod.Specification, plug *interfaces.Plug) error | ||
| + KModPermanentPlug(spec *kmod.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type kmodDefiner4 interface { | ||
| - KModPermanentSlot(spec *kmod.Specification, slot *interfaces.Slot) error | ||
| + KModPermanentSlot(spec *kmod.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type mountDefiner1 interface { | ||
| @@ -95,10 +95,10 @@ type mountDefiner2 interface { | ||
| MountConnectedSlot(spec *mount.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type mountDefiner3 interface { | ||
| - MountPermanentPlug(spec *mount.Specification, plug *interfaces.Plug) error | ||
| + MountPermanentPlug(spec *mount.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type mountDefiner4 interface { | ||
| - MountPermanentSlot(spec *mount.Specification, slot *interfaces.Slot) error | ||
| + MountPermanentSlot(spec *mount.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type seccompDefiner1 interface { | ||
| @@ -108,10 +108,10 @@ type seccompDefiner2 interface { | ||
| SecCompConnectedSlot(spec *seccomp.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type seccompDefiner3 interface { | ||
| - SecCompPermanentPlug(spec *seccomp.Specification, plug *interfaces.Plug) error | ||
| + SecCompPermanentPlug(spec *seccomp.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type seccompDefiner4 interface { | ||
| - SecCompPermanentSlot(spec *seccomp.Specification, slot *interfaces.Slot) error | ||
| + SecCompPermanentSlot(spec *seccomp.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type systemdDefiner1 interface { | ||
| @@ -121,10 +121,10 @@ type systemdDefiner2 interface { | ||
| SystemdConnectedSlot(spec *systemd.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type systemdDefiner3 interface { | ||
| - SystemdPermanentPlug(spec *systemd.Specification, plug *interfaces.Plug) error | ||
| + SystemdPermanentPlug(spec *systemd.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type systemdDefiner4 interface { | ||
| - SystemdPermanentSlot(spec *systemd.Specification, slot *interfaces.Slot) error | ||
| + SystemdPermanentSlot(spec *systemd.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| type udevDefiner1 interface { | ||
| @@ -134,10 +134,10 @@ type udevDefiner2 interface { | ||
| UDevConnectedSlot(spec *udev.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error | ||
| } | ||
| type udevDefiner3 interface { | ||
| - UDevPermanentPlug(spec *udev.Specification, plug *interfaces.Plug) error | ||
| + UDevPermanentPlug(spec *udev.Specification, plug *snap.PlugInfo) error | ||
| } | ||
| type udevDefiner4 interface { | ||
| - UDevPermanentSlot(spec *udev.Specification, slot *interfaces.Slot) error | ||
| + UDevPermanentSlot(spec *udev.Specification, slot *snap.SlotInfo) error | ||
| } | ||
| // allGoodDefiners contains all valid specification definers for all known backends. | ||
| @@ -202,10 +202,10 @@ type snippetDefiner2 interface { | ||
| ConnectedSlotSnippet(plug *interfaces.Plug, slot *interfaces.Slot, sec interfaces.SecuritySystem) error | ||
| } | ||
| type snippetDefiner3 interface { | ||
| - PermanentPlugSnippet(plug *interfaces.Plug, sec interfaces.SecuritySystem) error | ||
| + PermanentPlugSnippet(plug *snap.PlugInfo, sec interfaces.SecuritySystem) error | ||
| } | ||
| type snippetDefiner4 interface { | ||
| - PermanentSlotSnippet(slot *interfaces.Slot, sec interfaces.SecuritySystem) error | ||
| + PermanentSlotSnippet(slot *snap.SlotInfo, sec interfaces.SecuritySystem) error | ||
| } | ||
zyga
Contributor
|
||
| // old auto-connect function | ||
| @@ -371,14 +371,14 @@ func (s *AllSuite) TestUnexpectedSpecSignatures(c *C) { | ||
| name: fmt.Sprintf("%sPermanentPlug", backend), | ||
| in: []string{ | ||
| fmt.Sprintf("*%s.Specification", backendLower), | ||
| - "*interfaces.Plug", | ||
| + "*snap.PlugInfo", | ||
| }, | ||
| out: []string{"error"}, | ||
| }, { | ||
| name: fmt.Sprintf("%sPermanentSlot", backend), | ||
| in: []string{ | ||
| fmt.Sprintf("*%s.Specification", backendLower), | ||
| - "*interfaces.Slot", | ||
| + "*snap.SlotInfo", | ||
| }, | ||
| out: []string{"error"}, | ||
| }, { | ||
Oops, something went wrong.
All the changes above are ok. Can you add a test that checks we are not merging any new interfaces with the old signature methods please?