From ed30ae4a8aacf87cb9be3cfed2e43499cb4d8649 Mon Sep 17 00:00:00 2001 From: Jakub Guzik Date: Mon, 9 Aug 2021 23:57:26 +0200 Subject: Add until filter to podman pod ps This commit adds additional until filter to podman pod ps (ls/list). Additionally, it also adds descriptions for podman pod ps filters available via http api. Signed-off-by: Jakub Guzik --- pkg/domain/filters/pods.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'pkg/domain') diff --git a/pkg/domain/filters/pods.go b/pkg/domain/filters/pods.go index 9a1c7d19d..9a2f0a3ba 100644 --- a/pkg/domain/filters/pods.go +++ b/pkg/domain/filters/pods.go @@ -116,6 +116,17 @@ func GeneratePodFilterFunc(filter string, filterValues []string) ( labels := p.Labels() return util.MatchLabelFilters(filterValues, labels) }, nil + case "until": + return func(p *libpod.Pod) bool { + until, err := util.ComputeUntilTimestamp(filterValues) + if err != nil { + return false + } + if p.CreatedTime().Before(until) { + return true + } + return false + }, nil case "network": return func(p *libpod.Pod) bool { infra, err := p.InfraContainer() -- cgit v1.2.3-54-g00ecf