From 03c29c357fb21d69ed878dcfea29f99c7a369f25 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 11 May 2020 15:13:32 -0500 Subject: add podman remote system df Signed-off-by: Brent Baude --- pkg/bindings/system/system.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'pkg/bindings/system/system.go') diff --git a/pkg/bindings/system/system.go b/pkg/bindings/system/system.go index f1c40cd75..e567e7a86 100644 --- a/pkg/bindings/system/system.go +++ b/pkg/bindings/system/system.go @@ -134,3 +134,18 @@ func Reset(ctx context.Context) error { } return response.Process(response) } + +// DiskUsage returns information about image, container, and volume disk +// consumption +func DiskUsage(ctx context.Context) (*entities.SystemDfReport, error) { + var report entities.SystemDfReport + conn, err := bindings.GetClient(ctx) + if err != nil { + return nil, err + } + response, err := conn.DoRequest(nil, http.MethodGet, "/system/df", nil) + if err != nil { + return nil, err + } + return &report, response.Process(&report) +} -- cgit v1.2.3-54-g00ecf