diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-12 03:32:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 03:32:20 -0700 |
commit | caf46abd3a4af1ff065400573f19e69109cbb647 (patch) | |
tree | 38865f10301708992186073fe5923fd3afef57a3 /pkg/api/handlers/libpod/system.go | |
parent | 171dd10125a4b4195409f05ea45fb505021f2ce8 (diff) | |
parent | 1c6ae73a898222a14b98526339d9985c51f88d35 (diff) | |
download | podman-caf46abd3a4af1ff065400573f19e69109cbb647.tar.gz podman-caf46abd3a4af1ff065400573f19e69109cbb647.tar.bz2 podman-caf46abd3a4af1ff065400573f19e69109cbb647.zip |
Merge pull request #6101 from sujil02/systemreset-v2
Adds tunnel routes for system reset.
Diffstat (limited to 'pkg/api/handlers/libpod/system.go')
-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) +} |