dockerapi 0.12.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -0
- data/Gemfile.lock +3 -3
- data/README.md +69 -24
- data/dockerapi.gemspec +4 -3
- data/lib/docker/api/base.rb +101 -29
- data/lib/docker/api/config.rb +0 -4
- data/lib/docker/api/connection.rb +23 -17
- data/lib/docker/api/container.rb +306 -166
- data/lib/docker/api/error.rb +19 -3
- data/lib/docker/api/exec.rb +49 -40
- data/lib/docker/api/image.rb +201 -148
- data/lib/docker/api/network.rb +84 -54
- data/lib/docker/api/node.rb +47 -32
- data/lib/docker/api/plugin.rb +0 -6
- data/lib/docker/api/response.rb +27 -19
- data/lib/docker/api/secret.rb +1 -13
- data/lib/docker/api/service.rb +3 -24
- data/lib/docker/api/swarm.rb +70 -42
- data/lib/docker/api/system.rb +57 -26
- data/lib/docker/api/task.rb +10 -12
- data/lib/docker/api/version.rb +1 -1
- data/lib/docker/api/volume.rb +56 -41
- data/lib/dockerapi.rb +143 -0
- metadata +10 -7
data/lib/docker/api/swarm.rb
CHANGED
@@ -1,51 +1,79 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
##
|
2
|
+
# This class represents the Docker API endpoints regarding swamrs.
|
3
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Swarm
|
4
|
+
class Docker::API::Swarm < Docker::API::Base
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
6
|
+
##
|
7
|
+
# Initialize a new swarm.
|
8
|
+
#
|
9
|
+
# Docker API: POST /swarm/init
|
10
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmInit
|
11
|
+
#
|
12
|
+
# @param body [Hash]: Request body to be sent as json.
|
13
|
+
def init body = {}
|
14
|
+
@connection.request(method: :post, path: build_path("/swarm/init"), headers: {"Content-Type": "application/json"}, body: body.to_json)
|
15
|
+
end
|
15
16
|
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
##
|
18
|
+
# Update a swarm.
|
19
|
+
#
|
20
|
+
# Docker API: POST /swarm/update
|
21
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmUpdate
|
22
|
+
#
|
23
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
24
|
+
# @param body [Hash]: Request body to be sent as json.
|
25
|
+
def update params = {}, body = {}
|
26
|
+
@connection.request(method: :post, path: build_path("/swarm/update", params), headers: {"Content-Type": "application/json"}, body: body.to_json)
|
27
|
+
end
|
19
28
|
|
20
|
-
|
21
|
-
|
22
|
-
|
29
|
+
##
|
30
|
+
# Inspect swarm.
|
31
|
+
#
|
32
|
+
# Docker API: GET /swarm
|
33
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmInspect
|
34
|
+
def details
|
35
|
+
@connection.get("/swarm")
|
36
|
+
end
|
23
37
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
38
|
+
##
|
39
|
+
# Get the unlock key.
|
40
|
+
#
|
41
|
+
# Docker API: GET /swarm/unlockkey
|
42
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmUnlockkey
|
43
|
+
def unlock_key
|
44
|
+
@connection.get("/swarm/unlockkey")
|
45
|
+
end
|
28
46
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
47
|
+
##
|
48
|
+
# Unlock a locked manager.
|
49
|
+
#
|
50
|
+
# Docker API: POST /swarm/unlock
|
51
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmUnlock
|
52
|
+
#
|
53
|
+
# @param body [Hash]: Request body to be sent as json.
|
54
|
+
def unlock body = {}
|
55
|
+
@connection.request(method: :post, path: "/swarm/unlock", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
56
|
+
end
|
33
57
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
58
|
+
##
|
59
|
+
# Join an existing swarm.
|
60
|
+
#
|
61
|
+
# Docker API: POST /swarm/join
|
62
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmJoin
|
63
|
+
#
|
64
|
+
# @param body [Hash]: Request body to be sent as json.
|
65
|
+
def join body = {}
|
66
|
+
@connection.request(method: :post, path: "/swarm/join", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
67
|
+
end
|
38
68
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
end
|
69
|
+
##
|
70
|
+
# Leave a swarm.
|
71
|
+
#
|
72
|
+
# Docker API: POST /swarm/leave
|
73
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SwarmLeave
|
74
|
+
#
|
75
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
76
|
+
def leave params = {}
|
77
|
+
@connection.post(build_path("/swarm/leave", params))
|
50
78
|
end
|
51
79
|
end
|
data/lib/docker/api/system.rb
CHANGED
@@ -1,34 +1,65 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
##
|
2
|
+
# This class represents the Docker API system related endpoints.
|
3
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/System
|
4
|
+
class Docker::API::System < Docker::API::Base
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
##
|
7
|
+
# Validate credentials for a registry and, if available, get an identity token for accessing the registry without password.
|
8
|
+
#
|
9
|
+
# Docker API: POST /auth
|
10
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemAuth
|
11
|
+
#
|
12
|
+
# @param body [Hash]: Request body to be sent as json.
|
13
|
+
def auth body = {}
|
14
|
+
@connection.request(method: :post, path: "/auth", headers: { "Content-Type" => "application/json" }, body: body.to_json)
|
15
|
+
end
|
10
16
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
##
|
18
|
+
# Stream real-time events from the server.
|
19
|
+
#
|
20
|
+
# Docker API: GET /events
|
21
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemEvents
|
22
|
+
#
|
23
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
24
|
+
# @param &block: Replace the default output to stdout behavior.
|
25
|
+
def events params = {}, &block
|
26
|
+
@connection.request(method: :get, path: build_path("/events", params), response_block: block_given? ? block : default_streamer )
|
27
|
+
end
|
15
28
|
|
16
|
-
|
17
|
-
|
18
|
-
|
29
|
+
##
|
30
|
+
# This is a dummy endpoint you can use to test if the server is accessible.
|
31
|
+
#
|
32
|
+
# Docker API: GET /_ping
|
33
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemPing
|
34
|
+
def ping
|
35
|
+
@connection.get("/_ping")
|
36
|
+
end
|
19
37
|
|
20
|
-
|
21
|
-
|
22
|
-
|
38
|
+
##
|
39
|
+
# Get system information.
|
40
|
+
#
|
41
|
+
# Docker API: GET /info
|
42
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemInfo
|
43
|
+
def info
|
44
|
+
@connection.get("/info")
|
45
|
+
end
|
23
46
|
|
24
|
-
|
25
|
-
|
26
|
-
|
47
|
+
##
|
48
|
+
# Returns the version of Docker that is running and various information about the system that Docker is running on.
|
49
|
+
#
|
50
|
+
# Docker API: GET /version
|
51
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemVersion
|
52
|
+
def version
|
53
|
+
@connection.get("/version")
|
54
|
+
end
|
27
55
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
56
|
+
##
|
57
|
+
# Get data usage information.
|
58
|
+
#
|
59
|
+
# Docker API: GET /system/df
|
60
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/SystemDataUsage
|
61
|
+
def df
|
62
|
+
@connection.get("/system/df")
|
33
63
|
end
|
64
|
+
|
34
65
|
end
|
data/lib/docker/api/task.rb
CHANGED
@@ -1,26 +1,22 @@
|
|
1
1
|
# This class represents the Docker API endpoints regarding tasks.
|
2
2
|
#
|
3
|
-
# @see https://docs.docker.com/engine/api/v1.40/#tag/Task
|
4
|
-
#
|
5
3
|
# A task is a container running on a swarm. It is the atomic scheduling unit of swarm. Swarm mode must be enabled for these endpoints to work.
|
4
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Task
|
6
5
|
class Docker::API::Task < Docker::API::Base
|
7
6
|
|
8
7
|
# List tasks
|
9
8
|
#
|
10
9
|
# Docker API: GET /tasks
|
11
|
-
#
|
12
10
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/TaskList
|
13
11
|
#
|
14
12
|
# @param params [Hash]: Parameters that are appended to the URL.
|
15
13
|
def list params = {}
|
16
|
-
validate Docker::API::InvalidParameter, [:filters], params
|
17
14
|
@connection.get(build_path("/tasks",params))
|
18
15
|
end
|
19
16
|
|
20
17
|
# Inspect a task
|
21
18
|
#
|
22
19
|
# Docker API: GET /tasks/{id}
|
23
|
-
#
|
24
20
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/TaskInspect
|
25
21
|
#
|
26
22
|
# @param name [String]: The ID or name of the task.
|
@@ -30,17 +26,19 @@ class Docker::API::Task < Docker::API::Base
|
|
30
26
|
|
31
27
|
# Get stdout and stderr logs from a task.
|
32
28
|
#
|
33
|
-
# Note: This endpoint works only for services with the local, json-file or journald logging drivers.
|
34
|
-
#
|
35
29
|
# Docker API: GET /tasks/{id}/logs
|
36
|
-
#
|
37
30
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/TaskLogs
|
38
31
|
#
|
39
32
|
# @param name (String) : The ID or name of the task.
|
40
|
-
#
|
41
33
|
# @param params (Hash) : Parameters that are appended to the URL.
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
# @param &block: Replace the default output to stdout behavior.
|
35
|
+
def logs name, params = {}, &block
|
36
|
+
path = build_path("/tasks/#{name}/logs", params)
|
37
|
+
|
38
|
+
if [true, 1 ].include? params[:follow]
|
39
|
+
@connection.request(method: :get, path: path , response_block: block_given? ? block : default_streamer)
|
40
|
+
else
|
41
|
+
@connection.get(path)
|
42
|
+
end
|
45
43
|
end
|
46
44
|
end
|
data/lib/docker/api/version.rb
CHANGED
data/lib/docker/api/volume.rb
CHANGED
@@ -1,46 +1,61 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
@connection.request(method: :post, path: build_path(["create"]), headers: {"Content-Type": "application/json"}, body: body.to_json)
|
17
|
-
end
|
18
|
-
|
19
|
-
def remove name, params = {}
|
20
|
-
validate Docker::API::InvalidParameter, [:force], params
|
21
|
-
@connection.delete(build_path([name]))
|
22
|
-
end
|
1
|
+
##
|
2
|
+
# This class represents the Docker API endpoints regarding volumes.
|
3
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Volume
|
4
|
+
class Docker::API::Volume < Docker::API::Base
|
5
|
+
|
6
|
+
##
|
7
|
+
# List volumes.
|
8
|
+
#
|
9
|
+
# Docker API: GET
|
10
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/VolumeList
|
11
|
+
#
|
12
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
13
|
+
def list params = {}
|
14
|
+
@connection.get(build_path("/volumes", params))
|
15
|
+
end
|
23
16
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
17
|
+
##
|
18
|
+
# Inspect a volume.
|
19
|
+
#
|
20
|
+
# Docker API: GET /volumes/{name}
|
21
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/VolumeInspect
|
22
|
+
#
|
23
|
+
# @param name [String]: The ID or name of the volume.
|
24
|
+
def details name
|
25
|
+
@connection.get("/volumes/#{name}")
|
26
|
+
end
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
##
|
29
|
+
# Create a volume.
|
30
|
+
#
|
31
|
+
# Docker API: POST /volumes/create
|
32
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/VolumeCreate
|
33
|
+
#
|
34
|
+
# @param body [Hash]: Request body to be sent as json.
|
35
|
+
def create body = {}
|
36
|
+
@connection.request(method: :post, path: "/volumes/create", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
37
|
+
end
|
35
38
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
39
|
+
##
|
40
|
+
# Remove a volume.
|
41
|
+
#
|
42
|
+
# Docker API: DELETE /volumes/{name}
|
43
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/VolumeDelete
|
44
|
+
#
|
45
|
+
# @param name [String]: The ID or name of the volume.
|
46
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
47
|
+
def remove name, params = {}
|
48
|
+
@connection.delete(build_path("/volumes/#{name}",params))
|
49
|
+
end
|
43
50
|
|
44
|
-
|
51
|
+
##
|
52
|
+
# Delete unused volumes.
|
53
|
+
#
|
54
|
+
# Docker API: POST /volumes/prune
|
55
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/VolumePrune
|
56
|
+
#
|
57
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
58
|
+
def prune params = {}
|
59
|
+
@connection.post(build_path("/volumes/prune", params))
|
45
60
|
end
|
46
|
-
end
|
61
|
+
end
|
data/lib/dockerapi.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "excon"
|
2
2
|
require "json"
|
3
|
+
require "base64"
|
4
|
+
require "fileutils"
|
3
5
|
|
4
6
|
require "docker/api/version"
|
5
7
|
require "docker/api/error"
|
@@ -22,6 +24,147 @@ require "docker/api/plugin"
|
|
22
24
|
|
23
25
|
module Docker
|
24
26
|
module API
|
27
|
+
|
28
|
+
##
|
29
|
+
# This variable controls output verbosity.
|
30
|
+
PRINT_TO_STDOUT = true
|
31
|
+
|
32
|
+
##
|
33
|
+
# Valid values for parameter validations.
|
34
|
+
VALID_PARAMS = {
|
35
|
+
"Docker::API::Image" => {
|
36
|
+
"build" => [:dockerfile, :t, :extrahosts, :remote, :q, :nocache, :cachefrom, :pull, :rm, :forcerm, :memory, :memswap, :cpushares, :cpusetcpus, :cpuperiod, :cpuquota, :buildargs, :shmsize, :squash, :labels, :networkmode, :platform, :target, :outputs],
|
37
|
+
"prune" => [:filters],
|
38
|
+
"list" => [:all, :filters, :digests],
|
39
|
+
"search" => [:term, :limit, :filters],
|
40
|
+
"tag" => [:repo, :tag],
|
41
|
+
"remove" => [:force, :noprune],
|
42
|
+
"import" => [:quiet],
|
43
|
+
"push" => [:tag],
|
44
|
+
"commit" => [:container, :repo, :tag, :comment, :author, :pause, :changes],
|
45
|
+
"create" => [:fromImage, :fromSrc, :repo, :tag, :message, :platform],
|
46
|
+
"delete_cache" => [:all, "keep-storage", :filters]
|
47
|
+
},
|
48
|
+
"Docker::API::Container" => {
|
49
|
+
"list" => [:all, :limit, :size, :filters],
|
50
|
+
"details" => [:size],
|
51
|
+
"top" => [:ps_args],
|
52
|
+
"start" => [:detachKeys],
|
53
|
+
"stop" => [:t],
|
54
|
+
"restart" => [:t],
|
55
|
+
"kill" => [:signal],
|
56
|
+
"wait" => [:condition],
|
57
|
+
"rename" => [:name],
|
58
|
+
"resize" => [:w, :h],
|
59
|
+
"prune" => [:filters],
|
60
|
+
"remove" => [:v, :force, :link],
|
61
|
+
"logs" => [:follow, :stdout, :stderr, :since, :until, :timestamps, :tail],
|
62
|
+
"attach" => [:detachKeys, :logs, :stream, :stdin, :stdout, :stderr],
|
63
|
+
"stats" => [:stream],
|
64
|
+
"get_archive" => [:path],
|
65
|
+
"put_archive" => [:path, :noOverwriteDirNonDir, :copyUIDGID],
|
66
|
+
"create" => [:name]
|
67
|
+
},
|
68
|
+
"Docker::API::Volume" => {
|
69
|
+
"list" => [:filters],
|
70
|
+
"remove" => [:force],
|
71
|
+
"prune" => [:filters]
|
72
|
+
},
|
73
|
+
"Docker::API::Network" => {
|
74
|
+
"list" => [:filters],
|
75
|
+
"details" => [:verbose, :scope],
|
76
|
+
"prune" => [:filters]
|
77
|
+
},
|
78
|
+
"Docker::API::System" => {
|
79
|
+
"events" => [:since, :until, :filters]
|
80
|
+
},
|
81
|
+
"Docker::API::Exec" => {
|
82
|
+
"resize" => [:w, :h]
|
83
|
+
},
|
84
|
+
"Docker::API::Swarm" => {
|
85
|
+
"leave" => [:force],
|
86
|
+
"update" => [:version, :rotateWorkerToken, :rotateManagerToken, :rotateManagerUnlockKey]
|
87
|
+
},
|
88
|
+
"Docker::API::Node" => {
|
89
|
+
"list" => [:filters],
|
90
|
+
"update" => [:version],
|
91
|
+
"delete" => [:force]
|
92
|
+
},
|
93
|
+
"Docker::API::Service" => {
|
94
|
+
"list" => [:filters],
|
95
|
+
"update" => [:version, :registryAuthFrom, :rollback],
|
96
|
+
"details" => [:insertDefaults],
|
97
|
+
"logs" => [:details, :follow, :stdout, :stderr, :since, :timestamps, :tail]
|
98
|
+
},
|
99
|
+
"Docker::API::Secret" => {
|
100
|
+
"list" => [:filters],
|
101
|
+
"update" => [:version]
|
102
|
+
},
|
103
|
+
"Docker::API::Task" => {
|
104
|
+
"list" => [:filters],
|
105
|
+
"logs" => [:details, :follow, :stdout, :stderr, :since, :timestamps, :tail]
|
106
|
+
},
|
107
|
+
"Docker::API::Plugin" => {
|
108
|
+
"list" => [:filters],
|
109
|
+
"privileges" => [:remote],
|
110
|
+
"install" => [:remote, :name],
|
111
|
+
"remove" => [:force],
|
112
|
+
"enable" => [:timeout],
|
113
|
+
"upgrade" => [:remote]
|
114
|
+
},
|
115
|
+
"Docker::API::Config" => {
|
116
|
+
"list" => [:filters],
|
117
|
+
"update" => [:version]
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
##
|
122
|
+
# Valid values for request body validations.
|
123
|
+
VALID_BODY = {
|
124
|
+
"Docker::API::Image" => {
|
125
|
+
"commit" => [:Hostname, :Domainname, :User, :AttachStdin, :AttachStdout, :AttachStderr, :ExposedPorts, :Tty, :OpenStdin, :StdinOnce, :Env, :Cmd, :HealthCheck, :ArgsEscaped, :Image, :Volumes, :WorkingDir, :Entrypoint, :NetworkDisabled, :MacAddress, :OnBuild, :Labels, :StopSignal, :StopTimeout, :Shell]
|
126
|
+
},
|
127
|
+
"Docker::API::Container" => {
|
128
|
+
"create" => [:Hostname,:Domainname,:User,:AttachStdin,:AttachStdout,:AttachStderr,:ExposedPorts,:Tty,:OpenStdin,:StdinOnce,:Env,:Cmd,:HealthCheck,:ArgsEscaped,:Image,:Volumes,:WorkingDir,:Entrypoint,:NetworkDisabled,:MacAddress,:OnBuild,:Labels,:StopSignal,:StopTimeout,:Shell,:HostConfig,:NetworkingConfig],
|
129
|
+
"update" => [:CpuShares, :Memory, :CgroupParent, :BlkioWeight, :BlkioWeightDevice, :BlkioWeightReadBps, :BlkioWeightWriteBps, :BlkioWeightReadOps, :BlkioWeightWriteOps, :CpuPeriod, :CpuQuota, :CpuRealtimePeriod, :CpuRealtimeRuntime, :CpusetCpus, :CpusetMems, :Devices, :DeviceCgroupRules, :DeviceRequest, :Kernel, :Memory, :KernelMemoryTCP, :MemoryReservation, :MemorySwap, :MemorySwappiness, :NanoCPUs, :OomKillDisable, :Init, :PidsLimit, :ULimits, :CpuCount, :CpuPercent, :IOMaximumIOps, :IOMaximumBandwidth, :RestartPolicy]
|
130
|
+
},
|
131
|
+
"Docker::API::Volume" => {
|
132
|
+
"create" => [:Name, :Driver, :DriverOpts, :Labels]
|
133
|
+
},
|
134
|
+
"Docker::API::Network" => {
|
135
|
+
"create" => [:Name, :CheckDuplicate, :Driver, :Internal, :Attachable, :Ingress, :IPAM, :EnableIPv6, :Options, :Labels],
|
136
|
+
"connect" => [:Container, :EndpointConfig],
|
137
|
+
"disconnect" => [:Container, :Force]
|
138
|
+
},
|
139
|
+
"Docker::API::System" => {
|
140
|
+
"auth" => [:username, :password, :email, :serveraddress, :identitytoken]
|
141
|
+
},
|
142
|
+
"Docker::API::Exec" => {
|
143
|
+
"create" => [:AttachStdin, :AttachStdout, :AttachStderr, :DetachKeys, :Tty, :Env, :Cmd, :Privileged, :User, :WorkingDir],
|
144
|
+
"start" => [:Detach, :Tty]
|
145
|
+
},
|
146
|
+
"Docker::API::Swarm" => {
|
147
|
+
"init" => [:ListenAddr, :AdvertiseAddr, :DataPathAddr, :DataPathPort, :DefaultAddrPool, :ForceNewCluster, :SubnetSize, :Spec],
|
148
|
+
"update" => [:Name, :Labels, :Orchestration, :Raft, :Dispatcher, :CAConfig, :EncryptionConfig, :TaskDefaults],
|
149
|
+
"unlock" => [:UnlockKey],
|
150
|
+
"join" => [:ListenAddr, :AdvertiseAddr, :DataPathAddr, :RemoteAddrs, :JoinToken]
|
151
|
+
},
|
152
|
+
"Docker::API::Node" => {
|
153
|
+
"update" => [:Name, :Labels, :Role, :Availability]
|
154
|
+
},
|
155
|
+
"Docker::API::Service" => {
|
156
|
+
"create" => [:Name, :Labels, :TaskTemplate, :Mode, :UpdateConfig, :RollbackConfig, :Networks, :EndpointSpec],
|
157
|
+
"update" => [:Name, :Labels, :TaskTemplate, :Mode, :UpdateConfig, :RollbackConfig, :Networks, :EndpointSpec]
|
158
|
+
},
|
159
|
+
"Docker::API::Secret" => {
|
160
|
+
"create" => [:Name, :Labels, :Data, :Driver, :Templating],
|
161
|
+
"update" => [:Name, :Labels, :Data, :Driver, :Templating]
|
162
|
+
},
|
163
|
+
"Docker::API::Config" => {
|
164
|
+
"create" => [:Name, :Labels, :Data, :Templating],
|
165
|
+
"update" => [:Name, :Labels, :Data, :Driver, :Templating]
|
166
|
+
}
|
167
|
+
}
|
25
168
|
|
26
169
|
end
|
27
170
|
end
|