diff options
author | Qi Wang <qiwan@redhat.com> | 2020-04-23 15:36:47 -0400 |
---|---|---|
committer | Qi Wang <qiwan@redhat.com> | 2020-05-06 10:54:28 -0400 |
commit | 5621f5199d0aeaefae77db920866d7aeea9d1e7b (patch) | |
tree | 93ade2da60914f8de8d0745b0ef7da9a154f1db1 /pkg/domain/infra/tunnel/manifest.go | |
parent | 0eb905ff2c2f033ee3009d8d374dcd2347ac04d1 (diff) | |
download | podman-5621f5199d0aeaefae77db920866d7aeea9d1e7b.tar.gz podman-5621f5199d0aeaefae77db920866d7aeea9d1e7b.tar.bz2 podman-5621f5199d0aeaefae77db920866d7aeea9d1e7b.zip |
Manifest remove, push
Implements podman manifest remove and podman manifest push.
Signed-off-by: Qi Wang <qiwan@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/manifest.go')
-rw-r--r-- | pkg/domain/infra/tunnel/manifest.go | 15 |
1 files changed, 15 insertions, 0 deletions
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 +} |