1
0
mirror of https://github.com/moby/moby.git synced 2025-08-01 05:47:11 +03:00

Merge pull request #27294 from mlaventure/hide-unused-volume-fields

Move types.Volumes optional fields under a new type
This commit is contained in:
Sebastiaan van Stijn
2016-10-11 23:55:25 +02:00
committed by GitHub
5 changed files with 21 additions and 19 deletions

View File

@ -433,6 +433,12 @@ type MountPoint struct {
Propagation mount.Propagation
}
// VolumeUsageData holds information regarding the volume usage
type VolumeUsageData struct {
Size int64 // Size holds how much disk space is used by the (local driver only). Sets to -1 if not provided.
RefCount int // RefCount holds the number of containers having this volume attached to them. Sets to -1 if not provided.
}
// Volume represents the configuration of a volume for the remote API
type Volume struct {
Name string // Name is the name of the volume
@ -441,8 +447,7 @@ type Volume struct {
Status map[string]interface{} `json:",omitempty"` // Status provides low-level status information about the volume
Labels map[string]string // Labels is metadata specific to the volume
Scope string // Scope describes the level at which the volume exists (e.g. `global` for cluster-wide or `local` for machine level)
Size int64 // Size holds how much disk space is used by the (local driver only). Sets to -1 if not provided.
RefCount int // RefCount holds the number of containers having this volume attached to them. Sets to -1 if not provided.
UsageData *VolumeUsageData `json:",omitempty"`
}
// VolumesListResponse contains the response for the remote API: