summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-12 09:05:03 -0700
committerGitHub <noreply@github.com>2020-05-12 09:05:03 -0700
commit38c4b9bcc0296a1fe7efc5bb6058e8aaa5ecae6f (patch)
tree7964cf7e1dd1ed54c58bd7b30dcd80bbdbfcc752 /pkg/bindings
parentd6d94cfdd7104c036e7def993f22abb962c5762a (diff)
parent03c29c357fb21d69ed878dcfea29f99c7a369f25 (diff)
downloadpodman-38c4b9bcc0296a1fe7efc5bb6058e8aaa5ecae6f.tar.gz
podman-38c4b9bcc0296a1fe7efc5bb6058e8aaa5ecae6f.tar.bz2
podman-38c4b9bcc0296a1fe7efc5bb6058e8aaa5ecae6f.zip
Merge pull request #6182 from baude/v2remotedf
add podman remote system df
Diffstat (limited to 'pkg/bindings')
-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)
+}