diff options
author | Sujil02 <sushah@redhat.com> | 2020-04-08 04:49:32 -0400 |
---|---|---|
committer | Sujil02 <sushah@redhat.com> | 2020-04-15 11:17:33 -0400 |
commit | ec4060aef6c77c049fc2c3b6438ebb5590f6ab69 (patch) | |
tree | 2ce43bc8b0a0c0b9c9bdf1d404c6339e06441a6b /pkg/domain/entities/containers.go | |
parent | 37ed662f323ef4700ae14d441fb2264a59960baa (diff) | |
download | podman-ec4060aef6c77c049fc2c3b6438ebb5590f6ab69.tar.gz podman-ec4060aef6c77c049fc2c3b6438ebb5590f6ab69.tar.bz2 podman-ec4060aef6c77c049fc2c3b6438ebb5590f6ab69.zip |
Ability to prune container in api V2
Adds ability to prune containers for v2.
Adds client side prompt with force flag and filters options to prune.
Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg/domain/entities/containers.go')
-rw-r--r-- | pkg/domain/entities/containers.go | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index f21af9ce4..52327a905 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -2,6 +2,7 @@ package entities import ( "io" + "net/url" "os" "time" @@ -260,7 +261,7 @@ type ContainerRunOptions struct { } // ContainerRunReport describes the results of running -//a container +// a container type ContainerRunReport struct { ExitCode int Id string @@ -327,3 +328,16 @@ type ContainerUnmountReport struct { Err error Id string } + +// ContainerPruneOptions describes the options needed +// to prune a container from the CLI +type ContainerPruneOptions struct { + Filters url.Values `json:"filters" schema:"filters"` +} + +// ContainerPruneReport describes the results after pruning the +// stopped containers. +type ContainerPruneReport struct { + ID map[string]int64 + Err map[string]error +} |