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/bindings/system/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/bindings/system/system.go')
-rw-r--r-- | pkg/bindings/system/system.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go index caef6af6f..f1c40cd75 100644 --- a/pkg/bindings/system/system.go +++ b/pkg/bindings/system/system.go @@ -121,3 +121,16 @@ func Version(ctx context.Context) (*entities.SystemVersionReport, error) { } return &report, err } + +// Reset removes all unused system data. +func Reset(ctx context.Context) error { + conn, err := bindings.GetClient(ctx) + if err != nil { + return err + } + response, err := conn.DoRequest(nil, http.MethodPost, "/system/reset", nil) + if err != nil { + return err + } + return response.Process(response) +} |