summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/images.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-09-30 11:57:31 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-09-30 11:57:31 +0200
commit1a3e4094125f22a8e121e5208d61167078635148 (patch)
treee1e1b8bfb5491952dcf8d32ec21f24a08df634fa /pkg/domain/infra/tunnel/images.go
parentb68b6f334d4a83de35d68cc359365b348e72ad6b (diff)
downloadpodman-1a3e4094125f22a8e121e5208d61167078635148.tar.gz
podman-1a3e4094125f22a8e121e5208d61167078635148.tar.bz2
podman-1a3e4094125f22a8e121e5208d61167078635148.zip
fix remote untag
Fix the remote client to untag all tags of the specified image. Instead of querying the image on the client side, support the case where both, repo and tag, are empty and remove all tags. Reuse the ABI implementation where possible. In retrospective, the libpod untag endpoint should support a slice of strings to batch remove tags rather than reaching out for each tag individually. Enable the skipped test. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r--pkg/domain/infra/tunnel/images.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 981884109..61ac2141c 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -9,7 +9,6 @@ import (
"github.com/containers/common/pkg/config"
"github.com/containers/image/v5/docker/reference"
- "github.com/containers/podman/v2/pkg/bindings"
images "github.com/containers/podman/v2/pkg/bindings/images"
"github.com/containers/podman/v2/pkg/domain/entities"
"github.com/containers/podman/v2/pkg/domain/utils"
@@ -139,13 +138,8 @@ func (ir *ImageEngine) Tag(ctx context.Context, nameOrID string, tags []string,
}
func (ir *ImageEngine) Untag(ctx context.Context, nameOrID string, tags []string, options entities.ImageUntagOptions) error {
- // Remove all tags if none are provided
if len(tags) == 0 {
- newImage, err := images.GetImage(ir.ClientCxt, nameOrID, bindings.PFalse)
- if err != nil {
- return err
- }
- tags = newImage.NamesHistory
+ return images.Untag(ir.ClientCxt, nameOrID, "", "")
}
for _, newTag := range tags {