mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add pod prune for api v2.
Add the ability to prune pods for api v2, Includes the addition of force flag, for client side prompt. Update test suite to support this use case. Signed-off-by: Sujil02 <sushah@redhat.com>
This commit is contained in:
@ -176,8 +176,7 @@ func (r *Runtime) GetRunningPods() ([]*Pod, error) {
|
||||
}
|
||||
|
||||
// PrunePods removes unused pods and their containers from local storage.
|
||||
// If force is given, then running pods are also included in the pruning.
|
||||
func (r *Runtime) PrunePods() (map[string]error, error) {
|
||||
func (r *Runtime) PrunePods(ctx context.Context) (map[string]error, error) {
|
||||
response := make(map[string]error)
|
||||
states := []string{define.PodStateStopped, define.PodStateExited}
|
||||
filterFunc := func(p *Pod) bool {
|
||||
|
Reference in New Issue
Block a user