summaryrefslogtreecommitdiff
path: root/pkg/bindings/system/system.go
diff options
context:
space:
mode:
authorBrent Baude <bbaude@redhat.com>2020-05-11 15:13:32 -0500
committerBrent Baude <bbaude@redhat.com>2020-05-12 08:35:48 -0500
commit03c29c357fb21d69ed878dcfea29f99c7a369f25 (patch)
tree210f2309a7fe54ff56a7ac4d3cb3ad96e999c948 /pkg/bindings/system/system.go
parent07f775d161ef642cbbe5dc98071aa04d9312b17e (diff)
downloadpodman-03c29c357fb21d69ed878dcfea29f99c7a369f25.tar.gz
podman-03c29c357fb21d69ed878dcfea29f99c7a369f25.tar.bz2
podman-03c29c357fb21d69ed878dcfea29f99c7a369f25.zip
add podman remote system df
Signed-off-by: Brent Baude <bbaude@redhat.com>
Diffstat (limited to 'pkg/bindings/system/system.go')
-rw-r--r--pkg/bindings/system/system.go15
1 files changed, 15 insertions, 0 deletions
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)
+}