storage: API fixups

github.com/containers/image/types.ImageReference.NewImage() can take a
*github.com/containers/image/types.SystemContext now, so pass it one if
pkg/storage/imageService.CanPull() has one to give it.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2017-11-27 18:46:10 -05:00
parent 0651d3a8de
commit 553979e1fc

View file

@ -184,7 +184,11 @@ func (svc *imageService) CanPull(imageName string, options *copy.Options) (bool,
if err != nil { if err != nil {
return false, err return false, err
} }
src, err := image.FromSource(rawSource) sourceCtx := &types.SystemContext{}
if options.SourceCtx != nil {
sourceCtx = options.SourceCtx
}
src, err := image.FromSource(sourceCtx, rawSource)
if err != nil { if err != nil {
rawSource.Close() rawSource.Close()
return false, err return false, err