From 1c6ae73a898222a14b98526339d9985c51f88d35 Mon Sep 17 00:00:00 2001 From: Sujil02 Date: Tue, 5 May 2020 22:29:54 -0400 Subject: 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 --- pkg/bindings/system/system.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'pkg/bindings/system') 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) +} -- cgit v1.2.3-54-g00ecf