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

Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
Brent Baude
2020-08-04 12:52:45 -05:00
parent d4cf3c589d
commit 77f7bf9a9c
2 changed files with 5 additions and 3 deletions

View File

@ -196,7 +196,11 @@ func (ir *ImageEngine) Load(ctx context.Context, opts entities.ImageLoadOptions)
return nil, err return nil, err
} }
defer f.Close() 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) { func (ir *ImageEngine) Import(ctx context.Context, opts entities.ImageImportOptions) (*entities.ImageImportReport, error) {

View File

@ -77,8 +77,6 @@ verify_iid_and_name() {
} }
@test "podman load - NAME and NAME:TAG arguments work" { @test "podman load - NAME and NAME:TAG arguments work" {
skip_if_remote "FIXME: pending #7124"
get_iid_and_name get_iid_and_name
run_podman save $iid -o $archive run_podman save $iid -o $archive
run_podman rmi $iid run_podman rmi $iid