mirror of
https://github.com/moby/moby.git
synced 2026-01-11 10:41:43 +00:00
api/types: rename disk usage fields
Signed-off-by: Austin Vazquez <austin.vazquez@docker.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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.
|
||||
//
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
}))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
4
vendor/github.com/moby/moby/api/types/build/disk_usage.go
generated
vendored
4
vendor/github.com/moby/moby/api/types/build/disk_usage.go
generated
vendored
@@ -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.
|
||||
//
|
||||
|
||||
4
vendor/github.com/moby/moby/api/types/container/disk_usage.go
generated
vendored
4
vendor/github.com/moby/moby/api/types/container/disk_usage.go
generated
vendored
@@ -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.
|
||||
//
|
||||
|
||||
4
vendor/github.com/moby/moby/api/types/image/disk_usage.go
generated
vendored
4
vendor/github.com/moby/moby/api/types/image/disk_usage.go
generated
vendored
@@ -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.
|
||||
//
|
||||
|
||||
12
vendor/github.com/moby/moby/api/types/volume/disk_usage.go
generated
vendored
12
vendor/github.com/moby/moby/api/types/volume/disk_usage.go
generated
vendored
@@ -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"`
|
||||
}
|
||||
|
||||
16
vendor/github.com/moby/moby/client/system_disk_usage.go
generated
vendored
16
vendor/github.com/moby/moby/client/system_disk_usage.go
generated
vendored
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user