Skip to content

Commit f343e10

Browse files
committed
Add Runtimes to Info response
1 parent 129f786 commit f343e10

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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 implements Serializable {
11+
12+
private String path;
13+
14+
public String getPath() {
15+
return path;
16+
}
17+
18+
public void setPath(String path) {
19+
this.path = path;
20+
}
21+
22+
}

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)