mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
Merge pull request #13514 from Luap99/bindings
fix breaking change in pkg/bindings
This commit is contained in:
2
Makefile
2
Makefile
@ -192,7 +192,7 @@ endif
|
|||||||
# dependencies. This is only used for the Windows installer task (podman.msi), which must
|
# dependencies. This is only used for the Windows installer task (podman.msi), which must
|
||||||
# include this lightweight helper binary.
|
# include this lightweight helper binary.
|
||||||
#
|
#
|
||||||
GV_GITURL=git://github.com/containers/gvisor-tap-vsock.git
|
GV_GITURL=https://github.com/containers/gvisor-tap-vsock.git
|
||||||
GV_SHA=e943b1806d94d387c4c38d96719432d50a84bbd0
|
GV_SHA=e943b1806d94d387c4c38d96719432d50a84bbd0
|
||||||
|
|
||||||
###
|
###
|
||||||
|
@ -79,7 +79,14 @@ func Restore(ctx context.Context, nameOrID string, options *RestoreOptions) (*en
|
|||||||
|
|
||||||
// Open the to-be-imported archive if needed.
|
// Open the to-be-imported archive if needed.
|
||||||
var r io.Reader
|
var r io.Reader
|
||||||
if i := options.GetImportArchive(); i != "" {
|
i := options.GetImportArchive()
|
||||||
|
if i == "" {
|
||||||
|
// backwards compat, ImportAchive is a typo but we still have to
|
||||||
|
// support this to avoid breaking users
|
||||||
|
// TODO: remove ImportAchive with 5.0
|
||||||
|
i = options.GetImportAchive()
|
||||||
|
}
|
||||||
|
if i != "" {
|
||||||
params.Set("import", "true")
|
params.Set("import", "true")
|
||||||
r, err = os.Open(i)
|
r, err = os.Open(i)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -64,6 +64,13 @@ type RestoreOptions struct {
|
|||||||
IgnoreVolumes *bool
|
IgnoreVolumes *bool
|
||||||
IgnoreStaticIP *bool
|
IgnoreStaticIP *bool
|
||||||
IgnoreStaticMAC *bool
|
IgnoreStaticMAC *bool
|
||||||
|
// ImportAchive is the path to an archive which contains the checkpoint data.
|
||||||
|
//
|
||||||
|
// Deprecated: Use ImportArchive instead. This field name is a typo and
|
||||||
|
// will be removed in a future major release.
|
||||||
|
ImportAchive *string
|
||||||
|
// ImportArchive is the path to an archive which contains the checkpoint data.
|
||||||
|
// ImportArchive is preferred over ImportAchive when both are set.
|
||||||
ImportArchive *string
|
ImportArchive *string
|
||||||
Keep *bool
|
Keep *bool
|
||||||
Name *string
|
Name *string
|
||||||
|
@ -77,6 +77,21 @@ func (o *RestoreOptions) GetIgnoreStaticMAC() bool {
|
|||||||
return *o.IgnoreStaticMAC
|
return *o.IgnoreStaticMAC
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithImportAchive set field ImportAchive to given value
|
||||||
|
func (o *RestoreOptions) WithImportAchive(value string) *RestoreOptions {
|
||||||
|
o.ImportAchive = &value
|
||||||
|
return o
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetImportAchive returns value of field ImportAchive
|
||||||
|
func (o *RestoreOptions) GetImportAchive() string {
|
||||||
|
if o.ImportAchive == nil {
|
||||||
|
var z string
|
||||||
|
return z
|
||||||
|
}
|
||||||
|
return *o.ImportAchive
|
||||||
|
}
|
||||||
|
|
||||||
// WithImportArchive set field ImportArchive to given value
|
// WithImportArchive set field ImportArchive to given value
|
||||||
func (o *RestoreOptions) WithImportArchive(value string) *RestoreOptions {
|
func (o *RestoreOptions) WithImportArchive(value string) *RestoreOptions {
|
||||||
o.ImportArchive = &value
|
o.ImportArchive = &value
|
||||||
|
Reference in New Issue
Block a user