From 5621f5199d0aeaefae77db920866d7aeea9d1e7b Mon Sep 17 00:00:00 2001 From: Qi Wang Date: Thu, 23 Apr 2020 15:36:47 -0400 Subject: Manifest remove, push Implements podman manifest remove and podman manifest push. Signed-off-by: Qi Wang --- pkg/domain/infra/tunnel/manifest.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg/domain/infra/tunnel') diff --git a/pkg/domain/infra/tunnel/manifest.go b/pkg/domain/infra/tunnel/manifest.go index 3d3196019..7d9a0fce1 100644 --- a/pkg/domain/infra/tunnel/manifest.go +++ b/pkg/domain/infra/tunnel/manifest.go @@ -91,3 +91,18 @@ func (ir *ImageEngine) ManifestAnnotate(ctx context.Context, names []string, opt } return fmt.Sprintf("%s :%s", updatedListID, names[1]), nil } + +// ManifestRemove removes the digest from manifest list +func (ir *ImageEngine) ManifestRemove(ctx context.Context, names []string) (string, error) { + updatedListID, err := manifests.Remove(ctx, names[0], names[1]) + if err != nil { + return updatedListID, errors.Wrapf(err, "error removing from manifest %s", names[0]) + } + return fmt.Sprintf("%s :%s\n", updatedListID, names[1]), nil +} + +// ManifestPush pushes a manifest list or image index to the destination +func (ir *ImageEngine) ManifestPush(ctx context.Context, names []string, opts entities.ManifestPushOptions) error { + _, err := manifests.Push(ctx, names[0], &names[1], &opts.All) + return err +} -- cgit v1.2.3-54-g00ecf