mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
Merge pull request #51437 from thaJeztah/diskusage_move_legacy
api: remove / internalize LegacyDiskUsage
This commit is contained in:
@@ -75,9 +75,11 @@ keywords: "API, Docker, rcli, REST, documentation"
|
||||
`BuildCacheUsage` fields with brief system disk usage data for each system object type.
|
||||
The endpoint supports the `?verbose=1` query to return verbose system disk usage information.
|
||||
* Deprecated: `GET /system/df` response fields `LayersSize`, `Images`, `Containers`,
|
||||
`Volumes`, and `BuildCache` are deprecated in favor of the type specific usage fields.
|
||||
The legacy fields will not be populated for new API versions that specify the `verbose`
|
||||
query.
|
||||
`Volumes`, and `BuildCache` have been removed in favor of the-type specific usage fields.
|
||||
API v1.52 returns both the legacy and current fields to help existing integrations
|
||||
to transition to the new response. The legacy fields are not populated if the
|
||||
`verbose` query parameter is used. Starting with API v1.53, the legacy fields
|
||||
will no longer be returned.
|
||||
|
||||
## v1.51 API changes
|
||||
|
||||
|
||||
@@ -24,27 +24,8 @@ const (
|
||||
// DiskUsage contains response of Engine API:
|
||||
// GET "/system/df"
|
||||
type DiskUsage struct {
|
||||
LegacyDiskUsage
|
||||
|
||||
ImageUsage *image.DiskUsage `json:"ImageUsage,omitempty"`
|
||||
ContainerUsage *container.DiskUsage `json:"ContainerUsage,omitempty"`
|
||||
VolumeUsage *volume.DiskUsage `json:"VolumeUsage,omitempty"`
|
||||
BuildCacheUsage *build.DiskUsage `json:"BuildCacheUsage,omitempty"`
|
||||
}
|
||||
|
||||
type LegacyDiskUsage struct {
|
||||
// Deprecated: kept to maintain backwards compatibility with API < v1.52, use [ImagesDiskUsage.TotalSize] instead.
|
||||
LayersSize int64 `json:"LayersSize,omitempty"`
|
||||
|
||||
// Deprecated: kept to maintain backwards compatibility with API < v1.52, use [ImagesDiskUsage.Items] instead.
|
||||
Images []image.Summary `json:"Images,omitzero"`
|
||||
|
||||
// Deprecated: kept to maintain backwards compatibility with API < v1.52, use [ContainersDiskUsage.Items] instead.
|
||||
Containers []container.Summary `json:"Containers,omitzero"`
|
||||
|
||||
// Deprecated: kept to maintain backwards compatibility with API < v1.52, use [VolumesDiskUsage.Items] instead.
|
||||
Volumes []volume.Volume `json:"Volumes,omitzero"`
|
||||
|
||||
// Deprecated: kept to maintain backwards compatibility with API < v1.52, use [BuildCacheDiskUsage.Items] instead.
|
||||
BuildCache []build.CacheRecord `json:"BuildCache,omitzero"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user