From de96e54230b6921f04142abca40605911f1ca0ee Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Mon, 15 May 2017 16:30:50 +0200 Subject: [PATCH] server: move StopAllSandboxes in sandbox_stop.go Signed-off-by: Antonio Murdaca --- server/sandbox_remove.go | 13 ------------- server/sandbox_stop.go | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/server/sandbox_remove.go b/server/sandbox_remove.go index 855df465..b4a5b66e 100644 --- a/server/sandbox_remove.go +++ b/server/sandbox_remove.go @@ -106,16 +106,3 @@ func (s *Server) RemovePodSandbox(ctx context.Context, req *pb.RemovePodSandboxR logrus.Debugf("RemovePodSandboxResponse %+v", resp) return resp, nil } - -// StopAllPodSandboxes removes all pod sandboxes -func (s *Server) StopAllPodSandboxes() { - logrus.Debugf("StopAllPodSandboxes") - for _, sb := range s.state.sandboxes { - pod := &pb.StopPodSandboxRequest{ - PodSandboxId: sb.id, - } - if _, err := s.StopPodSandbox(nil, pod); err != nil { - logrus.Warnf("could not StopPodSandbox %s: %v", sb.id, err) - } - } -} diff --git a/server/sandbox_stop.go b/server/sandbox_stop.go index b932afb2..d18cf51f 100644 --- a/server/sandbox_stop.go +++ b/server/sandbox_stop.go @@ -59,3 +59,16 @@ func (s *Server) StopPodSandbox(ctx context.Context, req *pb.StopPodSandboxReque logrus.Debugf("StopPodSandboxResponse: %+v", resp) return resp, nil } + +// StopAllPodSandboxes removes all pod sandboxes +func (s *Server) StopAllPodSandboxes() { + logrus.Debugf("StopAllPodSandboxes") + for _, sb := range s.state.sandboxes { + pod := &pb.StopPodSandboxRequest{ + PodSandboxId: sb.id, + } + if _, err := s.StopPodSandbox(nil, pod); err != nil { + logrus.Warnf("could not StopPodSandbox %s: %v", sb.id, err) + } + } +}