summaryrefslogtreecommitdiff
path: root/cmd/podman/system_prune.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2019-04-18 10:34:27 -0700
committerJhon Honce <jhonce@redhat.com>2019-04-18 15:13:56 -0700
commit69962682e990ddb9437291b98bd335e74c090fc8 (patch)
tree409dfe0466aa8024a6295e40901a17b8b62b8691 /cmd/podman/system_prune.go
parente4947e5fd699f584cb815a4f4fd92f22b62f2c8a (diff)
downloadpodman-69962682e990ddb9437291b98bd335e74c090fc8.tar.gz
podman-69962682e990ddb9437291b98bd335e74c090fc8.tar.bz2
podman-69962682e990ddb9437291b98bd335e74c090fc8.zip
Refactor of 'podman prune' to better support remote
* Push iterations into the service not the client * Add e2e tests * Refactor to use new frameworks Signed-off-by: Jhon Honce <jhonce@redhat.com>
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())