func RestRemovePool(w *rest.ResponseWriter, r *rest.Request, client *serviced.ControlClient) { poolId, err := url.QueryUnescape(r.PathParam("poolId")) if err != nil { RestBadRequest(w) return } var unused int err = client.RemoveResourcePool(poolId, &unused) if err != nil { glog.Error("Could not remove resource pool: ", err) RestServerError(w) return } glog.V(0).Info("Removed pool ", poolId) w.WriteJson(&SimpleResponse{"Removed resource pool", poolsLinks()}) }