mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Update API plugin response examples
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
885cd5fbe5
commit
4735c76632
2 changed files with 48 additions and 83 deletions
127
api/swagger.yaml
127
api/swagger.yaml
|
@ -1393,26 +1393,33 @@ definitions:
|
||||||
Name:
|
Name:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "some-mount"
|
||||||
Description:
|
Description:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "This is a mount that's used by the plugin."
|
||||||
Settable:
|
Settable:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
Source:
|
Source:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "/var/lib/docker/plugins/"
|
||||||
Destination:
|
Destination:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "/mnt/state"
|
||||||
Type:
|
Type:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "bind"
|
||||||
Options:
|
Options:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example:
|
||||||
|
- "rbind"
|
||||||
|
- "rw"
|
||||||
PluginDevice:
|
PluginDevice:
|
||||||
type: "object"
|
type: "object"
|
||||||
required: [Name, Description, Settable, Path]
|
required: [Name, Description, Settable, Path]
|
||||||
|
@ -1430,6 +1437,7 @@ definitions:
|
||||||
type: "string"
|
type: "string"
|
||||||
Path:
|
Path:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "/dev/fuse"
|
||||||
|
|
||||||
PluginEnv:
|
PluginEnv:
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -1471,13 +1479,16 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
Id:
|
Id:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
|
||||||
Name:
|
Name:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "tiborvass/sample-volume-plugin"
|
||||||
Enabled:
|
Enabled:
|
||||||
description: "True when the plugin is running. False when the plugin is not running, only installed."
|
description: "True if the plugin is running. False if the plugin is not running, only installed."
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: true
|
||||||
Settings:
|
Settings:
|
||||||
description: "Settings that can be modified by users."
|
description: "Settings that can be modified by users."
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -1492,6 +1503,8 @@ definitions:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example:
|
||||||
|
- "DEBUG=0"
|
||||||
Args:
|
Args:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
|
@ -1504,6 +1517,7 @@ definitions:
|
||||||
description: "plugin remote reference used to push/pull the plugin"
|
description: "plugin remote reference used to push/pull the plugin"
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "localhost:5000/tiborvass/sample-volume-plugin:latest"
|
||||||
Config:
|
Config:
|
||||||
description: "The config of a plugin."
|
description: "The config of a plugin."
|
||||||
type: "object"
|
type: "object"
|
||||||
|
@ -1527,12 +1541,15 @@ definitions:
|
||||||
description: "Docker Version used to create the plugin"
|
description: "Docker Version used to create the plugin"
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "17.06.0-ce"
|
||||||
Description:
|
Description:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "A sample volume plugin for Docker"
|
||||||
Documentation:
|
Documentation:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "https://docs.docker.com/engine/extend/plugins/"
|
||||||
Interface:
|
Interface:
|
||||||
description: "The interface between Docker and the plugin"
|
description: "The interface between Docker and the plugin"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
@ -1543,16 +1560,23 @@ definitions:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/PluginInterfaceType"
|
$ref: "#/definitions/PluginInterfaceType"
|
||||||
|
example:
|
||||||
|
- "docker.volumedriver/1.0"
|
||||||
Socket:
|
Socket:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "plugins.sock"
|
||||||
Entrypoint:
|
Entrypoint:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example:
|
||||||
|
- "/usr/bin/sample-volume-plugin"
|
||||||
|
- "/data"
|
||||||
WorkDir:
|
WorkDir:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "/bin/"
|
||||||
User:
|
User:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
@ -1560,9 +1584,11 @@ definitions:
|
||||||
UID:
|
UID:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
format: "uint32"
|
format: "uint32"
|
||||||
|
example: 1000
|
||||||
GID:
|
GID:
|
||||||
type: "integer"
|
type: "integer"
|
||||||
format: "uint32"
|
format: "uint32"
|
||||||
|
example: 1000
|
||||||
Network:
|
Network:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
@ -1571,6 +1597,7 @@ definitions:
|
||||||
Type:
|
Type:
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "host"
|
||||||
Linux:
|
Linux:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
@ -1580,9 +1607,13 @@ definitions:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example:
|
||||||
|
- "CAP_SYS_ADMIN"
|
||||||
|
- "CAP_SYSLOG"
|
||||||
AllowAllDevices:
|
AllowAllDevices:
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: false
|
||||||
Devices:
|
Devices:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
|
@ -1590,12 +1621,15 @@ definitions:
|
||||||
PropagatedMount:
|
PropagatedMount:
|
||||||
type: "string"
|
type: "string"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: "/mnt/volumes"
|
||||||
IpcHost:
|
IpcHost:
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: false
|
||||||
PidHost:
|
PidHost:
|
||||||
type: "boolean"
|
type: "boolean"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
example: false
|
||||||
Mounts:
|
Mounts:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
|
@ -1604,6 +1638,11 @@ definitions:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/PluginEnv"
|
$ref: "#/definitions/PluginEnv"
|
||||||
|
example:
|
||||||
|
- Name: "DEBUG"
|
||||||
|
Description: "If set, prints debug messages"
|
||||||
|
Settable: null
|
||||||
|
Value: "0"
|
||||||
Args:
|
Args:
|
||||||
type: "object"
|
type: "object"
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
|
@ -1612,9 +1651,11 @@ definitions:
|
||||||
Name:
|
Name:
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "args"
|
||||||
Description:
|
Description:
|
||||||
x-nullable: false
|
x-nullable: false
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "command line arguments"
|
||||||
Settable:
|
Settable:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
|
@ -1628,50 +1669,14 @@ definitions:
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
type: "string"
|
type: "string"
|
||||||
|
example: "layers"
|
||||||
diff_ids:
|
diff_ids:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
type: "string"
|
type: "string"
|
||||||
example:
|
example:
|
||||||
Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
|
- "sha256:675532206fbf3030b8458f88d6e26d4eb1577688a25efec97154c94e8b6b4887"
|
||||||
Name: "tiborvass/sample-volume-plugin"
|
- "sha256:e216a057b1cb1efc11f8a268f37ef62083e70b1b38323ba252e25ac88904a7e8"
|
||||||
Tag: "latest"
|
|
||||||
Active: true
|
|
||||||
Settings:
|
|
||||||
Env:
|
|
||||||
- "DEBUG=0"
|
|
||||||
Args: null
|
|
||||||
Devices: null
|
|
||||||
Config:
|
|
||||||
Description: "A sample volume plugin for Docker"
|
|
||||||
Documentation: "https://docs.docker.com/engine/extend/plugins/"
|
|
||||||
Interface:
|
|
||||||
Types:
|
|
||||||
- "docker.volumedriver/1.0"
|
|
||||||
Socket: "plugins.sock"
|
|
||||||
Entrypoint:
|
|
||||||
- "/usr/bin/sample-volume-plugin"
|
|
||||||
- "/data"
|
|
||||||
WorkDir: ""
|
|
||||||
User: {}
|
|
||||||
Network:
|
|
||||||
Type: ""
|
|
||||||
Linux:
|
|
||||||
Capabilities: null
|
|
||||||
AllowAllDevices: false
|
|
||||||
Devices: null
|
|
||||||
Mounts: null
|
|
||||||
PropagatedMount: "/data"
|
|
||||||
Env:
|
|
||||||
- Name: "DEBUG"
|
|
||||||
Description: "If set, prints debug messages"
|
|
||||||
Settable: null
|
|
||||||
Value: "0"
|
|
||||||
Args:
|
|
||||||
Name: "args"
|
|
||||||
Description: "command line arguments"
|
|
||||||
Settable: null
|
|
||||||
Value: []
|
|
||||||
|
|
||||||
ObjectVersion:
|
ObjectVersion:
|
||||||
description: |
|
description: |
|
||||||
|
@ -6931,46 +6936,6 @@ paths:
|
||||||
type: "array"
|
type: "array"
|
||||||
items:
|
items:
|
||||||
$ref: "#/definitions/Plugin"
|
$ref: "#/definitions/Plugin"
|
||||||
example:
|
|
||||||
- Id: "5724e2c8652da337ab2eedd19fc6fc0ec908e4bd907c7421bf6a8dfc70c4c078"
|
|
||||||
Name: "tiborvass/sample-volume-plugin"
|
|
||||||
Tag: "latest"
|
|
||||||
Active: true
|
|
||||||
Settings:
|
|
||||||
Env:
|
|
||||||
- "DEBUG=0"
|
|
||||||
Args: null
|
|
||||||
Devices: null
|
|
||||||
Config:
|
|
||||||
Description: "A sample volume plugin for Docker"
|
|
||||||
Documentation: "https://docs.docker.com/engine/extend/plugins/"
|
|
||||||
Interface:
|
|
||||||
Types:
|
|
||||||
- "docker.volumedriver/1.0"
|
|
||||||
Socket: "plugins.sock"
|
|
||||||
Entrypoint:
|
|
||||||
- "/usr/bin/sample-volume-plugin"
|
|
||||||
- "/data"
|
|
||||||
WorkDir: ""
|
|
||||||
User: {}
|
|
||||||
Network:
|
|
||||||
Type: ""
|
|
||||||
Linux:
|
|
||||||
Capabilities: null
|
|
||||||
AllowAllDevices: false
|
|
||||||
Devices: null
|
|
||||||
Mounts: null
|
|
||||||
PropagatedMount: "/data"
|
|
||||||
Env:
|
|
||||||
- Name: "DEBUG"
|
|
||||||
Description: "If set, prints debug messages"
|
|
||||||
Settable: null
|
|
||||||
Value: "0"
|
|
||||||
Args:
|
|
||||||
Name: "args"
|
|
||||||
Description: "command line arguments"
|
|
||||||
Settable: null
|
|
||||||
Value: []
|
|
||||||
500:
|
500:
|
||||||
description: "Server error"
|
description: "Server error"
|
||||||
schema:
|
schema:
|
||||||
|
|
|
@ -11,7 +11,7 @@ type Plugin struct {
|
||||||
// Required: true
|
// Required: true
|
||||||
Config PluginConfig `json:"Config"`
|
Config PluginConfig `json:"Config"`
|
||||||
|
|
||||||
// True when the plugin is running. False when the plugin is not running, only installed.
|
// True if the plugin is running. False if the plugin is not running, only installed.
|
||||||
// Required: true
|
// Required: true
|
||||||
Enabled bool `json:"Enabled"`
|
Enabled bool `json:"Enabled"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue