diff options
Diffstat (limited to 'cmd/podman/pod_stats.go')
-rw-r--r-- | cmd/podman/pod_stats.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cmd/podman/pod_stats.go b/cmd/podman/pod_stats.go index 744602268..36b0b95ed 100644 --- a/cmd/podman/pod_stats.go +++ b/cmd/podman/pod_stats.go @@ -298,3 +298,17 @@ func outputJson(stats []*adapter.PodContainerStats) error { fmt.Println(string(b)) return nil } + +func getPodsByList(podList []string, r *libpod.Runtime) ([]*libpod.Pod, error) { + var ( + pods []*libpod.Pod + ) + for _, p := range podList { + pod, err := r.LookupPod(p) + if err != nil { + return nil, err + } + pods = append(pods, pod) + } + return pods, nil +} |