diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-10-04 07:30:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-04 07:30:27 -0700 |
commit | c9e936a40796824422011515f2fe445f93451f31 (patch) | |
tree | fdab943f3efda62d030e42f7347cf02d7caa3943 /pkg/varlinkapi | |
parent | 1fe955600979f54ada204afa6c357fd094d6f549 (diff) | |
parent | dacbc5beb2a8841e52cf8ea7f544b4d302469c1d (diff) | |
download | podman-c9e936a40796824422011515f2fe445f93451f31.tar.gz podman-c9e936a40796824422011515f2fe445f93451f31.tar.bz2 podman-c9e936a40796824422011515f2fe445f93451f31.zip |
Merge pull request #3549 from marcov/evict-container
Add ability to evict a container
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r-- | pkg/varlinkapi/containers.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go index 93f9d4fe3..79fcef11a 100644 --- a/pkg/varlinkapi/containers.go +++ b/pkg/varlinkapi/containers.go @@ -508,7 +508,16 @@ func (i *LibpodAPI) RemoveContainer(call iopodman.VarlinkCall, name string, forc return call.ReplyErrorOccurred(err.Error()) } return call.ReplyRemoveContainer(ctr.ID()) +} +// EvictContainer ... +func (i *LibpodAPI) EvictContainer(call iopodman.VarlinkCall, name string, removeVolumes bool) error { + ctx := getContext() + id, err := i.Runtime.EvictContainer(ctx, name, removeVolumes) + if err != nil { + return call.ReplyErrorOccurred(err.Error()) + } + return call.ReplyEvictContainer(id) } // DeleteStoppedContainers ... |