summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2018-07-28 04:27:22 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-01 18:22:59 +0000
commit4dab4d97de57759e62bb37ad5d47743e7e0e4b12 (patch)
treeae8a2825468f6b37be50f7069c1381429beeb2ff /libpod
parent86fb1bf8eb311551626e5877938a7d9d5aee6dac (diff)
downloadpodman-4dab4d97de57759e62bb37ad5d47743e7e0e4b12.tar.gz
podman-4dab4d97de57759e62bb37ad5d47743e7e0e4b12.tar.bz2
podman-4dab4d97de57759e62bb37ad5d47743e7e0e4b12.zip
RFC: Rename Image.PushImage to Image.PushImageToHeuristicDestination
The goal is to be very explicit about which functions try to heuristically guess what is the expected format of the string. Not quite "shaming" the users, but making sure they stand out. RFC: - Is this at all acceptable? Desirable? - varlink ExportImage says "destination must have transport type"; should it be using alltransports.ParseImageReference + PushImageToReference, then? (While touching the call in cmd/podman, also remove a commented-out older version of the call.) Should not change behavior (but does not add unit tests). Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
Diffstat (limited to 'libpod')
-rw-r--r--libpod/image/image.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go
index 0c070154f..d07412d9c 100644
--- a/libpod/image/image.go
+++ b/libpod/image/image.go
@@ -514,8 +514,9 @@ func (i *Image) UntagImage(tag string) error {
return nil
}
-// PushImage pushes the given image to a location described by the given path
-func (i *Image) PushImage(ctx context.Context, destination, manifestMIMEType, authFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, forceSecure bool, additionalDockerArchiveTags []reference.NamedTagged) error {
+// PushImageToHeuristicDestination pushes the given image to "destination", which is heuristically parsed.
+// Use PushImageToReference if the destination is known precisely.
+func (i *Image) PushImageToHeuristicDestination(ctx context.Context, destination, manifestMIMEType, authFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, forceSecure bool, additionalDockerArchiveTags []reference.NamedTagged) error {
if destination == "" {
return errors.Wrapf(syscall.EINVAL, "destination image name must be specified")
}