+// Management API: send SIGTERM to specified container's crunch-run
+// process now.
+func (disp *dispatcher) apiContainerKill(w http.ResponseWriter, r *http.Request) {
+ uuid := r.FormValue("container_uuid")
+ if uuid == "" {
+ httpserver.Error(w, "container_uuid parameter not provided", http.StatusBadRequest)
+ return
+ }
+ if !disp.pool.KillContainer(uuid, "via management API: "+r.FormValue("reason")) {
+ httpserver.Error(w, "container not found", http.StatusNotFound)
+ return
+ }
+}
+