api/types/system: add type specific usage fields to DiskUsage

This change adds type specific fields to `GET /system/df` endpoint with high level information of disk usage. This change also introduces `verbose` query to the endpoint so that detailed information is by default excluded unless queried to reduce memory consumption. The previous top level `DiskUsage` fields (`Images`, `Containers`, `Volumes` and `BuildCache`) are now deprecated and kept for backwards compatibility.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
Austin Vazquez
2025-10-20 15:11:53 -05:00
parent bb27db85fb
commit a69abdd90d
27 changed files with 1633 additions and 437 deletions

View File

@@ -95,6 +95,13 @@ generate_model types/storage <<- 'EOT'
Storage
EOT
generate_model types/system <<- 'EOT'
BuildCacheDiskUsage
ContainersDiskUsage
ImagesDiskUsage
VolumesDiskUsage
EOT
generate_model types/swarm <<- 'EOT'
ServiceCreateResponse
ServiceUpdateResponse