summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorQi Wang <qiwan@redhat.com>2020-09-29 16:40:10 -0400
committerQi Wang <qiwan@redhat.com>2020-10-09 11:49:46 -0400
commit66798e993a1d3c111f15a85242cac1427c39f53e (patch)
treeead22c734350fa97d4fc1d611d1934be233f3c59 /pkg/domain
parent73488369586d387db0e4754fa56d5d0077a24940 (diff)
downloadpodman-66798e993a1d3c111f15a85242cac1427c39f53e.tar.gz
podman-66798e993a1d3c111f15a85242cac1427c39f53e.tar.bz2
podman-66798e993a1d3c111f15a85242cac1427c39f53e.zip
Search repository tags using --list-tags
For fix of BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1684263 Add --list-tags to podman search to return a table the repository tags. Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/images.go4
-rw-r--r--pkg/domain/infra/abi/images.go2
2 files changed, 6 insertions, 0 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index ac81c282d..982fa0cc0 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -214,6 +214,8 @@ type ImageSearchOptions struct {
NoTrunc bool
// SkipTLSVerify to skip HTTPS and certificate verification.
SkipTLSVerify types.OptionalBool
+ // ListTags search the available tags of the repository
+ ListTags bool
}
// ImageSearchReport is the response from searching images.
@@ -230,6 +232,8 @@ type ImageSearchReport struct {
Official string
// Automated indicates if the image was created by an automated build.
Automated string
+ // Tag is the repository tag
+ Tag string
}
// Image List Options
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index 3bb7de83c..f9d733c63 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -511,6 +511,7 @@ func (ir *ImageEngine) Search(ctx context.Context, term string, opts entities.Im
Limit: opts.Limit,
NoTrunc: opts.NoTrunc,
InsecureSkipTLSVerify: opts.SkipTLSVerify,
+ ListTags: opts.ListTags,
}
searchResults, err := image.SearchImages(term, searchOpts)
@@ -529,6 +530,7 @@ func (ir *ImageEngine) Search(ctx context.Context, term string, opts entities.Im
reports[i].Stars = searchResults[i].Stars
reports[i].Official = searchResults[i].Official
reports[i].Automated = searchResults[i].Automated
+ reports[i].Tag = searchResults[i].Tag
}
return reports, nil