summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2021-09-21 16:40:36 +0200
committerValentin Rothberg <rothberg@redhat.com>2021-09-22 12:38:07 +0200
commit49c5688a30ac29b258196d0be73cc7f09a9705cb (patch)
tree7625a2f58f524a3373d30438d0bed57f6b919cfd /pkg/bindings
parente9214ce81e45d227dc5017da0c252fbd601605a8 (diff)
downloadpodman-49c5688a30ac29b258196d0be73cc7f09a9705cb.tar.gz
podman-49c5688a30ac29b258196d0be73cc7f09a9705cb.tar.bz2
podman-49c5688a30ac29b258196d0be73cc7f09a9705cb.zip
podman save: add `--uncompressed`
Add an option to `podman save` to allow uncompressed layers when copying OCI images. Do the neccessary plumbing for the remote client, add tests and vendor in the latest commit from c/common to fetch the neccessary changes in libimage. Closes: #11613 Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/images/types.go2
-rw-r--r--pkg/bindings/images/types_export_options.go15
2 files changed, 17 insertions, 0 deletions
diff --git a/pkg/bindings/images/types.go b/pkg/bindings/images/types.go
index 801f5ed96..6ff9f18ec 100644
--- a/pkg/bindings/images/types.go
+++ b/pkg/bindings/images/types.go
@@ -65,6 +65,8 @@ type ExportOptions struct {
Compress *bool
// Format of the output
Format *string
+ // Accept uncompressed layers when copying OCI images.
+ OciAcceptUncompressedLayers *bool
}
//go:generate go run ../generator/generator.go PruneOptions
diff --git a/pkg/bindings/images/types_export_options.go b/pkg/bindings/images/types_export_options.go
index 6229e435c..649b6814e 100644
--- a/pkg/bindings/images/types_export_options.go
+++ b/pkg/bindings/images/types_export_options.go
@@ -46,3 +46,18 @@ func (o *ExportOptions) GetFormat() string {
}
return *o.Format
}
+
+// WithOciAcceptUncompressedLayers set field OciAcceptUncompressedLayers to given value
+func (o *ExportOptions) WithOciAcceptUncompressedLayers(value bool) *ExportOptions {
+ o.OciAcceptUncompressedLayers = &value
+ return o
+}
+
+// GetOciAcceptUncompressedLayers returns value of field OciAcceptUncompressedLayers
+func (o *ExportOptions) GetOciAcceptUncompressedLayers() bool {
+ if o.OciAcceptUncompressedLayers == nil {
+ var z bool
+ return z
+ }
+ return *o.OciAcceptUncompressedLayers
+}