From fceecc3a5bb48280fb40f7547156fda44e313421 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 18 Nov 2021 09:22:33 +0100 Subject: remote checkpoint/restore: more fixes * Support `checkpoint --pre-checkpoint` * Support `checkpoint --with-previous` * Disable `restore --import-previous` for the remote client since we had to send two files which in turn would require to tar them up and hence be a breaking change. Podman 4.0 would be the chance and I hope we'll find time before that to remote-restore prettier. Note that I did not run over swagger yet to check whether all parameters are actually documented due to time constraints. Fixes: #12334 Signed-off-by: Valentin Rothberg --- pkg/bindings/containers/types.go | 2 ++ .../containers/types_checkpoint_options.go | 30 ++++++++++++++++++++++ 2 files changed, 32 insertions(+) (limited to 'pkg/bindings') diff --git a/pkg/bindings/containers/types.go b/pkg/bindings/containers/types.go index 4bbb4a62b..9f7986cbd 100644 --- a/pkg/bindings/containers/types.go +++ b/pkg/bindings/containers/types.go @@ -51,6 +51,8 @@ type CheckpointOptions struct { LeaveRunning *bool TCPEstablished *bool PrintStats *bool + PreCheckpoint *bool + WithPrevious *bool } //go:generate go run ../generator/generator.go RestoreOptions diff --git a/pkg/bindings/containers/types_checkpoint_options.go b/pkg/bindings/containers/types_checkpoint_options.go index b606922e0..6301564e2 100644 --- a/pkg/bindings/containers/types_checkpoint_options.go +++ b/pkg/bindings/containers/types_checkpoint_options.go @@ -106,3 +106,33 @@ func (o *CheckpointOptions) GetPrintStats() bool { } return *o.PrintStats } + +// WithPreCheckpoint set field PreCheckpoint to given value +func (o *CheckpointOptions) WithPreCheckpoint(value bool) *CheckpointOptions { + o.PreCheckpoint = &value + return o +} + +// GetPreCheckpoint returns value of field PreCheckpoint +func (o *CheckpointOptions) GetPreCheckpoint() bool { + if o.PreCheckpoint == nil { + var z bool + return z + } + return *o.PreCheckpoint +} + +// WithWithPrevious set field WithPrevious to given value +func (o *CheckpointOptions) WithWithPrevious(value bool) *CheckpointOptions { + o.WithPrevious = &value + return o +} + +// GetWithPrevious returns value of field WithPrevious +func (o *CheckpointOptions) GetWithPrevious() bool { + if o.WithPrevious == nil { + var z bool + return z + } + return *o.WithPrevious +} -- cgit v1.2.3-54-g00ecf