summaryrefslogtreecommitdiff
path: root/cmd/podman/system_prune.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-19 05:42:24 -0700
committerGitHub <noreply@github.com>2019-04-19 05:42:24 -0700
commit9f92b21d69719fb54e6f4712d11ebeeebd5a8714 (patch)
tree409dfe0466aa8024a6295e40901a17b8b62b8691 /cmd/podman/system_prune.go
parente4947e5fd699f584cb815a4f4fd92f22b62f2c8a (diff)
parent69962682e990ddb9437291b98bd335e74c090fc8 (diff)
downloadpodman-9f92b21d69719fb54e6f4712d11ebeeebd5a8714.tar.gz
podman-9f92b21d69719fb54e6f4712d11ebeeebd5a8714.tar.bz2
podman-9f92b21d69719fb54e6f4712d11ebeeebd5a8714.zip
Merge pull request #2970 from jwhonce/wip/remote_pod_prune
Refactor of 'podman prune' to better support remote
Diffstat (limited to 'cmd/podman/system_prune.go')
-rw-r--r--cmd/podman/system_prune.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/podman/system_prune.go b/cmd/podman/system_prune.go
index 14cb96941..8900e2644 100644
--- a/cmd/podman/system_prune.go
+++ b/cmd/podman/system_prune.go
@@ -82,13 +82,21 @@ Are you sure you want to continue? [y/N] `, volumeString)
ctx := getContext()
fmt.Println("Deleted Containers")
lasterr := pruneContainers(runtime, ctx, rmWorkers, false, false)
+
fmt.Println("Deleted Pods")
- if err := prunePods(runtime, ctx, rmWorkers, true); err != nil {
+ pruneValues := cliconfig.PodPruneValues{
+ PodmanCommand: c.PodmanCommand,
+ Force: c.Force,
+ }
+ ok, failures, err := runtime.PrunePods(ctx, &pruneValues)
+ if err != nil {
if lasterr != nil {
logrus.Errorf("%q", lasterr)
}
lasterr = err
}
+ printCmdResults(ok, failures)
+
if c.Bool("volumes") {
fmt.Println("Deleted Volumes")
err := volumePrune(runtime, getContext())