summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/containers.go')
-rw-r--r--pkg/varlinkapi/containers.go9
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 ...