diff options
author | Sujil02 <sushah@redhat.com> | 2020-05-05 22:29:54 -0400 |
---|---|---|
committer | Sujil02 <sushah@redhat.com> | 2020-05-11 17:03:32 -0400 |
commit | 1c6ae73a898222a14b98526339d9985c51f88d35 (patch) | |
tree | 0abf9eebf0625817cf92b77e03348543402d96b3 /pkg/api/handlers/libpod | |
parent | dc7d6f4818f4b986cfd15208d53f6765d8fad986 (diff) | |
download | podman-1c6ae73a898222a14b98526339d9985c51f88d35.tar.gz podman-1c6ae73a898222a14b98526339d9985c51f88d35.tar.bz2 podman-1c6ae73a898222a14b98526339d9985c51f88d35.zip |
Adds tunnel routes for system reset.
Adds tunnel routes for system reset.
Makes forces flag local as options are not propogated down the stack.
Adds relevant test cases and swagger docs.
Signed-off-by: Sujil02 <sushah@redhat.com>
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r-- | pkg/api/handlers/libpod/system.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/system.go b/pkg/api/handlers/libpod/system.go index 98e33bf10..72a38db63 100644 --- a/pkg/api/handlers/libpod/system.go +++ b/pkg/api/handlers/libpod/system.go @@ -69,3 +69,13 @@ func SystemPrune(w http.ResponseWriter, r *http.Request) { } utils.WriteResponse(w, http.StatusOK, systemPruneReport) } + +// SystemReset Resets podman storage back to default state +func SystemReset(w http.ResponseWriter, r *http.Request) { + err := r.Context().Value("runtime").(*libpod.Runtime).Reset(r.Context()) + if err != nil { + utils.InternalServerError(w, err) + return + } + utils.WriteResponse(w, http.StatusOK, nil) +} |