summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/utils/pods.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-01 15:39:35 +0200
committerGitHub <noreply@github.com>2020-04-01 15:39:35 +0200
commit394f1c26d61cc8570b49444e1f431978bf101daa (patch)
tree6b1f55e33d7c51df2084ea5365a1059237e17511 /pkg/api/handlers/utils/pods.go
parent6d36d05447fd594bedebea8a9a4366d348a78290 (diff)
parent7def91910c07ee3782b2106f76877d57d646f9b4 (diff)
downloadpodman-394f1c26d61cc8570b49444e1f431978bf101daa.tar.gz
podman-394f1c26d61cc8570b49444e1f431978bf101daa.tar.bz2
podman-394f1c26d61cc8570b49444e1f431978bf101daa.zip
Merge pull request #5684 from baude/v2podps
podmanv2 pod ps
Diffstat (limited to 'pkg/api/handlers/utils/pods.go')
-rw-r--r--pkg/api/handlers/utils/pods.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/api/handlers/utils/pods.go b/pkg/api/handlers/utils/pods.go
index 79d1a5090..d47053eda 100644
--- a/pkg/api/handlers/utils/pods.go
+++ b/pkg/api/handlers/utils/pods.go
@@ -59,6 +59,10 @@ func GetPods(w http.ResponseWriter, r *http.Request) ([]*entities.ListPodsReport
if err != nil {
return nil, err
}
+ infraId, err := pod.InfraContainerID()
+ if err != nil {
+ return nil, err
+ }
lp := entities.ListPodsReport{
Cgroup: pod.CgroupParent(),
Created: pod.CreatedTime(),
@@ -66,6 +70,7 @@ func GetPods(w http.ResponseWriter, r *http.Request) ([]*entities.ListPodsReport
Name: pod.Name(),
Namespace: pod.Namespace(),
Status: status,
+ InfraId: infraId,
}
for _, ctr := range ctrs {
state, err := ctr.State()