From 4e285b52c1281db8ef7dff54071f016531ba7e88 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miloslav=20Trma=C4=8D?= <mitr@redhat.com>
Date: Wed, 18 Jul 2018 23:53:46 +0200
Subject: [PATCH] Split Runtime.pullRefPairsFromRefNames from
 Image.createNamesToPull
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This will have another user shortly.

Should not change behavior.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>

Closes: #1112
Approved by: rhatdan
---
 libpod/image/pull.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 31cf5f8757..a8d5f518cb 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -320,11 +320,15 @@ func (i *Image) createNamesToPull() ([]*pullRefPair, error) {
 			pullNames = append(pullNames, &ps)
 		}
 	}
+	return i.imageruntime.pullRefPairsFromRefNames(pullNames)
+}
 
+// pullRefPairsFromNames converts a []*pullRefName to []*pullRefPair
+func (ir *Runtime) pullRefPairsFromRefNames(pullNames []*pullRefName) ([]*pullRefPair, error) {
 	// Here we construct the destination references
 	res := make([]*pullRefPair, len(pullNames))
 	for j, pStruct := range pullNames {
-		destRef, err := is.Transport.ParseStoreReference(i.imageruntime.store, pStruct.dstName)
+		destRef, err := is.Transport.ParseStoreReference(ir.store, pStruct.dstName)
 		if err != nil {
 			return nil, errors.Wrapf(err, "error parsing dest reference name")
 		}