dockerapi 0.13.0 → 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +35 -0
- data/.gitignore +4 -0
- data/CHANGELOG.md +35 -0
- data/Gemfile.lock +3 -3
- data/README.md +73 -23
- data/bin/setup +9 -1
- data/dockerapi.gemspec +5 -4
- data/lib/docker/api/base.rb +64 -20
- data/lib/docker/api/connection.rb +23 -17
- data/lib/docker/api/container.rb +306 -144
- data/lib/docker/api/error.rb +19 -3
- data/lib/docker/api/exec.rb +49 -36
- data/lib/docker/api/image.rb +32 -14
- data/lib/docker/api/network.rb +84 -48
- data/lib/docker/api/node.rb +47 -28
- data/lib/docker/api/response.rb +27 -19
- data/lib/docker/api/secret.rb +1 -9
- data/lib/docker/api/service.rb +3 -18
- data/lib/docker/api/swarm.rb +70 -36
- data/lib/docker/api/system.rb +57 -24
- data/lib/docker/api/task.rb +10 -10
- data/lib/docker/api/version.rb +1 -1
- data/lib/docker/api/volume.rb +56 -37
- data/lib/dockerapi.rb +8 -1
- metadata +10 -7
- data/.travis.yml +0 -6
data/lib/docker/api/error.rb
CHANGED
@@ -1,17 +1,33 @@
|
|
1
1
|
module Docker
|
2
2
|
module API
|
3
|
+
|
4
|
+
##
|
5
|
+
# This class represents a validation error.
|
3
6
|
class ValidationError < StandardError
|
7
|
+
|
8
|
+
##
|
9
|
+
# @params permitted [Array]: permitted values.
|
10
|
+
# @params unpermitted [Array]: unpermitted values.
|
4
11
|
def initialize permitted, unpermitted
|
5
12
|
super("Unpermitted options found: #{unpermitted.to_s}. Permitted are #{permitted.to_s}")
|
6
13
|
end
|
7
14
|
end
|
15
|
+
|
16
|
+
##
|
17
|
+
# This class represents a parameter validation error.
|
18
|
+
class InvalidParameter < Docker::API::ValidationError; end
|
19
|
+
|
20
|
+
##
|
21
|
+
# This class represents a request body validation error.
|
22
|
+
class InvalidRequestBody < Docker::API::ValidationError; end
|
23
|
+
|
24
|
+
##
|
25
|
+
# This class represents a generic error.
|
8
26
|
class Error < StandardError
|
9
27
|
def initialize msg = "Error without specific message"
|
10
28
|
super(msg)
|
11
29
|
end
|
12
30
|
end
|
13
|
-
|
14
|
-
class InvalidParameter < Docker::API::ValidationError; end
|
15
|
-
class InvalidRequestBody < Docker::API::ValidationError; end
|
31
|
+
|
16
32
|
end
|
17
33
|
end
|
data/lib/docker/api/exec.rb
CHANGED
@@ -1,42 +1,55 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
##
|
2
|
+
# This class represents the Docker API exec related endpoints.
|
3
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Exec
|
4
|
+
class Docker::API::Exec < Docker::API::Base
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
)
|
17
|
-
response.data.merge!({stream: stream})
|
18
|
-
response
|
19
|
-
end
|
6
|
+
##
|
7
|
+
# Run a command inside a running container.
|
8
|
+
#
|
9
|
+
# Docker API: POST /containers/{id}/exec
|
10
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/ContainerExec
|
11
|
+
#
|
12
|
+
# @param name [String]: The ID or name of the container.
|
13
|
+
# @param body [Hash]: Request body to be sent as json.
|
14
|
+
def create name, body = {}
|
15
|
+
@connection.request(method: :post, path: "/containers/#{name}/exec", headers: {"Content-Type": "application/json"}, body: body.to_json )
|
16
|
+
end
|
20
17
|
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
##
|
19
|
+
# Start a previously set up exec instance.
|
20
|
+
#
|
21
|
+
# Docker API: POST /exec/{id}/start
|
22
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/ExecStart
|
23
|
+
#
|
24
|
+
# @param name [String]: Exec instance ID.
|
25
|
+
# @param body [Hash]: Request body to be sent as json.
|
26
|
+
# @param &block: Replace the default output to stdout behavior.
|
27
|
+
def start name, body = {}, &block
|
28
|
+
@connection.request(method: :post, path: "/exec/#{name}/start", headers: {"Content-Type": "application/json"}, body: body.to_json,
|
29
|
+
response_block: block_given? ? block : default_streamer )
|
30
|
+
end
|
24
31
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
details(name)
|
37
|
-
end
|
38
|
-
#################################################
|
32
|
+
##
|
33
|
+
# Resize the TTY session used by an exec instance.
|
34
|
+
#
|
35
|
+
# Docker API: POST /exec/{id}/resize
|
36
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/ExecResize
|
37
|
+
#
|
38
|
+
# @param name [String]: Exec instance ID.
|
39
|
+
# @param body [Hash]: Request body to be sent as json.
|
40
|
+
def resize name, params = {}
|
41
|
+
@connection.post(build_path("/exec/#{name}/resize", params))
|
42
|
+
end
|
39
43
|
|
40
|
-
|
44
|
+
##
|
45
|
+
# Return low-level information about an exec instance.
|
46
|
+
#
|
47
|
+
# Docker API: GET /exec/{id}/json
|
48
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/ExecInspect
|
49
|
+
#
|
50
|
+
# @param name [String]: Exec instance ID.
|
51
|
+
def details name
|
52
|
+
@connection.get("/exec/#{name}/json")
|
41
53
|
end
|
54
|
+
|
42
55
|
end
|
data/lib/docker/api/image.rb
CHANGED
@@ -5,6 +5,7 @@ class Docker::API::Image < Docker::API::Base
|
|
5
5
|
|
6
6
|
##
|
7
7
|
# Return low-level information about an image.
|
8
|
+
#
|
8
9
|
# Docker API: GET /images/{name}/json
|
9
10
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageInspect
|
10
11
|
#
|
@@ -15,16 +16,21 @@ class Docker::API::Image < Docker::API::Base
|
|
15
16
|
|
16
17
|
##
|
17
18
|
# Return image digest and platform information by contacting the registry.
|
19
|
+
#
|
18
20
|
# Docker API: GET /distribution/{name}/json
|
19
21
|
# @see https://docs.docker.com/engine/api/v1.40/#tag/Distribution
|
20
22
|
#
|
21
23
|
# @param name [String]: The ID or name of the image.
|
22
|
-
|
23
|
-
|
24
|
+
# @param authentication [Hash]: Authentication parameters.
|
25
|
+
def distribution name, authentication = {}
|
26
|
+
request = {method: :get, path: "/distribution/#{name}/json"}
|
27
|
+
request[:headers] = {"X-Registry-Auth" => auth_encoder(authentication)} if authentication.any?
|
28
|
+
@connection.request(request)
|
24
29
|
end
|
25
30
|
|
26
31
|
##
|
27
32
|
# Return parent layers of an image.
|
33
|
+
#
|
28
34
|
# Docker API: GET /images/{name}/history
|
29
35
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageHistory
|
30
36
|
#
|
@@ -34,7 +40,8 @@ class Docker::API::Image < Docker::API::Base
|
|
34
40
|
end
|
35
41
|
|
36
42
|
##
|
37
|
-
#
|
43
|
+
# Return a list of images on the server. Note that it uses a different, smaller representation of an image than inspecting a single image.
|
44
|
+
#
|
38
45
|
# Docker API: GET /images/json
|
39
46
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageList
|
40
47
|
#
|
@@ -45,6 +52,7 @@ class Docker::API::Image < Docker::API::Base
|
|
45
52
|
|
46
53
|
##
|
47
54
|
# Search for an image on Docker Hub.
|
55
|
+
#
|
48
56
|
# Docker API: GET /images/search
|
49
57
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageSearch
|
50
58
|
#
|
@@ -55,6 +63,7 @@ class Docker::API::Image < Docker::API::Base
|
|
55
63
|
|
56
64
|
##
|
57
65
|
# Tag an image so that it becomes part of a repository.
|
66
|
+
#
|
58
67
|
# Docker API: POST /images/{name}/tag
|
59
68
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageTag
|
60
69
|
#
|
@@ -66,6 +75,7 @@ class Docker::API::Image < Docker::API::Base
|
|
66
75
|
|
67
76
|
##
|
68
77
|
# Delete unused images.
|
78
|
+
#
|
69
79
|
# Docker API: POST /images/prune
|
70
80
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImagePrune
|
71
81
|
#
|
@@ -76,7 +86,9 @@ class Docker::API::Image < Docker::API::Base
|
|
76
86
|
|
77
87
|
##
|
78
88
|
# Remove an image, along with any untagged parent images that were referenced by that image.
|
89
|
+
#
|
79
90
|
# Images can't be removed if they have descendant images, are being used by a running container or are being used by a build.
|
91
|
+
#
|
80
92
|
# Docker API: DELETE /images/{name}
|
81
93
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageDelete
|
82
94
|
#
|
@@ -88,19 +100,20 @@ class Docker::API::Image < Docker::API::Base
|
|
88
100
|
|
89
101
|
##
|
90
102
|
# Export an image.
|
103
|
+
#
|
91
104
|
# Docker API: GET /images/{name}/get
|
92
105
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageGet
|
93
106
|
#
|
94
107
|
# @param name [String]: The ID or name of the image.
|
95
|
-
# @param path [
|
96
|
-
# @param block
|
97
|
-
|
98
|
-
|
99
|
-
@connection.request(method: :get, path: build_path("/images/#{name}/get") , response_block: block_given? ? block.call : default_writer(path))
|
108
|
+
# @param path [String]: Path to the exported file.
|
109
|
+
# @param &block: Replace the default file writing behavior.
|
110
|
+
def export name, path, &block
|
111
|
+
@connection.request(method: :get, path: build_path("/images/#{name}/get") , response_block: block_given? ? block : default_writer(path))
|
100
112
|
end
|
101
113
|
|
102
114
|
##
|
103
115
|
# Import images.
|
116
|
+
#
|
104
117
|
# Docker API: POST /images/load
|
105
118
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageLoad
|
106
119
|
#
|
@@ -112,6 +125,7 @@ class Docker::API::Image < Docker::API::Base
|
|
112
125
|
|
113
126
|
##
|
114
127
|
# Push an image to a registry.
|
128
|
+
#
|
115
129
|
# Docker API: POST /images/{name}/push
|
116
130
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImagePush
|
117
131
|
#
|
@@ -119,12 +133,13 @@ class Docker::API::Image < Docker::API::Base
|
|
119
133
|
# @param params [Hash]: Parameters that are appended to the URL.
|
120
134
|
# @param authentication [Hash]: Authentication parameters.
|
121
135
|
def push name, params = {}, authentication = {}
|
122
|
-
raise Docker::API::Error.new("Provide authentication parameters to push an image") unless authentication.
|
123
|
-
@connection.request(method: :post, path: build_path("/images/#{name}/push", params), headers: { "X-Registry-Auth" =>
|
136
|
+
raise Docker::API::Error.new("Provide authentication parameters to push an image") unless authentication.any?
|
137
|
+
@connection.request(method: :post, path: build_path("/images/#{name}/push", params), headers: { "X-Registry-Auth" => auth_encoder(authentication) } )
|
124
138
|
end
|
125
139
|
|
126
140
|
##
|
127
141
|
# Create a new image from a container.
|
142
|
+
#
|
128
143
|
# Docker API: POST /commit
|
129
144
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageCommit
|
130
145
|
#
|
@@ -138,6 +153,7 @@ class Docker::API::Image < Docker::API::Base
|
|
138
153
|
|
139
154
|
##
|
140
155
|
# Create an image by either pulling it from a registry or importing it.
|
156
|
+
#
|
141
157
|
# Docker API: POST /images/create
|
142
158
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageCreate
|
143
159
|
#
|
@@ -145,19 +161,20 @@ class Docker::API::Image < Docker::API::Base
|
|
145
161
|
# @param authentication [Hash]: Authentication parameters.
|
146
162
|
# @param &block: Replace the default output to stdout behavior.
|
147
163
|
def create params = {}, authentication = {}, &block
|
148
|
-
request = {method: :post, path: build_path("/images/create", params), response_block: block_given? ? block
|
164
|
+
request = {method: :post, path: build_path("/images/create", params), response_block: block_given? ? block : default_streamer }
|
149
165
|
if params.has_key? :fromSrc and !params[:fromSrc].match(/^(http|https)/) # then it's using a tar file
|
150
166
|
path = params[:fromSrc]
|
151
167
|
params[:fromSrc] = "-"
|
152
168
|
default_reader(path, build_path("/images/create", params))
|
153
169
|
else
|
154
|
-
request[:headers] = { "X-Registry-Auth" =>
|
170
|
+
request[:headers] = { "X-Registry-Auth" => auth_encoder(authentication) } if authentication.any?
|
155
171
|
@connection.request(request)
|
156
172
|
end
|
157
173
|
end
|
158
174
|
|
159
175
|
##
|
160
176
|
# Build an image from a tar archive with a Dockerfile in it.
|
177
|
+
#
|
161
178
|
# Docker API: POST /build
|
162
179
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/ImageBuild
|
163
180
|
#
|
@@ -169,10 +186,10 @@ class Docker::API::Image < Docker::API::Base
|
|
169
186
|
raise Docker::API::Error.new("Expected path or params[:remote]") unless path || params[:remote]
|
170
187
|
|
171
188
|
headers = {"Content-type": "application/x-tar"}
|
172
|
-
headers.merge!({"X-Registry-Config":
|
189
|
+
headers.merge!({"X-Registry-Config": auth_encoder(authentication) }) if authentication.any?
|
173
190
|
|
174
191
|
if path == nil and params.has_key? :remote
|
175
|
-
response = @connection.request(method: :post, path: build_path("/build", params), headers: headers, response_block: block_given? ? block
|
192
|
+
response = @connection.request(method: :post, path: build_path("/build", params), headers: headers, response_block: block_given? ? block : default_streamer)
|
176
193
|
else
|
177
194
|
default_reader(path, build_path("/build", params), headers)
|
178
195
|
end
|
@@ -180,6 +197,7 @@ class Docker::API::Image < Docker::API::Base
|
|
180
197
|
|
181
198
|
##
|
182
199
|
# Delete builder cache.
|
200
|
+
#
|
183
201
|
# Docker API: POST /build/prune
|
184
202
|
# @see https://docs.docker.com/engine/api/v1.40/#operation/BuildPrune
|
185
203
|
#
|
data/lib/docker/api/network.rb
CHANGED
@@ -1,50 +1,86 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
1
|
+
##
|
2
|
+
# This class represents the Docker API endpoints regarding networks.
|
3
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Network
|
4
|
+
class Docker::API::Network < Docker::API::Base
|
5
|
+
|
6
|
+
##
|
7
|
+
# List networks.
|
8
|
+
#
|
9
|
+
# Docker API: GET /networks
|
10
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkList
|
11
|
+
#
|
12
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
13
|
+
def list params = {}
|
14
|
+
@connection.get(build_path("/networks", params))
|
15
|
+
end
|
16
|
+
|
17
|
+
##
|
18
|
+
# Inspect a network.
|
19
|
+
#
|
20
|
+
# Docker API: GET /networks/{id}
|
21
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkInspect
|
22
|
+
#
|
23
|
+
# @param name [String]: The ID or name of the network.
|
24
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
25
|
+
def details name, params = {}
|
26
|
+
@connection.get(build_path("/networks/#{name}", params))
|
27
|
+
end
|
28
|
+
|
29
|
+
##
|
30
|
+
# Create a network.
|
31
|
+
#
|
32
|
+
# Docker API: POST /networks/create
|
33
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkCreate
|
34
|
+
#
|
35
|
+
# @param body [Hash]: Request body to be sent as json.
|
36
|
+
def create body = {}
|
37
|
+
@connection.request(method: :post, path: "/networks/create", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
38
|
+
end
|
39
|
+
|
40
|
+
##
|
41
|
+
# Remove a network.
|
42
|
+
#
|
43
|
+
# Docker API: DELETE /networks/{id}
|
44
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkDelete
|
45
|
+
#
|
46
|
+
# @param name [String]: The ID or name of the network.
|
47
|
+
def remove name
|
48
|
+
@connection.delete("/networks/#{name}")
|
49
49
|
end
|
50
|
+
|
51
|
+
##
|
52
|
+
# Delete unused networks.
|
53
|
+
#
|
54
|
+
# Docker API: POST /networks/prune
|
55
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkPrune
|
56
|
+
#
|
57
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
58
|
+
def prune params = {}
|
59
|
+
@connection.post(build_path("/networks/prune", params))
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Connect a container to a network.
|
64
|
+
#
|
65
|
+
# Docker API: POST /networks/{id}/connect
|
66
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkConnect
|
67
|
+
#
|
68
|
+
# @param name [String]: The ID or name of the network.
|
69
|
+
# @param body [Hash]: Request body to be sent as json.
|
70
|
+
def connect name, body = {}
|
71
|
+
@connection.request(method: :post, path: "/networks/#{name}/connect", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
72
|
+
end
|
73
|
+
|
74
|
+
##
|
75
|
+
# Disconnect a container from a network.
|
76
|
+
#
|
77
|
+
# Docker API: POST /networks/{id}/disconnect
|
78
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NetworkDisconnect
|
79
|
+
#
|
80
|
+
# @param name [String]: The ID or name of the network.
|
81
|
+
# @param body [Hash]: Request body to be sent as json.
|
82
|
+
def disconnect name, body = {}
|
83
|
+
@connection.request(method: :post, path: "/networks/#{name}/disconnect", headers: {"Content-Type": "application/json"}, body: body.to_json)
|
84
|
+
end
|
85
|
+
|
50
86
|
end
|
data/lib/docker/api/node.rb
CHANGED
@@ -1,34 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
# This class represents the Docker API endpoints regarding nodes.
|
2
|
+
#
|
3
|
+
# Nodes are instances of the Engine participating in a swarm. Swarm mode must be enabled for these endpoints to work.
|
4
|
+
# @see https://docs.docker.com/engine/api/v1.40/#tag/Node
|
5
|
+
class Docker::API::Node < Docker::API::Base
|
4
6
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
7
|
+
##
|
8
|
+
# List nodes.
|
9
|
+
#
|
10
|
+
# Docker API: GET /nodes
|
11
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NodeList
|
12
|
+
#
|
13
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
14
|
+
def list params = {}
|
15
|
+
@connection.get(build_path("/nodes", params))
|
16
|
+
end
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
##
|
19
|
+
# Update a node.
|
20
|
+
#
|
21
|
+
# Docker API: POST /nodes/{id}/update
|
22
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NodeUpdate
|
23
|
+
#
|
24
|
+
# @param name [String]: The ID or name of the node.
|
25
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
26
|
+
# @param body [Hash]: Request body to be sent as json.
|
27
|
+
def update name, params = {}, body = {}
|
28
|
+
@connection.request(method: :post, path: build_path("nodes/#{name}/update", params), headers: {"Content-Type": "application/json"}, body: body.to_json)
|
29
|
+
end
|
20
30
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
+
##
|
32
|
+
# Delete a node.
|
33
|
+
#
|
34
|
+
# Docker API: DELETE /nodes/{id}
|
35
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NodeDelete
|
36
|
+
#
|
37
|
+
# @param name [String]: The ID or name of the node.
|
38
|
+
# @param params [Hash]: Parameters that are appended to the URL.
|
39
|
+
def delete name, params = {}
|
40
|
+
@connection.delete(build_path("/nodes/#{name}", params))
|
41
|
+
end
|
31
42
|
|
32
|
-
|
43
|
+
##
|
44
|
+
# Inspect a node.
|
45
|
+
#
|
46
|
+
# Docker API: GET /nodes/{id}
|
47
|
+
# @see https://docs.docker.com/engine/api/v1.40/#operation/NodeInspect
|
48
|
+
#
|
49
|
+
# @param name [String]: The ID or name of the node.
|
50
|
+
def details name
|
51
|
+
@connection.get("/nodes/#{name}")
|
33
52
|
end
|
34
53
|
end
|