8000 Add `Runtimes` to `Info` response (#2311) · docker-java/docker-java@b295275 · GitHub
[go: up one dir, main page]

Skip to content

Commit b295275

Browse files
authored
Add Runtimes to Info response (#2311)
1 parent 4f6c593 commit b295275

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

docker-java-api/src/main/java/com/github/dockerjava/api/model/Info.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,9 @@ public class Info extends DockerObject implements Serializable {
235235
@JsonProperty("SecurityOptions")
236236
private List<String> securityOptions;
237237

238+
@JsonProperty("Runtimes")
239+
private Map<String, RuntimeInfo> runtimes;
240+
238241
/**
239242
* @see #architecture
240243
*/
@@ -1070,4 +1073,11 @@ public Info withIsolation(String isolation) {
10701073
public List<String> getSecurityOptions() {
10711074
return securityOptions;
10721075
}
1076+
1077+
/**
1078+
* @see #runtimes
1079+
*/
1080+
public Map<String, RuntimeInfo> getRuntimes() {
1081+
return runtimes;
1082+
}
10731083
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.github.dockerjava.api.model;
2+
3+
import lombok.EqualsAndHashCode;
4+
import lombok.ToString;
5+
6+
import java.io.Serializable;
7+
8+
@EqualsAndHashCode
9+
@ToString
10+
public class RuntimeInfo extends DockerObject implements Serializable {
11+
private static final long serialVersionUID = 1L;
12+
13+
private String path;
14+
15+
public String getPath() {
16+
return path;
17+
}
18+
19+
public void setPath(String path) {
20+
this.path = path;
21+
}
22+
23+
}

docker-java/src/test/java/com/github/dockerjava/cmd/InfoCmdIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ public void infoTest() throws DockerException {
4848
assertThat(dockerInfo.getImages(), notNullValue());
4949
assertThat(dockerInfo.getImages(), greaterThan(0));
5050
assertThat(dockerInfo.getDebug(), notNullValue());
51+
assertThat(dockerInfo.getRuntimes(), notNullValue());
5152

5253
if (isNotSwarm(dockerClient)) {
5354
assertThat(dockerInfo.getNFd(), greaterThan(0));

0 commit comments

Comments
 (0)
0