mirror of
https://github.com/containers/podman.git
synced 2025-10-17 03:04:21 +08:00
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>
This commit is contained in:
@ -571,7 +571,7 @@ func (s *PodmanSessionIntegration) InspectContainerToJSON() []define.InspectCont
|
||||
func (s *PodmanSessionIntegration) InspectPodToJSON() define.InspectPodData {
|
||||
var i define.InspectPodData
|
||||
err := jsoniter.Unmarshal(s.Out.Contents(), &i)
|
||||
Expect(err).To(BeNil())
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
return i
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user