summaryrefslogtreecommitdiff
path: root/pkg/bindings/system/system.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-12 03:32:20 -0700
committerGitHub <noreply@github.com>2020-05-12 03:32:20 -0700
commitcaf46abd3a4af1ff065400573f19e69109cbb647 (patch)
tree38865f10301708992186073fe5923fd3afef57a3 /pkg/bindings/system/system.go
parent171dd10125a4b4195409f05ea45fb505021f2ce8 (diff)
parent1c6ae73a898222a14b98526339d9985c51f88d35 (diff)
downloadpodman-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.go13
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)
+}