summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-18 23:48:35 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-23 12:44:38 +0000
commite20409d42760b29eea757625f651b073cdf7dadc (patch)
tree51af40432e9334211532f7bd9fcde2b239304c4a /libpod
parentde4a41d8211dc6b6ca3ce80b4229d59dd7054729 (diff)
downloadpodman-e20409d42760b29eea757625f651b073cdf7dadc.tar.gz
podman-e20409d42760b29eea757625f651b073cdf7dadc.tar.bz2
podman-e20409d42760b29eea757625f651b073cdf7dadc.zip
Rename nameToPull to pullRefName
We will use it not only in createNamesToPull, but also in getPullListFromRef soon. Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1112 Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/pull.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/libpod/image/pull.go b/libpod/image/pull.go
index bf5b97ab3..31cf5f875 100644
--- a/libpod/image/pull.go
+++ b/libpod/image/pull.go
@@ -57,6 +57,13 @@ type pullRefPair struct {
dstRef types.ImageReference
}
+// pullRefName records a prepared source reference and a destination name to try to pull (if not DockerArchive) or to pull all (if DockerArchive)
+type pullRefName struct {
+ image string
+ srcRef types.ImageReference
+ dstName string
+}
+
func (ir *Runtime) getPullRefPair(srcRef types.ImageReference, destName string) (*pullRefPair, error) {
imgPart, err := decompose(destName)
if err == nil && !imgPart.hasRegistry {
@@ -257,18 +264,11 @@ func (i *Image) pullImage(ctx context.Context, writer io.Writer, authfile, signa
return images, nil
}
-// nameToPull is a mapping between a resolved source and an expected store destination name (FIXME: clean up somehow?)
-type nameToPull struct {
- image string
- srcRef types.ImageReference
- dstName string
-}
-
// createNamesToPull looks at a decomposed image and determines the possible
// images names to try pulling in combination with the registries.conf file as well
func (i *Image) createNamesToPull() ([]*pullRefPair, error) {
var (
- pullNames []*nameToPull
+ pullNames []*pullRefName
imageName string
)
@@ -286,7 +286,7 @@ func (i *Image) createNamesToPull() ([]*pullRefPair, error) {
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", i.InputName)
}
- ps := nameToPull{
+ ps := pullRefName{
image: i.InputName,
srcRef: srcRef,
}
@@ -312,7 +312,7 @@ func (i *Image) createNamesToPull() ([]*pullRefPair, error) {
if err != nil {
return nil, errors.Wrapf(err, "unable to parse '%s'", i.InputName)
}
- ps := nameToPull{
+ ps := pullRefName{
image: decomposedImage.assemble(),
srcRef: srcRef,
}