Pārlūkot izejas kodu

api/types: rename volume.VolumeUsageData to volume.UsageData

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 3 gadi atpakaļ
vecāks
revīzija
4caf68f4f6

+ 1 - 0
api/swagger.yaml

@@ -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

+ 2 - 2
api/types/deprecated.go

@@ -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
-type VolumeUsageData = volume.VolumeUsageData
+// Deprecated: use github.com/docker/docker/api/types/volume.UsageData
+type VolumeUsageData = volume.UsageData

+ 4 - 4
api/types/volume/volume.go

@@ -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
-type VolumeUsageData struct {
+// swagger:model UsageData
+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.

+ 1 - 1
volume/service/convert.go

@@ -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)