summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/tunnel/images.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-21 05:07:30 -0400
committerGitHub <noreply@github.com>2020-04-21 05:07:30 -0400
commit90636fe8c2d1eb5ae75afa73405c8b12a0417fca (patch)
treec6e320c49d6d223e4009a3ee5a54793777579c82 /pkg/domain/infra/tunnel/images.go
parent89276a5f92717c4c6a299ca2be182a3797d9c90d (diff)
parent09dc701097ac874c3885fa58ed4f143c29ae83f0 (diff)
downloadpodman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.tar.gz
podman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.tar.bz2
podman-90636fe8c2d1eb5ae75afa73405c8b12a0417fca.zip
Merge pull request #5863 from vrothberg/v2-fix-rmi
podman rmi: refactor logic
Diffstat (limited to 'pkg/domain/infra/tunnel/images.go')
-rw-r--r--pkg/domain/infra/tunnel/images.go21
1 files changed, 2 insertions, 19 deletions
diff --git a/pkg/domain/infra/tunnel/images.go b/pkg/domain/infra/tunnel/images.go
index 2decd605d..822842936 100644
--- a/pkg/domain/infra/tunnel/images.go
+++ b/pkg/domain/infra/tunnel/images.go
@@ -19,25 +19,8 @@ func (ir *ImageEngine) Exists(_ context.Context, nameOrId string) (*entities.Boo
return &entities.BoolReport{Value: found}, err
}
-func (ir *ImageEngine) Delete(ctx context.Context, nameOrId []string, opts entities.ImageDeleteOptions) (*entities.ImageDeleteReport, error) {
- report := entities.ImageDeleteReport{}
-
- for _, id := range nameOrId {
- results, err := images.Remove(ir.ClientCxt, id, &opts.Force)
- if err != nil {
- return nil, err
- }
- for _, e := range results {
- if a, ok := e["Deleted"]; ok {
- report.Deleted = append(report.Deleted, a)
- }
-
- if a, ok := e["Untagged"]; ok {
- report.Untagged = append(report.Untagged, a)
- }
- }
- }
- return &report, nil
+func (ir *ImageEngine) Remove(ctx context.Context, imagesArg []string, opts entities.ImageRemoveOptions) (*entities.ImageRemoveReport, error) {
+ return images.Remove(ir.ClientCxt, imagesArg, opts)
}
func (ir *ImageEngine) List(ctx context.Context, opts entities.ImageListOptions) ([]*entities.ImageSummary, error) {