diff options
author | Matthew Heon <mheon@redhat.com> | 2020-07-13 14:22:43 -0400 |
---|---|---|
committer | Matthew Heon <mheon@redhat.com> | 2020-07-14 12:03:11 -0400 |
commit | 41457b5a28532d410517b1afb1759e2724d03cab (patch) | |
tree | 9d0f6a2e28c8ffdb4366bd3482b2cf5fd255be9e /libpod/define/pod_inspect.go | |
parent | 210f1040d26334457803bc1da74667f70630a620 (diff) | |
download | podman-41457b5a28532d410517b1afb1759e2724d03cab.tar.gz podman-41457b5a28532d410517b1afb1759e2724d03cab.tar.bz2 podman-41457b5a28532d410517b1afb1759e2724d03cab.zip |
Include infra container information in `pod inspect`
We had a field for this in the inspect data, but it was never
being populated. Because of this, `podman pod inspect` stopped
showing port bindings (and other infra container settings). Add
code to populate the infra container inspect data, and add a test
to ensure we don't regress again.
Signed-off-by: Matthew Heon <mheon@redhat.com>
Diffstat (limited to 'libpod/define/pod_inspect.go')
-rw-r--r-- | libpod/define/pod_inspect.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libpod/define/pod_inspect.go b/libpod/define/pod_inspect.go index 7f06e16fc..634cbb728 100644 --- a/libpod/define/pod_inspect.go +++ b/libpod/define/pod_inspect.go @@ -3,8 +3,6 @@ package define import ( "net" "time" - - "github.com/cri-o/ocicni/pkg/ocicni" ) // InspectPodData contains detailed information on a pod's configuration and @@ -60,7 +58,7 @@ type InspectPodData struct { type InspectPodInfraConfig struct { // PortBindings are ports that will be forwarded to the infra container // and then shared with the pod. - PortBindings []ocicni.PortMapping + PortBindings map[string][]InspectHostPort // HostNetwork is whether the infra container (and thus the whole pod) // will use the host's network and not create a network namespace. HostNetwork bool @@ -89,6 +87,8 @@ type InspectPodInfraConfig struct { // HostAdd adds a number of hosts to the infra container's resolv.conf // which will be shared with the rest of the pod. HostAdd []string + // Networks is a list of CNI networks te pod will join. + Networks []string } // InspectPodContainerInfo contains information on a container in a pod. |