diff --git a/api/docs/v1.52.yaml b/api/docs/v1.52.yaml index 52e286a071..ff16fb7a41 100644 --- a/api/docs/v1.52.yaml +++ b/api/docs/v1.52.yaml @@ -2066,13 +2066,13 @@ definitions: description: | represents system data usage for image resources. properties: - ActiveImages: + ActiveCount: description: | Count of active images. type: "integer" format: "int64" example: 1 - TotalImages: + TotalCount: description: | Count of all images. type: "integer" @@ -2248,13 +2248,13 @@ definitions: description: | represents system data usage for volume resources. properties: - ActiveVolumes: + ActiveCount: description: | Count of active volumes. type: "integer" format: "int64" example: 1 - TotalVolumes: + TotalCount: description: | Count of all volumes. type: "integer" @@ -2861,13 +2861,13 @@ definitions: description: | represents system data usage for build cache resources. properties: - ActiveBuildCacheRecords: + ActiveCount: description: | Count of active build cache records. type: "integer" format: "int64" example: 1 - TotalBuildCacheRecords: + TotalCount: description: | Count of all build cache records. type: "integer" @@ -5584,13 +5584,13 @@ definitions: description: | represents system data usage information for container resources. properties: - ActiveContainers: + ActiveCount: description: | Count of active containers. type: "integer" format: "int64" example: 1 - TotalContainers: + TotalCount: description: | Count of all containers. type: "integer" diff --git a/api/swagger.yaml b/api/swagger.yaml index 52e286a071..ff16fb7a41 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -2066,13 +2066,13 @@ definitions: description: | represents system data usage for image resources. properties: - ActiveImages: + ActiveCount: description: | Count of active images. type: "integer" format: "int64" example: 1 - TotalImages: + TotalCount: description: | Count of all images. type: "integer" @@ -2248,13 +2248,13 @@ definitions: description: | represents system data usage for volume resources. properties: - ActiveVolumes: + ActiveCount: description: | Count of active volumes. type: "integer" format: "int64" example: 1 - TotalVolumes: + TotalCount: description: | Count of all volumes. type: "integer" @@ -2861,13 +2861,13 @@ definitions: description: | represents system data usage for build cache resources. properties: - ActiveBuildCacheRecords: + ActiveCount: description: | Count of active build cache records. type: "integer" format: "int64" example: 1 - TotalBuildCacheRecords: + TotalCount: description: | Count of all build cache records. type: "integer" @@ -5584,13 +5584,13 @@ definitions: description: | represents system data usage information for container resources. properties: - ActiveContainers: + ActiveCount: description: | Count of active containers. type: "integer" format: "int64" example: 1 - TotalContainers: + TotalCount: description: | Count of all containers. type: "integer" diff --git a/api/types/build/disk_usage.go b/api/types/build/disk_usage.go index a55e8545be..3613797dba 100644 --- a/api/types/build/disk_usage.go +++ b/api/types/build/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active build cache records. // // Example: 1 - ActiveBuildCacheRecords int64 `json:"ActiveBuildCacheRecords,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of build cache records. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all build cache records. // // Example: 4 - TotalBuildCacheRecords int64 `json:"TotalBuildCacheRecords,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by build cache records. // diff --git a/api/types/container/disk_usage.go b/api/types/container/disk_usage.go index dc0274b78e..c36721d3b0 100644 --- a/api/types/container/disk_usage.go +++ b/api/types/container/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active containers. // // Example: 1 - ActiveContainers int64 `json:"ActiveContainers,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of container summaries. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all containers. // // Example: 4 - TotalContainers int64 `json:"TotalContainers,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by containers. // diff --git a/api/types/image/disk_usage.go b/api/types/image/disk_usage.go index 568ea71cfa..7297813c1d 100644 --- a/api/types/image/disk_usage.go +++ b/api/types/image/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active images. // // Example: 1 - ActiveImages int64 `json:"ActiveImages,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of image summaries. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all images. // // Example: 4 - TotalImages int64 `json:"TotalImages,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by images. // diff --git a/api/types/volume/disk_usage.go b/api/types/volume/disk_usage.go index a0df0dc0fd..e2afbac659 100644 --- a/api/types/volume/disk_usage.go +++ b/api/types/volume/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active volumes. // // Example: 1 - ActiveVolumes int64 `json:"ActiveVolumes,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of volumes. // @@ -24,13 +24,13 @@ type DiskUsage struct { // Example: 12345678 Reclaimable int64 `json:"Reclaimable,omitempty"` + // Count of all volumes. + // + // Example: 4 + TotalCount int64 `json:"TotalCount,omitempty"` + // Disk space in use by volumes. // // Example: 98765432 TotalSize int64 `json:"TotalSize,omitempty"` - - // Count of all volumes. - // - // Example: 4 - TotalVolumes int64 `json:"TotalVolumes,omitempty"` } diff --git a/client/system_disk_usage.go b/client/system_disk_usage.go index bbe38b7f79..91f9fa2a92 100644 --- a/client/system_disk_usage.go +++ b/client/system_disk_usage.go @@ -162,9 +162,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis var r DiskUsageResult if idu := du.ImageUsage; idu != nil { r.Images = ImagesDiskUsage{ - ActiveImages: idu.ActiveImages, + ActiveImages: idu.ActiveCount, Reclaimable: idu.Reclaimable, - TotalImages: idu.TotalImages, + TotalImages: idu.TotalCount, TotalSize: idu.TotalSize, } @@ -175,9 +175,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if cdu := du.ContainerUsage; cdu != nil { r.Containers = ContainersDiskUsage{ - ActiveContainers: cdu.ActiveContainers, + ActiveContainers: cdu.ActiveCount, Reclaimable: cdu.Reclaimable, - TotalContainers: cdu.TotalContainers, + TotalContainers: cdu.TotalCount, TotalSize: cdu.TotalSize, } @@ -188,9 +188,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if bdu := du.BuildCacheUsage; bdu != nil { r.BuildCache = BuildCacheDiskUsage{ - ActiveBuildCacheRecords: bdu.ActiveBuildCacheRecords, + ActiveBuildCacheRecords: bdu.ActiveCount, Reclaimable: bdu.Reclaimable, - TotalBuildCacheRecords: bdu.TotalBuildCacheRecords, + TotalBuildCacheRecords: bdu.TotalCount, TotalSize: bdu.TotalSize, } @@ -201,9 +201,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if vdu := du.VolumeUsage; vdu != nil { r.Volumes = VolumesDiskUsage{ - ActiveVolumes: vdu.ActiveVolumes, + ActiveVolumes: vdu.ActiveCount, Reclaimable: vdu.Reclaimable, - TotalVolumes: vdu.TotalVolumes, + TotalVolumes: vdu.TotalCount, TotalSize: vdu.TotalSize, } diff --git a/client/system_disk_usage_test.go b/client/system_disk_usage_test.go index de96b42c42..1a805b9a85 100644 --- a/client/system_disk_usage_test.go +++ b/client/system_disk_usage_test.go @@ -29,11 +29,11 @@ func TestDiskUsage(t *testing.T) { return mockJSONResponse(http.StatusOK, nil, system.DiskUsage{ ImageUsage: &image.DiskUsage{ - ActiveImages: 0, - TotalImages: 0, - Reclaimable: 0, - TotalSize: 4096, - Items: []image.Summary{}, + ActiveCount: 0, + TotalCount: 0, + Reclaimable: 0, + TotalSize: 4096, + Items: []image.Summary{}, }, })(req) })) diff --git a/daemon/server/router/system/system_routes.go b/daemon/server/router/system/system_routes.go index 4a5317c217..b40d6c84f5 100644 --- a/daemon/server/router/system/system_routes.go +++ b/daemon/server/router/system/system_routes.go @@ -215,10 +215,10 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, var v system.DiskUsage if systemDiskUsage != nil && systemDiskUsage.Images != nil { v.ImageUsage = &image.DiskUsage{ - ActiveImages: systemDiskUsage.Images.ActiveCount, - Reclaimable: systemDiskUsage.Images.Reclaimable, - TotalImages: systemDiskUsage.Images.TotalCount, - TotalSize: systemDiskUsage.Images.TotalSize, + ActiveCount: systemDiskUsage.Images.ActiveCount, + Reclaimable: systemDiskUsage.Images.Reclaimable, + TotalCount: systemDiskUsage.Images.TotalCount, + TotalSize: systemDiskUsage.Images.TotalSize, } if legacyFields { @@ -230,10 +230,10 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, } if systemDiskUsage != nil && systemDiskUsage.Containers != nil { v.ContainerUsage = &container.DiskUsage{ - ActiveContainers: systemDiskUsage.Containers.ActiveCount, - Reclaimable: systemDiskUsage.Containers.Reclaimable, - TotalContainers: systemDiskUsage.Containers.TotalCount, - TotalSize: systemDiskUsage.Containers.TotalSize, + ActiveCount: systemDiskUsage.Containers.ActiveCount, + Reclaimable: systemDiskUsage.Containers.Reclaimable, + TotalCount: systemDiskUsage.Containers.TotalCount, + TotalSize: systemDiskUsage.Containers.TotalSize, } if legacyFields { @@ -244,10 +244,10 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, } if systemDiskUsage != nil && systemDiskUsage.Volumes != nil { v.VolumeUsage = &volume.DiskUsage{ - ActiveVolumes: systemDiskUsage.Volumes.ActiveCount, - TotalSize: systemDiskUsage.Volumes.TotalSize, - Reclaimable: systemDiskUsage.Volumes.Reclaimable, - TotalVolumes: systemDiskUsage.Volumes.TotalCount, + ActiveCount: systemDiskUsage.Volumes.ActiveCount, + TotalSize: systemDiskUsage.Volumes.TotalSize, + Reclaimable: systemDiskUsage.Volumes.Reclaimable, + TotalCount: systemDiskUsage.Volumes.TotalCount, } if legacyFields { @@ -258,10 +258,10 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, } if getBuildCache { v.BuildCacheUsage = &buildtypes.DiskUsage{ - TotalBuildCacheRecords: int64(len(buildCache)), + TotalCount: int64(len(buildCache)), } - activeCount := v.BuildCacheUsage.TotalBuildCacheRecords + activeCount := v.BuildCacheUsage.TotalCount var totalSize, reclaimable int64 for _, b := range buildCache { @@ -277,7 +277,7 @@ func (s *systemRouter) getDiskUsage(ctx context.Context, w http.ResponseWriter, } } - v.BuildCacheUsage.ActiveBuildCacheRecords = activeCount + v.BuildCacheUsage.ActiveCount = activeCount v.BuildCacheUsage.TotalSize = totalSize v.BuildCacheUsage.Reclaimable = reclaimable diff --git a/vendor/github.com/moby/moby/api/types/build/disk_usage.go b/vendor/github.com/moby/moby/api/types/build/disk_usage.go index a55e8545be..3613797dba 100644 --- a/vendor/github.com/moby/moby/api/types/build/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/build/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active build cache records. // // Example: 1 - ActiveBuildCacheRecords int64 `json:"ActiveBuildCacheRecords,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of build cache records. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all build cache records. // // Example: 4 - TotalBuildCacheRecords int64 `json:"TotalBuildCacheRecords,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by build cache records. // diff --git a/vendor/github.com/moby/moby/api/types/container/disk_usage.go b/vendor/github.com/moby/moby/api/types/container/disk_usage.go index dc0274b78e..c36721d3b0 100644 --- a/vendor/github.com/moby/moby/api/types/container/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/container/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active containers. // // Example: 1 - ActiveContainers int64 `json:"ActiveContainers,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of container summaries. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all containers. // // Example: 4 - TotalContainers int64 `json:"TotalContainers,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by containers. // diff --git a/vendor/github.com/moby/moby/api/types/image/disk_usage.go b/vendor/github.com/moby/moby/api/types/image/disk_usage.go index 568ea71cfa..7297813c1d 100644 --- a/vendor/github.com/moby/moby/api/types/image/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/image/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active images. // // Example: 1 - ActiveImages int64 `json:"ActiveImages,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of image summaries. // @@ -27,7 +27,7 @@ type DiskUsage struct { // Count of all images. // // Example: 4 - TotalImages int64 `json:"TotalImages,omitempty"` + TotalCount int64 `json:"TotalCount,omitempty"` // Disk space in use by images. // diff --git a/vendor/github.com/moby/moby/api/types/volume/disk_usage.go b/vendor/github.com/moby/moby/api/types/volume/disk_usage.go index a0df0dc0fd..e2afbac659 100644 --- a/vendor/github.com/moby/moby/api/types/volume/disk_usage.go +++ b/vendor/github.com/moby/moby/api/types/volume/disk_usage.go @@ -13,7 +13,7 @@ type DiskUsage struct { // Count of active volumes. // // Example: 1 - ActiveVolumes int64 `json:"ActiveVolumes,omitempty"` + ActiveCount int64 `json:"ActiveCount,omitempty"` // List of volumes. // @@ -24,13 +24,13 @@ type DiskUsage struct { // Example: 12345678 Reclaimable int64 `json:"Reclaimable,omitempty"` + // Count of all volumes. + // + // Example: 4 + TotalCount int64 `json:"TotalCount,omitempty"` + // Disk space in use by volumes. // // Example: 98765432 TotalSize int64 `json:"TotalSize,omitempty"` - - // Count of all volumes. - // - // Example: 4 - TotalVolumes int64 `json:"TotalVolumes,omitempty"` } diff --git a/vendor/github.com/moby/moby/client/system_disk_usage.go b/vendor/github.com/moby/moby/client/system_disk_usage.go index bbe38b7f79..91f9fa2a92 100644 --- a/vendor/github.com/moby/moby/client/system_disk_usage.go +++ b/vendor/github.com/moby/moby/client/system_disk_usage.go @@ -162,9 +162,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis var r DiskUsageResult if idu := du.ImageUsage; idu != nil { r.Images = ImagesDiskUsage{ - ActiveImages: idu.ActiveImages, + ActiveImages: idu.ActiveCount, Reclaimable: idu.Reclaimable, - TotalImages: idu.TotalImages, + TotalImages: idu.TotalCount, TotalSize: idu.TotalSize, } @@ -175,9 +175,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if cdu := du.ContainerUsage; cdu != nil { r.Containers = ContainersDiskUsage{ - ActiveContainers: cdu.ActiveContainers, + ActiveContainers: cdu.ActiveCount, Reclaimable: cdu.Reclaimable, - TotalContainers: cdu.TotalContainers, + TotalContainers: cdu.TotalCount, TotalSize: cdu.TotalSize, } @@ -188,9 +188,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if bdu := du.BuildCacheUsage; bdu != nil { r.BuildCache = BuildCacheDiskUsage{ - ActiveBuildCacheRecords: bdu.ActiveBuildCacheRecords, + ActiveBuildCacheRecords: bdu.ActiveCount, Reclaimable: bdu.Reclaimable, - TotalBuildCacheRecords: bdu.TotalBuildCacheRecords, + TotalBuildCacheRecords: bdu.TotalCount, TotalSize: bdu.TotalSize, } @@ -201,9 +201,9 @@ func (cli *Client) DiskUsage(ctx context.Context, options DiskUsageOptions) (Dis if vdu := du.VolumeUsage; vdu != nil { r.Volumes = VolumesDiskUsage{ - ActiveVolumes: vdu.ActiveVolumes, + ActiveVolumes: vdu.ActiveCount, Reclaimable: vdu.Reclaimable, - TotalVolumes: vdu.TotalVolumes, + TotalVolumes: vdu.TotalCount, TotalSize: vdu.TotalSize, }