Переглянути джерело

Update volume type and regenerate types

generation fixed some comments.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
Daniel Nephin 8 роки тому
батько
коміт
7e7d0ab5e6
3 змінених файлів з 17 додано та 14 видалено
  1. 7 5
      api/swagger.yaml
  2. 6 6
      api/types/plugin.go
  3. 4 3
      api/types/volume.go

+ 7 - 5
api/swagger.yaml

@@ -857,7 +857,7 @@ definitions:
 
 
   Volume:
   Volume:
     type: "object"
     type: "object"
-    required: [Name, Driver, Mountpoint, Labels, Scope]
+    required: [Name, Driver, Mountpoint, Labels, Scope, Options]
     properties:
     properties:
       Name:
       Name:
         type: "string"
         type: "string"
@@ -894,10 +894,11 @@ definitions:
         default: "local"
         default: "local"
         x-nullable: false
         x-nullable: false
         enum: ["local", "global"]
         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:
       UsageData:
         type: "object"
         type: "object"
         required: [Size, RefCount]
         required: [Size, RefCount]
@@ -909,6 +910,7 @@ definitions:
             x-nullable: false
             x-nullable: false
           RefCount:
           RefCount:
             type: "integer"
             type: "integer"
+            default: -1
             description: "The number of containers referencing this volume."
             description: "The number of containers referencing this volume."
             x-nullable: false
             x-nullable: false
 
 

+ 6 - 6
api/types/plugin.go

@@ -31,7 +31,7 @@ type Plugin struct {
 	Tag string `json:"Tag"`
 	Tag string `json:"Tag"`
 }
 }
 
 
-// PluginConfigSettings that can be modified by users.
+// PluginConfig Settings that can be modified by users.
 // swagger:model PluginConfig
 // swagger:model PluginConfig
 type PluginConfig struct {
 type PluginConfig struct {
 
 
@@ -52,7 +52,7 @@ type PluginConfig struct {
 	Mounts []PluginMount `json:"Mounts"`
 	Mounts []PluginMount `json:"Mounts"`
 }
 }
 
 
-// PluginManifestThe manifest of a plugin.
+// PluginManifest The manifest of a plugin.
 // swagger:model PluginManifest
 // swagger:model PluginManifest
 type PluginManifest struct {
 type PluginManifest struct {
 
 
@@ -108,7 +108,7 @@ type PluginManifest struct {
 	Workdir string `json:"Workdir"`
 	Workdir string `json:"Workdir"`
 }
 }
 
 
-// PluginManifestArgsplugin manifest args
+// PluginManifestArgs plugin manifest args
 // swagger:model PluginManifestArgs
 // swagger:model PluginManifestArgs
 type PluginManifestArgs struct {
 type PluginManifestArgs struct {
 
 
@@ -129,7 +129,7 @@ type PluginManifestArgs struct {
 	Value []string `json:"Value"`
 	Value []string `json:"Value"`
 }
 }
 
 
-// PluginManifestInterfaceThe interface between Docker and the plugin
+// PluginManifestInterface The interface between Docker and the plugin
 // swagger:model PluginManifestInterface
 // swagger:model PluginManifestInterface
 type PluginManifestInterface struct {
 type PluginManifestInterface struct {
 
 
@@ -142,7 +142,7 @@ type PluginManifestInterface struct {
 	Types []PluginInterfaceType `json:"Types"`
 	Types []PluginInterfaceType `json:"Types"`
 }
 }
 
 
-// PluginManifestNetworkplugin manifest network
+// PluginManifestNetwork plugin manifest network
 // swagger:model PluginManifestNetwork
 // swagger:model PluginManifestNetwork
 type PluginManifestNetwork struct {
 type PluginManifestNetwork struct {
 
 
@@ -151,7 +151,7 @@ type PluginManifestNetwork struct {
 	Type string `json:"Type"`
 	Type string `json:"Type"`
 }
 }
 
 
-// PluginManifestUserplugin manifest user
+// PluginManifestUser plugin manifest user
 // swagger:model PluginManifestUser
 // swagger:model PluginManifestUser
 type PluginManifestUser struct {
 type PluginManifestUser struct {
 
 

+ 4 - 3
api/types/volume.go

@@ -23,8 +23,9 @@ type Volume struct {
 	// Required: true
 	// Required: true
 	Name string `json:"Name"`
 	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.
 	// The level at which the volume exists. Either `global` for cluster-wide, or `local` for machine level.
 	// Required: true
 	// Required: true
@@ -43,7 +44,7 @@ type Volume struct {
 	UsageData *VolumeUsageData `json:"UsageData,omitempty"`
 	UsageData *VolumeUsageData `json:"UsageData,omitempty"`
 }
 }
 
 
-// VolumeUsageDatavolume usage data
+// VolumeUsageData volume usage data
 // swagger:model VolumeUsageData
 // swagger:model VolumeUsageData
 type VolumeUsageData struct {
 type VolumeUsageData struct {