summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/manifest.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-01-23 11:05:09 +0100
committerGitHub <noreply@github.com>2021-01-23 11:05:09 +0100
commit1305f7c47a4c324c3afd873a244fe2315249a25d (patch)
tree765fe7f70fafbd075bd110ce399225d45fc04597 /pkg/domain/infra/tunnel/manifest.go
parent474ba4c3acfc48fecb88814ba48f38e4da15ecae (diff)
parent6e6a38b4168ed7a528614f6499783243a8668395 (diff)
downloadpodman-1305f7c47a4c324c3afd873a244fe2315249a25d.tar.gz
podman-1305f7c47a4c324c3afd873a244fe2315249a25d.tar.bz2
podman-1305f7c47a4c324c3afd873a244fe2315249a25d.zip
Merge pull request #9067 from Luap99/podman-manifest-exists
podman manifest exists
Diffstat (limited to 'pkg/domain/infra/tunnel/manifest.go')
-rw-r--r--pkg/domain/infra/tunnel/manifest.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go
index 22ca44165..c12ba0045 100644
--- a/pkg/domain/infra/tunnel/manifest.go
+++ b/pkg/domain/infra/tunnel/manifest.go
@@ -23,6 +23,15 @@ func (ir *ImageEngine) ManifestCreate(ctx context.Context, names, images []strin
return imageID, err
}
+// ManifestExists checks if a manifest list with the given name exists
+func (ir *ImageEngine) ManifestExists(ctx context.Context, name string) (*entities.BoolReport, error) {
+ exists, err := manifests.Exists(ir.ClientCtx, name, nil)
+ if err != nil {
+ return nil, err
+ }
+ return &entities.BoolReport{Value: exists}, nil
+}
+
// ManifestInspect returns contents of manifest list with given name
func (ir *ImageEngine) ManifestInspect(ctx context.Context, name string) ([]byte, error) {
list, err := manifests.Inspect(ir.ClientCtx, name, nil)