From 7e7d0ab5e60ed680b8ef0461403eb2eea35cb448 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Thu, 20 Oct 2016 13:31:32 -0700 Subject: [PATCH] Update volume type and regenerate types generation fixed some comments. Signed-off-by: Daniel Nephin --- api/swagger.yaml | 12 +++++++----- api/types/plugin.go | 12 ++++++------ api/types/volume.go | 7 ++++--- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/api/swagger.yaml b/api/swagger.yaml index d79b2348af..84676ac431 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -857,7 +857,7 @@ definitions: Volume: type: "object" - required: [Name, Driver, Mountpoint, Labels, Scope] + required: [Name, Driver, Mountpoint, Labels, Scope, Options] properties: Name: type: "string" @@ -894,10 +894,11 @@ definitions: default: "local" x-nullable: false enum: ["local", "global"] - RefCount: - type: "integer" - default: -1 - x-nullable: false + Options: + type: "object" + description: "The driver specific options used when creating the volume." + additionalProperties: + type: "string" UsageData: type: "object" required: [Size, RefCount] @@ -909,6 +910,7 @@ definitions: x-nullable: false RefCount: type: "integer" + default: -1 description: "The number of containers referencing this volume." x-nullable: false diff --git a/api/types/plugin.go b/api/types/plugin.go index 66a7877768..82d036fa0b 100644 --- a/api/types/plugin.go +++ b/api/types/plugin.go @@ -31,7 +31,7 @@ type Plugin struct { Tag string `json:"Tag"` } -// PluginConfigSettings that can be modified by users. +// PluginConfig Settings that can be modified by users. // swagger:model PluginConfig type PluginConfig struct { @@ -52,7 +52,7 @@ type PluginConfig struct { Mounts []PluginMount `json:"Mounts"` } -// PluginManifestThe manifest of a plugin. +// PluginManifest The manifest of a plugin. // swagger:model PluginManifest type PluginManifest struct { @@ -108,7 +108,7 @@ type PluginManifest struct { Workdir string `json:"Workdir"` } -// PluginManifestArgsplugin manifest args +// PluginManifestArgs plugin manifest args // swagger:model PluginManifestArgs type PluginManifestArgs struct { @@ -129,7 +129,7 @@ type PluginManifestArgs struct { Value []string `json:"Value"` } -// PluginManifestInterfaceThe interface between Docker and the plugin +// PluginManifestInterface The interface between Docker and the plugin // swagger:model PluginManifestInterface type PluginManifestInterface struct { @@ -142,7 +142,7 @@ type PluginManifestInterface struct { Types []PluginInterfaceType `json:"Types"` } -// PluginManifestNetworkplugin manifest network +// PluginManifestNetwork plugin manifest network // swagger:model PluginManifestNetwork type PluginManifestNetwork struct { @@ -151,7 +151,7 @@ type PluginManifestNetwork struct { Type string `json:"Type"` } -// PluginManifestUserplugin manifest user +// PluginManifestUser plugin manifest user // swagger:model PluginManifestUser type PluginManifestUser struct { diff --git a/api/types/volume.go b/api/types/volume.go index 6f13f60a71..f2db0cda7b 100644 --- a/api/types/volume.go +++ b/api/types/volume.go @@ -23,8 +23,9 @@ type Volume struct { // Required: true Name string `json:"Name"` - // ref count - RefCount int64 `json:"RefCount,omitempty"` + // The driver specific options used when creating the volume. + // Required: true + Options map[string]string `json:"Options"` // The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level. // Required: true @@ -43,7 +44,7 @@ type Volume struct { UsageData *VolumeUsageData `json:"UsageData,omitempty"` } -// VolumeUsageDatavolume usage data +// VolumeUsageData volume usage data // swagger:model VolumeUsageData type VolumeUsageData struct {