podman-remote send name and tag

when loading an image with podman-remote load, we need to send a name and a tag to the endpoint

Fixes: #7124

Backported-by: Valentin Rothberg <rothberg@redhat.com>
Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude 2020-08-04 12:52:45 -05:00 • committed by Valentin Rothberg
parent 729e0aa0d1
commit c5646acf4a
2 changed files with 6 additions and 2 deletions

View file

@ -188,7 +188,11 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
return nil, err
}
defer f.Close()
return images.Load(ir.ClientCxt, f, &opts.Name)
ref := opts.Name
if len(opts.Tag) > 0 {
ref += ":" + opts.Tag
}
return images.Load(ir.ClientCxt, f, &ref)
}
func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {

View file

@ -74,7 +74,7 @@ verify_iid_and_name() {
verify_iid_and_name $img_name
}
@test "podman load - NAME and NAME:TAG arguments work (requires: #2674)" {
@test "podman load - NAME and NAME:TAG arguments work" {
get_iid_and_name
run_podman save $iid -o $archive
run_podman rmi $iid