api/types: rename volume.VolumeUsageData to volume.UsageData
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
3cae9fef16
commit
4caf68f4f6
|
@ -2009,6 +2009,7 @@ definitions:
|
||||||
UsageData:
|
UsageData:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-nullable: true
|
x-nullable: true
|
||||||
|
x-go-name: "UsageData"
|
||||||
required: [Size, RefCount]
|
required: [Size, RefCount]
|
||||||
description: |
|
description: |
|
||||||
Usage details about the volume. This information is used by the
|
Usage details about the volume. This information is used by the
|
||||||
|
|
|
@ -10,5 +10,5 @@ type Volume = volume.Volume
|
||||||
// VolumeUsageData Usage details about the volume. This information is used by the
|
// VolumeUsageData Usage details about the volume. This information is used by the
|
||||||
// `GET /system/df` endpoint, and omitted in other endpoints.
|
// `GET /system/df` endpoint, and omitted in other endpoints.
|
||||||
//
|
//
|
||||||
// Deprecated: use github.com/docker/docker/api/types/volume.VolumeUsageData
|
// Deprecated: use github.com/docker/docker/api/types/volume.UsageData
|
||||||
type VolumeUsageData = volume.VolumeUsageData
|
type VolumeUsageData = volume.UsageData
|
||||||
|
|
|
@ -47,14 +47,14 @@ type Volume struct {
|
||||||
Status map[string]interface{} `json:"Status,omitempty"`
|
Status map[string]interface{} `json:"Status,omitempty"`
|
||||||
|
|
||||||
// usage data
|
// usage data
|
||||||
UsageData *VolumeUsageData `json:"UsageData,omitempty"`
|
UsageData *UsageData `json:"UsageData,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeUsageData Usage details about the volume. This information is used by the
|
// UsageData Usage details about the volume. This information is used by the
|
||||||
// `GET /system/df` endpoint, and omitted in other endpoints.
|
// `GET /system/df` endpoint, and omitted in other endpoints.
|
||||||
//
|
//
|
||||||
// swagger:model VolumeUsageData
|
// swagger:model UsageData
|
||||||
type VolumeUsageData struct {
|
type UsageData struct {
|
||||||
|
|
||||||
// The number of containers referencing this volume. This field
|
// The number of containers referencing this volume. This field
|
||||||
// is set to `-1` if the reference-count is not available.
|
// is set to `-1` if the reference-count is not available.
|
||||||
|
|
|
@ -69,7 +69,7 @@ func (s *VolumesService) volumesToAPI(ctx context.Context, volumes []volume.Volu
|
||||||
logrus.WithError(err).WithField("volume", v.Name()).Warnf("Failed to determine size of volume")
|
logrus.WithError(err).WithField("volume", v.Name()).Warnf("Failed to determine size of volume")
|
||||||
sz = -1
|
sz = -1
|
||||||
}
|
}
|
||||||
apiV.UsageData = &volumetypes.VolumeUsageData{Size: sz, RefCount: int64(s.vs.CountReferences(v))}
|
apiV.UsageData = &volumetypes.UsageData{Size: sz, RefCount: int64(s.vs.CountReferences(v))}
|
||||||
}
|
}
|
||||||
|
|
||||||
out = append(out, &apiV)
|
out = append(out, &apiV)
|
||||||
|
|
Loading…
Reference in New Issue