diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-07-27 22:20:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 22:20:45 +0200 |
commit | a5de8314188d7376f645d8ac6c6f7a6f685b6a45 (patch) | |
tree | 6d92b92aa6e53b84372018798771f7f868dbfc99 /pkg/bindings | |
parent | 22b3fe59e8d77fc08bca7ce22015feb85962e547 (diff) | |
parent | 0aec93edcaf77785ef43c74700a9cd36375641cf (diff) | |
download | podman-a5de8314188d7376f645d8ac6c6f7a6f685b6a45.tar.gz podman-a5de8314188d7376f645d8ac6c6f7a6f685b6a45.tar.bz2 podman-a5de8314188d7376f645d8ac6c6f7a6f685b6a45.zip |
Merge pull request #11049 from vrothberg/fix-7370
support container to container copy
Diffstat (limited to 'pkg/bindings')
-rw-r--r-- | pkg/bindings/containers/types.go | 2 | ||||
-rw-r--r-- | pkg/bindings/containers/types_copy_options.go | 16 |
2 files changed, 18 insertions, 0 deletions
diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go index 1058c7a48..39492077b 100644 --- a/pkg/bindings/containers/types.go +++ b/pkg/bindings/containers/types.go @@ -263,4 +263,6 @@ type CopyOptions struct { // If used with CopyFromArchive and set to true it will change ownership of files from the source tar archive // to the primary uid/gid of the target container. Chown *bool `schema:"copyUIDGID"` + // Map to translate path names. + Rename map[string]string } diff --git a/pkg/bindings/containers/types_copy_options.go b/pkg/bindings/containers/types_copy_options.go index 12ad085fd..0624b450e 100644 --- a/pkg/bindings/containers/types_copy_options.go +++ b/pkg/bindings/containers/types_copy_options.go @@ -35,3 +35,19 @@ func (o *CopyOptions) GetChown() bool { } return *o.Chown } + +// WithRename +func (o *CopyOptions) WithRename(value map[string]string) *CopyOptions { + v := value + o.Rename = v + return o +} + +// GetRename +func (o *CopyOptions) GetRename() map[string]string { + var rename map[string]string + if o.Rename == nil { + return rename + } + return o.Rename +} |