summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2021-08-11 08:38:20 +0000
committerGitHub <noreply@github.com>2021-08-11 08:38:20 +0000
commit1968fdc874516e1195985024fd268d9a8da22953 (patch)
treeb4fc775df82c68aa64fe8309b1b0d75eeff196f8 /pkg/domain
parent99e7ea51c7ae76216ba37cdfa9100574cb80d957 (diff)
parented30ae4a8aacf87cb9be3cfed2e43499cb4d8649 (diff)
downloadpodman-1968fdc874516e1195985024fd268d9a8da22953.tar.gz
podman-1968fdc874516e1195985024fd268d9a8da22953.tar.bz2
podman-1968fdc874516e1195985024fd268d9a8da22953.zip
Merge pull request #11173 from jmguzik/pod-ps-until-filter
Add until filter to podman pod ps
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/filters/pods.go11
1 files changed, 11 insertions, 0 deletions
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()