summaryrefslogtreecommitdiff
path: root/libpod/image/pull.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-18 23:53:46 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-23 12:44:38 +0000
commit4e285b52c1281db8ef7dff54071f016531ba7e88 (patch)
tree67f7f148da7fd731abaf934f441c420eb539bf51 /libpod/image/pull.go
parente20409d42760b29eea757625f651b073cdf7dadc (diff)
downloadpodman-4e285b52c1281db8ef7dff54071f016531ba7e88.tar.gz
podman-4e285b52c1281db8ef7dff54071f016531ba7e88.tar.bz2
podman-4e285b52c1281db8ef7dff54071f016531ba7e88.zip
Split Runtime.pullRefPairsFromRefNames from Image.createNamesToPull
This will have another user shortly. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1112 Approved by: rhatdan
Diffstat (limited to 'libpod/image/pull.go')
-rw-r--r--libpod/image/pull.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index 31cf5f875..a8d5f518c 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")
}