summaryrefslogtreecommitdiff
path: root/cmd/podman/volumes
diff options
context:
space:
mode:
authorSujil02 <sushah@redhat.com>2020-04-29 22:41:56 -0400
committerSujil02 <sushah@redhat.com>2020-05-01 13:57:16 -0400
commitb94862171b29dbef4cd780e4b1746d97f62f7a94 (patch)
tree6d64486633a4ebc208f31431c81f1932ade979f4 /cmd/podman/volumes
parent2f3762eb911258016581187f072a24ac2724be3b (diff)
downloadpodman-b94862171b29dbef4cd780e4b1746d97f62f7a94.tar.gz
podman-b94862171b29dbef4cd780e4b1746d97f62f7a94.tar.bz2
podman-b94862171b29dbef4cd780e4b1746d97f62f7a94.zip
And system prune feature for v2.
Adds podman system prune for v2. Refactoring for code reuse from pods containers images and volume prune. Adds and enables testcases to support the added feature. Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'cmd/podman/volumes')
-rw-r--r--cmd/podman/volumes/prune.go12
1 files changed, 1 insertions, 11 deletions
diff --git a/cmd/podman/volumes/prune.go b/cmd/podman/volumes/prune.go
index 2c3ed88f3..57344385b 100644
--- a/cmd/podman/volumes/prune.go
+++ b/cmd/podman/volumes/prune.go
@@ -44,9 +44,6 @@ func init() {
}
func prune(cmd *cobra.Command, args []string) error {
- var (
- errs utils.OutputErrors
- )
// Prompt for confirmation if --force is not set
if !pruneOptions.Force {
reader := bufio.NewReader(os.Stdin)
@@ -64,12 +61,5 @@ func prune(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- for _, r := range responses {
- if r.Err == nil {
- fmt.Println(r.Id)
- } else {
- errs = append(errs, r.Err)
- }
- }
- return errs.PrintErrors()
+ return utils.PrintVolumePruneResults(responses)
}