Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 0 additions & 28 deletions src/main/java/com/github/dockerjava/api/model/ContainerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ public class ContainerConfig {
@JsonProperty("Cmd")
private String[] cmd;

@JsonProperty("CpuShares")
private int cpuShares = 0;

@JsonProperty("Cpuset")
private String cpuset = "";

@JsonProperty("Domainname")
private String domainName = "";

Expand All @@ -58,12 +52,6 @@ public class ContainerConfig {
@JsonProperty("MacAddress")
private String macAddress;

@JsonProperty("Memory")
private long memoryLimit = 0;

@JsonProperty("MemorySwap")
private long memorySwap = 0;

@JsonProperty("NetworkDisabled")
private boolean networkDisabled = false;

Expand Down Expand Up @@ -136,22 +124,6 @@ public String getMacAddress() {
return macAddress;
}

public long getMemoryLimit() {
return memoryLimit;
}

public long getMemorySwap() {
return memorySwap;
}

public int getCpuShares() {
return cpuShares;
}

public String getCpuset() {
return cpuset;
}

public boolean isAttachStdin() {
return attachStdin;
}
Expand Down
21 changes: 21 additions & 0 deletions src/main/java/com/github/dockerjava/api/model/HostConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ public class HostConfig {
@JsonProperty("Ulimits")
private Ulimit[] ulimits;

@JsonProperty("Memory")
private long memoryLimit = 0;

@JsonProperty("MemorySwap")
private long memorySwap = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use Long without default


@JsonProperty("CpuShares")
private int cpuShares = 0;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Integer without defaul


public HostConfig() {
}

Expand Down Expand Up @@ -173,6 +182,18 @@ public Ulimit[] getUlimits() {
return ulimits;
}

public long getMemoryLimit() {
return memoryLimit;
}

public long getMemorySwap() {
return memorySwap;
}

public int getCpuShares() {
return cpuShares;
}

@JsonIgnore
public void setBinds(Bind... binds) {
this.binds = new Binds(binds);
Expand Down