diff --git a/builtin/myplugin/host/alwaystrue.go b/builtin/myplugin/host/alwaystrue.go index 815e30bfc..a53088781 100644 --- a/builtin/myplugin/host/alwaystrue.go +++ b/builtin/myplugin/host/alwaystrue.go @@ -33,13 +33,13 @@ func (h *AlwaysTrueHost) Detect() bool { return true } -// ParentsFunc implements component.Host -func (h *AlwaysTrueHost) ParentsFunc() interface{} { - return h.Parents +// ParentFunc implements component.Host +func (h *AlwaysTrueHost) ParentFunc() interface{} { + return h.Parent } -func (h *AlwaysTrueHost) Parents() []string { - return []string{} +func (h *AlwaysTrueHost) Parent() string { + return "" } // HasCapabilityFunc implements component.Host diff --git a/builtin/otherplugin/guest/alwaystrue.go b/builtin/otherplugin/guest/alwaystrue.go index e07b5eb98..c5fad544a 100644 --- a/builtin/otherplugin/guest/alwaystrue.go +++ b/builtin/otherplugin/guest/alwaystrue.go @@ -41,12 +41,12 @@ func (h *AlwaysTrueGuest) Detect(t plugincore.Target) bool { } // ParentsFunc implements component.Guest -func (h *AlwaysTrueGuest) ParentsFunc() interface{} { - return h.Parents +func (h *AlwaysTrueGuest) ParentFunc() interface{} { + return h.Parent } -func (h *AlwaysTrueGuest) Parents() []string { - return []string{"force", "guest", "platform", "match"} // We just need to have this be the most of all matches +func (h *AlwaysTrueGuest) Parent() string { + return "" } // HasCapabilityFunc implements component.Guest diff --git a/internal/core/basis.go b/internal/core/basis.go index 6f63df615..1c01b85b5 100644 --- a/internal/core/basis.go +++ b/internal/core/basis.go @@ -226,7 +226,7 @@ func (b *Basis) Host() (host core.Host, err error) { } if detected { - hp, err := host.Parents() + hp, err := host.Parent() if err != nil { b.logger.Error("failed to get parents from host", "plugin", name, @@ -236,7 +236,7 @@ func (b *Basis) Host() (host core.Host, err error) { continue } - rp, err := result.Parents() + rp, err := result.Parent() if err != nil { b.logger.Error("failed to get parents from host", "plugin", result_name, diff --git a/internal/core/machine.go b/internal/core/machine.go index cafd96799..921a3d55a 100644 --- a/internal/core/machine.go +++ b/internal/core/machine.go @@ -70,7 +70,7 @@ func (m *Machine) Guest() (g core.Guest, err error) { continue } - gp, err := guest.Parents() + gp, err := guest.Parent() if err != nil { m.logger.Error("failed to get parents from guest", "plugin", name, @@ -80,7 +80,7 @@ func (m *Machine) Guest() (g core.Guest, err error) { continue } - rp, err := result.Parents() + rp, err := result.Parent() if err != nil { m.logger.Error("failed to get parents from guest", "plugin", result_name,