From dff53a02ef03e1c9c1787c11a48366cdeeaa7693 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 12 Aug 2023 14:54:20 +0200 Subject: [PATCH] libnetwork: remove Controller.Sandboxes as it's no longer used The Controller.Sandboxes method was used by some SandboxWalkers. Now that those have been removed, there are no longer any consumers of this method, so let's remove it for now. Signed-off-by: Sebastiaan van Stijn --- libnetwork/controller.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/libnetwork/controller.go b/libnetwork/controller.go index 154935d5ac..cfb26dd816 100644 --- a/libnetwork/controller.go +++ b/libnetwork/controller.go @@ -966,24 +966,6 @@ func (c *Controller) NewSandbox(containerID string, options ...SandboxOption) (* return sb, nil } -// Sandboxes returns the list of Sandbox(s) managed by this controller. -func (c *Controller) Sandboxes() []*Sandbox { - c.mu.Lock() - defer c.mu.Unlock() - - list := make([]*Sandbox, 0, len(c.sandboxes)) - for _, s := range c.sandboxes { - // Hide stub sandboxes from libnetwork users - if s.isStub { - continue - } - - list = append(list, s) - } - - return list -} - // GetSandbox returns the Sandbox which has the passed id. // // It returns an [ErrInvalidID] when passing an invalid ID, or an