summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-04-02 22:56:59 -0400
committerSujil02 <sushah@redhat.com>2020-04-17 17:30:58 -0400
commit37f3b191d5318b7d25893eabf4e57b568c326773 (patch)
tree8c2792aa1e7b4846dffc5708cf13a0eb500f4a19 /libpod
parentaa97cb5f42a35de02d520f6c3006600505a3d6d9 (diff)
downloadpodman-37f3b191d5318b7d25893eabf4e57b568c326773.tar.gz
podman-37f3b191d5318b7d25893eabf4e57b568c326773.tar.bz2
podman-37f3b191d5318b7d25893eabf4e57b568c326773.zip
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 <sushah@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/runtime_pod.go3
1 files changed, 1 insertions, 2 deletions
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 {