daemon: remove Daemon.children(), Daemon.parents() wrappers

Remove the wrappers to make it more explicit that these are related to
the legacy links feature.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-01-30 14:14:22 +01:00
parent c42005e944
commit 9a69161992
3 changed files with 6 additions and 15 deletions

View File

@@ -99,7 +99,8 @@ func (daemon *Daemon) getInspectData(daemonCfg *config.Config, container *contai
// make a copy to play with
hostConfig := *container.HostConfig
children := daemon.children(container)
// Add information for legacy links
children := daemon.linkIndex.children(container)
hostConfig.Links = nil // do not expose the internal structure
for linkAlias, child := range children {
hostConfig.Links = append(hostConfig.Links, fmt.Sprintf("%s:%s", child.Name, linkAlias))