From 37f3b191d5318b7d25893eabf4e57b568c326773 Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Thu, 2 Apr 2020 22:56:59 -0400 Subject: Add pod prune for api v2. Add the ability to prune pods for api v2, Includes the addition of force flag, for client side prompt. Update test suite to support this use case. Signed-off-by: Sujil02 --- libpod/runtime_pod.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libpod/runtime_pod.go') diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go index be566e211..5b81e166a 100644 --- a/libpod/runtime_pod.go +++ b/libpod/runtime_pod.go @@ -176,8 +176,7 @@ func (r *Runtime) GetRunningPods() ([]*Pod, error) { } // PrunePods removes unused pods and their containers from local storage. -// If force is given, then running pods are also included in the pruning. -func (r *Runtime) PrunePods() (map[string]error, error) { +func (r *Runtime) PrunePods(ctx context.Context) (map[string]error, error) { response := make(map[string]error) states := []string{define.PodStateStopped, define.PodStateExited} filterFunc := func(p *Pod) bool { -- cgit v1.2.3-54-g00ecf