summaryrefslogtreecommitdiff
path: root/pkg/domain
diff options
context:
space:
mode:
authorcdoern <cdoern@redhat.com>2021-06-25 14:26:33 -0400
committercdoern <cdoern@redhat.com>2021-07-30 17:19:24 -0400
commit1d10ca739f3599b9bd746783ad15c8f51ce9f75c (patch)
tree28565571d2e564fc367ca6ad97eccc9ffc3c9d19 /pkg/domain
parentec5ab591ddbb905b69b3daa6012e9c0dfde9fcec (diff)
downloadpodman-1d10ca739f3599b9bd746783ad15c8f51ce9f75c.tar.gz
podman-1d10ca739f3599b9bd746783ad15c8f51ce9f75c.tar.bz2
podman-1d10ca739f3599b9bd746783ad15c8f51ce9f75c.zip
Created scp.go image_scp_test.go and podman-image-scp.1.md
added functionality for image secure copying from local to remote. Also moved system connection add code around a bit so functions within that file can be used by scp. Signed-off-by: cdoern <cdoern@redhat.com>
Diffstat (limited to 'pkg/domain')
-rw-r--r--pkg/domain/entities/images.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/pkg/domain/entities/images.go b/pkg/domain/entities/images.go
index 3140a47c5..262b09cad 100644
--- a/pkg/domain/entities/images.go
+++ b/pkg/domain/entities/images.go
@@ -1,6 +1,7 @@
package entities
import (
+ "net/url"
"time"
"github.com/containers/common/pkg/config"
@@ -306,6 +307,28 @@ type ImageSaveOptions struct {
Quiet bool
}
+// ImageScpOptions provide options for securely copying images to podman remote
+type ImageScpOptions struct {
+ // SoureImageName is the image the user is providing to load on a remote machine
+ SourceImageName string
+ // Tag allows for a new image to be created under the given name
+ Tag string
+ // ToRemote specifies that we are loading to the remote host
+ ToRemote bool
+ // FromRemote specifies that we are loading from the remote host
+ FromRemote bool
+ // Connections holds the raw string values for connections (ssh or unix)
+ Connections []string
+ // URI contains the ssh connection URLs to be used by the client
+ URI []*url.URL
+ // Iden contains ssh identity keys to be used by the client
+ Iden []string
+ // Save Options used for first half of the scp operation
+ Save ImageSaveOptions
+ // Load options used for the second half of the scp operation
+ Load ImageLoadOptions
+}
+
// ImageTreeOptions provides options for ImageEngine.Tree()
type ImageTreeOptions struct {
WhatRequires bool // Show all child images and layers of the specified image