summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
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 /pkg/domain/infra/tunnel
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 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/system.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/system.go b/pkg/domain/infra/tunnel/system.go
index 97bf885e7..18cb6c75a 100644
--- a/pkg/domain/infra/tunnel/system.go
+++ b/pkg/domain/infra/tunnel/system.go
@@ -3,6 +3,7 @@ package tunnel
import (
"context"
"errors"
+ "fmt"
"github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/bindings/system"
@@ -21,3 +22,9 @@ func (ic *ContainerEngine) VarlinkService(_ context.Context, _ entities.ServiceO
func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command) error {
panic(errors.New("rootless engine mode is not supported when tunneling"))
}
+
+// SystemPrune prunes unused data from the system.
+func (ic *ContainerEngine) SystemPrune(ctx context.Context, options entities.SystemPruneOptions) (*entities.SystemPruneReport, error) {
+ fmt.Println("in tunnel")
+ return system.Prune(ic.ClientCxt, &options.All, &options.Volume)
+}