diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-01-14 22:03:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-14 22:03:01 -0500 |
commit | 3fcf346890c0437611fc18c30d58cc2d9f61fe6c (patch) | |
tree | a948999192d2089474214f4307eb454a9d0c2c59 /pkg/domain/entities | |
parent | 8ce9995951b14a0a4d7252cdd97597411fd5f980 (diff) | |
parent | 997de2f8e9e5453a99108bde012aa6c41d7323ec (diff) | |
download | podman-3fcf346890c0437611fc18c30d58cc2d9f61fe6c.tar.gz podman-3fcf346890c0437611fc18c30d58cc2d9f61fe6c.tar.bz2 podman-3fcf346890c0437611fc18c30d58cc2d9f61fe6c.zip |
Merge pull request #8955 from mheon/rename
Container Rename
Diffstat (limited to 'pkg/domain/entities')
-rw-r--r-- | pkg/domain/entities/containers.go | 6 | ||||
-rw-r--r-- | pkg/domain/entities/engine_container.go | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index 96687b1de..d8576c101 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -434,3 +434,9 @@ type ContainerStatsReport struct { // Results, set when there is no error. Stats []define.ContainerStats } + +// ContainerRenameOptions describes input options for renaming a container. +type ContainerRenameOptions struct { + // NewName is the new name that will be given to the container. + NewName string +} diff --git a/pkg/domain/entities/engine_container.go b/pkg/domain/entities/engine_container.go index 7d38a97f2..d2552770c 100644 --- a/pkg/domain/entities/engine_container.go +++ b/pkg/domain/entities/engine_container.go @@ -37,6 +37,7 @@ type ContainerEngine interface { ContainerPause(ctx context.Context, namesOrIds []string, options PauseUnPauseOptions) ([]*PauseUnpauseReport, error) ContainerPort(ctx context.Context, nameOrID string, options ContainerPortOptions) ([]*ContainerPortReport, error) ContainerPrune(ctx context.Context, options ContainerPruneOptions) ([]*reports.PruneReport, error) + ContainerRename(ctr context.Context, nameOrID string, options ContainerRenameOptions) error ContainerRestart(ctx context.Context, namesOrIds []string, options RestartOptions) ([]*RestartReport, error) ContainerRestore(ctx context.Context, namesOrIds []string, options RestoreOptions) ([]*RestoreReport, error) ContainerRm(ctx context.Context, namesOrIds []string, options RmOptions) ([]*RmReport, error) |