diff options
author | Marco Vedovati <mvedovati@suse.com> | 2019-07-05 12:54:07 +0200 |
---|---|---|
committer | Marco Vedovati <mvedovati@suse.com> | 2019-09-25 19:44:38 +0200 |
commit | dacbc5beb2a8841e52cf8ea7f544b4d302469c1d (patch) | |
tree | 59789993d8dafec7b96ca1eb7a31b3959c50e7b0 /libpod/state.go | |
parent | 83b2348313c52cc3e20d72285a9d81d3d72c2d5d (diff) | |
download | podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.tar.gz podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.tar.bz2 podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.zip |
rm: add containers eviction with `rm --force`
Add ability to evict a container when it becomes unusable. This may
happen when the host setup changes after a container creation, making it
impossible for that container to be used or removed.
Evicting a container is done using the `rm --force` command.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Diffstat (limited to 'libpod/state.go')
-rw-r--r-- | libpod/state.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/state.go b/libpod/state.go index 40080d2cc..e38f820b5 100644 --- a/libpod/state.go +++ b/libpod/state.go @@ -58,6 +58,9 @@ type State interface { // If the container is not in the set namespace, an error will be // returned. Container(id string) (*Container, error) + // Return a container ID from the database by full or partial ID or full + // name. + LookupContainerID(idOrName string) (string, error) // Return a container from the database by full or partial ID or full // name. // Containers not in the set namespace will be ignored. @@ -98,6 +101,9 @@ type State interface { // returned. AllContainers() ([]*Container, error) + // Return a container config from the database by full ID + GetContainerConfig(id string) (*ContainerConfig, error) + // PLEASE READ FULL DESCRIPTION BEFORE USING. // Rewrite a container's configuration. // This function breaks libpod's normal prohibition on a read-only |