summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2021-02-04 12:58:55 -0600
committerbaude <bbaude@redhat.com>2021-02-06 07:37:29 -0600
commit91ea3fabd625a891487cd0d9b130ac71366ecb74 (patch)
treec281268da8fd605a19006725d9ecda97d9bab988 /pkg/domain/infra/tunnel
parentc421127dd7f700829a8e5265d8ddad102061bebc (diff)
downloadpodman-91ea3fabd625a891487cd0d9b130ac71366ecb74.tar.gz
podman-91ea3fabd625a891487cd0d9b130ac71366ecb74.tar.bz2
podman-91ea3fabd625a891487cd0d9b130ac71366ecb74.zip
add network prune
add the ability to prune unused cni networks. filters are not implemented but included both compat and podman api endpoints. Fixes :#8673 Signed-off-by: baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel')
-rw-r--r--pkg/domain/infra/tunnel/network.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/network.go b/pkg/domain/infra/tunnel/network.go
index bdb1beb03..990bfa880 100644
--- a/pkg/domain/infra/tunnel/network.go
+++ b/pkg/domain/infra/tunnel/network.go
@@ -89,3 +89,8 @@ func (ic *ContainerEngine) NetworkExists(ctx context.Context, networkname string
Value: exists,
}, nil
}
+
+// Network prune removes unused cni networks
+func (ic *ContainerEngine) NetworkPrune(ctx context.Context, options entities.NetworkPruneOptions) ([]*entities.NetworkPruneReport, error) {
+ return network.Prune(ic.ClientCtx, nil)
+}