diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-16 20:05:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-16 20:05:27 +0000 |
commit | 2af8851787d2c34d6264945372deaec4c387882a (patch) | |
tree | 29d25cc8cd50f804a36fa9f3d98032d5333757fb /pkg/domain/entities | |
parent | 5cba4dc2e490b5c652ba0821067b63d7b2e4cf8f (diff) | |
parent | 958759a71955860b01b17bd3bebf38f9dae1018e (diff) | |
download | podman-2af8851787d2c34d6264945372deaec4c387882a.tar.gz podman-2af8851787d2c34d6264945372deaec4c387882a.tar.bz2 podman-2af8851787d2c34d6264945372deaec4c387882a.zip |
Merge pull request #14299 from cdoern/podClone
implement podman pod clone
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r-- | pkg/domain/entities/engine_container.go | 1 | ||||
-rw-r--r-- | pkg/domain/entities/pods.go | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go index 6b70a3452..df42876f6 100644 --- a/pkg/domain/entities/engine_container.go +++ b/pkg/domain/entities/engine_container.go @@ -71,6 +71,7 @@ type ContainerEngine interface { PlayKube(ctx context.Context, body io.Reader, opts PlayKubeOptions) (*PlayKubeReport, error) PlayKubeDown(ctx context.Context, body io.Reader, opts PlayKubeDownOptions) (*PlayKubeReport, error) PodCreate(ctx context.Context, specg PodSpec) (*PodCreateReport, error) + PodClone(ctx context.Context, podClone PodCloneOptions) (*PodCloneReport, error) PodExists(ctx context.Context, nameOrID string) (*BoolReport, error) PodInspect(ctx context.Context, options PodInspectOptions) (*PodInspectReport, error) PodKill(ctx context.Context, namesOrIds []string, options PodKillOptions) ([]*PodKillReport, error) diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go index 3318fe7e1..19dc2fc4f 100644 --- a/pkg/domain/entities/pods.go +++ b/pkg/domain/entities/pods.go @@ -154,6 +154,16 @@ type PodLogsOptions struct { Color bool } +// PodCloneOptions contains options for cloning an existing pod +type PodCloneOptions struct { + ID string + Destroy bool + CreateOpts PodCreateOptions + InfraOptions ContainerCreateOptions + PerContainerOptions ContainerCreateOptions + Start bool +} + type ContainerCreateOptions struct { Annotation []string Attach []string @@ -290,6 +300,10 @@ type PodCreateReport struct { Id string //nolint:revive,stylecheck } +type PodCloneReport struct { + Id string //nolint +} + func (p *PodCreateOptions) CPULimits() *specs.LinuxCPU { cpu := &specs.LinuxCPU{} hasLimits := false |