diff options
author | Miloslav Trmač <mitr@redhat.com> | 2018-07-18 23:53:46 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-23 12:44:38 +0000 |
commit | 4e285b52c1281db8ef7dff54071f016531ba7e88 (patch) | |
tree | 67f7f148da7fd731abaf934f441c420eb539bf51 | |
parent | e20409d42760b29eea757625f651b073cdf7dadc (diff) | |
download | podman-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
-rw-r--r-- | libpod/image/pull.go | 6 |
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") } |