mirror of
https://github.com/containers/podman.git
synced 2025-06-19 08:09:12 +08:00
[CI:DOCS]update apiv2 documentation with swagger goods
Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -137,9 +137,6 @@ func Pods(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodInspect(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 404 no such
|
||||
// 500 internal
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
name := mux.Vars(r)["name"]
|
||||
pod, err := runtime.LookupPod(name)
|
||||
@ -222,10 +219,6 @@ func PodStop(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodStart(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 304 no modified
|
||||
// 404 no such
|
||||
// 500 internal
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
allContainersRunning := true
|
||||
name := mux.Vars(r)["name"]
|
||||
@ -267,9 +260,6 @@ func PodStart(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodDelete(w http.ResponseWriter, r *http.Request) {
|
||||
// 200
|
||||
// 404 no such
|
||||
// 500 internal
|
||||
var (
|
||||
runtime = r.Context().Value("runtime").(*libpod.Runtime)
|
||||
decoder = r.Context().Value("decoder").(*schema.Decoder)
|
||||
@ -295,13 +285,10 @@ func PodDelete(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, "Something went wrong", http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, "")
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
}
|
||||
|
||||
func PodRestart(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 404 no such
|
||||
// 500 internal
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
name := mux.Vars(r)["name"]
|
||||
pod, err := runtime.LookupPod(name)
|
||||
@ -318,8 +305,6 @@ func PodRestart(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodPrune(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 500 internal
|
||||
var (
|
||||
err error
|
||||
pods []*libpod.Pod
|
||||
@ -357,13 +342,10 @@ func PodPrune(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, "")
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
}
|
||||
|
||||
func PodPause(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 404 no such
|
||||
// 500 internal
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
name := mux.Vars(r)["name"]
|
||||
pod, err := runtime.LookupPod(name)
|
||||
@ -376,7 +358,7 @@ func PodPause(w http.ResponseWriter, r *http.Request) {
|
||||
utils.Error(w, "Something went wrong", http.StatusInternalServerError, err)
|
||||
return
|
||||
}
|
||||
utils.WriteResponse(w, http.StatusOK, "")
|
||||
utils.WriteResponse(w, http.StatusNoContent, "")
|
||||
}
|
||||
|
||||
func PodUnpause(w http.ResponseWriter, r *http.Request) {
|
||||
@ -399,10 +381,6 @@ func PodUnpause(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodKill(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 404 no such
|
||||
// 409 has conflict
|
||||
// 500 internal
|
||||
var (
|
||||
runtime = r.Context().Value("runtime").(*libpod.Runtime)
|
||||
decoder = r.Context().Value("decoder").(*schema.Decoder)
|
||||
@ -451,9 +429,6 @@ func PodKill(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func PodExists(w http.ResponseWriter, r *http.Request) {
|
||||
// 200 ok
|
||||
// 404 no such
|
||||
// 500 internal (needs work)
|
||||
runtime := r.Context().Value("runtime").(*libpod.Runtime)
|
||||
name := mux.Vars(r)["name"]
|
||||
_, err := runtime.LookupPod(name)
|
||||
|
Reference in New Issue
Block a user