Repository: docker-java/docker-java
Pull request #159 (2015-02-24 19:57:31)

Add missing Info fields


Patch:
diff --git a/README.md b/README.md
index 2036bc94..aa171e41 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,4 @@
 [![Build Status](https://travis-ci.org/docker-java/docker-java.svg?branch=master)](https://travis-ci.org/docker-java/docker-java)
-[![Circle CI](https://circleci.com/gh/docker-java/docker-java.svg?style=svg)](https://circleci.com/gh/docker-java/docker-java)
 # docker-java 
 
 Java API client for [Docker](http://docs.docker.io/ "Docker")
diff --git a/src/main/java/com/github/dockerjava/api/model/Info.java b/src/main/java/com/github/dockerjava/api/model/Info.java
index 7fe6ae79..fb63f2ff 100644
--- a/src/main/java/com/github/dockerjava/api/model/Info.java
+++ b/src/main/java/com/github/dockerjava/api/model/Info.java
@@ -25,6 +25,9 @@ public class Info {
 
 	@JsonProperty("Debug")
 	private boolean debug;
+	
+	@JsonProperty("DockerRootDir")
+	private String DockerRootDir;
 
 	@JsonProperty("Driver")
 	private String driver;
@@ -34,9 +37,12 @@ public class Info {
 
 	@JsonProperty("ExecutionDriver")
 	private String executionDriver;
+	
+	@JsonProperty("ID")
+	private String ID;
 
 	@JsonProperty("IPv4Forwarding")
-	private String IPv4Forwarding;
+	private boolean IPv4Forwarding;
 
 	@JsonProperty("Images")
 	private int images;
@@ -52,9 +58,21 @@ public class Info {
 
 	@JsonProperty("KernelVersion")
 	private String kernelVersion;
+	
+	@JsonProperty("Labels")
+	private String Labels;
 
 	@JsonProperty("MemoryLimit")
 	private boolean memoryLimit;
+	
+	@JsonProperty("MemTotal")
+	private long memTotal;
+		
+	@JsonProperty("Name")
+	private String name;
+	
+	@JsonProperty("NCPU")
+	private int NCPU;
 
 	@JsonProperty("NEventsListener")
 	private long nEventListener;
@@ -64,12 +82,15 @@ public class Info {
 
 	@JsonProperty("NGoroutines")
 	private int NGoroutines;
+	
+	@JsonProperty("OperatingSystem")
+	private String OperatingSystem;
 
 	@JsonProperty("Sockets")
 	private String[] sockets;
 
 	@JsonProperty("SwapLimit")
-	private int swapLimit;
+	private boolean swapLimit;
 
 	public boolean isDebug() {
 		return debug;
@@ -78,6 +99,10 @@ public class Info {
 	public int getContainers() {
 		return containers;
 	}
+	
+	public String getDockerRootDir() {
+		return DockerRootDir;
+	}
 
 	public String getDriver() {
 		return driver;
@@ -90,8 +115,12 @@ public class Info {
 	public int getImages() {
 		return images;
 	}
+	
+	public String getID() {
+		return ID;
+	}
 
-	public String getIPv4Forwarding() {
+	public boolean getIPv4Forwarding() {
 		return IPv4Forwarding;
 	}
 
@@ -110,6 +139,10 @@ public class Info {
 	public String getKernelVersion() {
 		return kernelVersion;
 	}
+	
+	public String getLabels() {
+		return Labels;
+	}
 
 	public String[] getSockets() {
 		return sockets;
@@ -122,6 +155,18 @@ public class Info {
 	public long getnEventListener() {
 		return nEventListener;
 	}
+	
+	public long getMemTotal() {
+		return memTotal;
+	}
+	
+	public String getName() {
+		return name;
+	}
+	
+	public int getNCPU() {
+		return NCPU;
+	}
 
 	public int getNFd() {
 		return NFd;
@@ -130,8 +175,12 @@ public class Info {
 	public int getNGoroutines() {
 		return NGoroutines;
 	}
+	
+	public String getOperatingSystem() {
+		return OperatingSystem;
+	}
 
-	public int getSwapLimit() {
+	public boolean getSwapLimit() {
 		return swapLimit;
 	}
 


Test patch:
diff --git a/src/test/java/com/github/dockerjava/core/command/InfoCmdImplTest.java b/src/test/java/com/github/dockerjava/core/command/InfoCmdImplTest.java
index d1de7076..7170c12f 100644
--- a/src/test/java/com/github/dockerjava/core/command/InfoCmdImplTest.java
+++ b/src/test/java/com/github/dockerjava/core/command/InfoCmdImplTest.java
@@ -68,5 +68,6 @@ public class InfoCmdImplTest extends AbstractDockerClientTest {
 		assertTrue(dockerInfo.getImages() > 0);
 		assertTrue(dockerInfo.getNFd() > 0);
 		assertTrue(dockerInfo.getNGoroutines() > 0);
+		assertTrue(dockerInfo.getNCPU() > 0);
 	}
 }
diff --git a/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java b/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
index 22307b07..37d805aa 100644
--- a/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
+++ b/src/test/java/com/github/dockerjava/core/command/StartContainerCmdImplTest.java
@@ -283,7 +283,7 @@ public class StartContainerCmdImplTest extends AbstractDockerClientTest {
 		}
 
 		CreateContainerResponse container2 = dockerClient
-				.createContainerCmd("busybox").withCmd("true")
+				.createContainerCmd("busybox").withCmd("sleep", "9999")
 				.withName("container2").exec();
 
 		LOG.info("Created container2 {}", container2.toString());