diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-10 05:31:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-10 05:31:11 -0500 |
commit | bc0fa658f7617454673f8e2faf9298bef2890ea0 (patch) | |
tree | e5eec82d1489e353c625907e9f6745c4c6dc6274 /pkg/domain/infra/abi/pods.go | |
parent | 49db79e735acd2c693762eaff62680cd9a8cb60b (diff) | |
parent | 82bce7d906c5b5aa1d98782bed8d5e77637fc0ef (diff) | |
download | podman-bc0fa658f7617454673f8e2faf9298bef2890ea0.tar.gz podman-bc0fa658f7617454673f8e2faf9298bef2890ea0.tar.bz2 podman-bc0fa658f7617454673f8e2faf9298bef2890ea0.zip |
Merge pull request #8920 from Luap99/ps-network-filter
podman ps/pod ps add network filter and .Networks format placeholder
Diffstat (limited to 'pkg/domain/infra/abi/pods.go')
-rw-r--r-- | pkg/domain/infra/abi/pods.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/pods.go b/pkg/domain/infra/abi/pods.go index f108b770c..2a8445c9f 100644 --- a/pkg/domain/infra/abi/pods.go +++ b/pkg/domain/infra/abi/pods.go @@ -333,6 +333,17 @@ func (ic *ContainerEngine) PodPs(ctx context.Context, options entities.PodPSOpti if err != nil { return nil, err } + networks := []string{} + if len(infraID) > 0 { + infra, err := p.InfraContainer() + if err != nil { + return nil, err + } + networks, _, err = infra.Networks() + if err != nil { + return nil, err + } + } reports = append(reports, &entities.ListPodsReport{ Cgroup: p.CgroupParent(), Containers: lpcs, @@ -341,6 +352,7 @@ func (ic *ContainerEngine) PodPs(ctx context.Context, options entities.PodPSOpti InfraId: infraID, Name: p.Name(), Namespace: p.Namespace(), + Networks: networks, Status: status, Labels: p.Labels(), }) |