diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-20 20:46:43 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2020-05-21 09:28:42 -0400 |
commit | a4c8198afd2b92b40b95c6fe01756cf2d0076cb6 (patch) | |
tree | bc447a449a45e27a73579e762f48fc0e05cd2e9b /cmd/podman/images | |
parent | 8db7b9ea219ef06c50919dcfabdfdca5676e1456 (diff) | |
download | podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.tar.gz podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.tar.bz2 podman-a4c8198afd2b92b40b95c6fe01756cf2d0076cb6.zip |
Fix remote handling of podman images calls
Enable three more tests
Fix handling of image filters
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/images')
-rw-r--r-- | cmd/podman/images/list.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go index 83c039ed3..022c90f71 100644 --- a/cmd/podman/images/list.go +++ b/cmd/podman/images/list.go @@ -85,7 +85,7 @@ func images(cmd *cobra.Command, args []string) error { return errors.New("cannot specify an image and a filter(s)") } - if len(listOptions.Filter) < 1 && len(args) > 0 { + if len(args) > 0 { listOptions.Filter = append(listOptions.Filter, "reference="+args[0]) } @@ -152,10 +152,16 @@ func writeTemplate(imageS []*entities.ImageSummary) error { ) imgs := make([]imageReporter, 0, len(imageS)) for _, e := range imageS { - for _, tag := range e.RepoTags { - var h imageReporter + var h imageReporter + if len(e.RepoTags) > 0 { + for _, tag := range e.RepoTags { + h.ImageSummary = *e + h.Repository, h.Tag = tokenRepoTag(tag) + imgs = append(imgs, h) + } + } else { h.ImageSummary = *e - h.Repository, h.Tag = tokenRepoTag(tag) + h.Repository = "<none>" imgs = append(imgs, h) } listFlag.readOnly = e.IsReadOnly() |