Files
podman/cmd/podman/common/inspect.go
Paul Holzinger d10e77e1bc fix podman pod inspect to support multiple pods
Just like the other inspect commands `podman pod inspect p1 p2` should
return the json for both.

To correctly implement this we follow the container inspect logic, this
allows use to reuse the global inspect command.
Note: To not break the existing single pod output format for podman pod
inspect I added a pod-legacy inspect type. This is only used to make
sure we will print the pod as single json and not an array like for the
other commands. We cannot use the pod type since podman inspect --type
pod did return an array and we should not break that as well.

Fixes #15674

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2022-09-08 10:28:42 +02:00

21 lines
643 B
Go

package common
const (
// AllType can be of type ImageType or ContainerType.
AllType = "all"
// ContainerType is the container type.
ContainerType = "container"
// ImageType is the image type.
ImageType = "image"
// NetworkType is the network type
NetworkType = "network"
// PodType is the pod type.
PodType = "pod"
// PodLegacyType is the pod type for backwards compatibility with the old pod inspect code.
// This allows us to use the shared inspect code but still provide the correct output format
// when podman pod inspect was called.
PodLegacyType = "pod-legacy"
// VolumeType is the volume type
VolumeType = "volume"
)