-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Adding support for withPidMode #332 #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,8 @@ | |
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| import javax.annotation.CheckForNull; | ||
|
|
||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class HostConfig { | ||
|
|
||
|
|
@@ -75,13 +77,17 @@ public class HostConfig { | |
| @JsonProperty("CpuShares") | ||
| private int cpuShares = 0; | ||
|
|
||
| @JsonProperty("PidMode") | ||
| private String pidMode; | ||
|
|
||
| public HostConfig() { | ||
| } | ||
|
|
||
| public HostConfig(Bind[] binds, Link[] links, LxcConf[] lxcConf, LogConfig logConfig, Ports portBindings, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @marcuslinke do you need at all this huge constructor?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nope. Not needed. It's already removed in 'issue-246' branch. So no need to remove it here. |
||
| boolean publishAllPorts, boolean privileged, boolean readonlyRootfs, String[] dns, String[] dnsSearch, | ||
| VolumesFrom[] volumesFrom, String containerIDFile, Capability[] capAdd, Capability[] capDrop, | ||
| RestartPolicy restartPolicy, String networkMode, Device[] devices, String[] extraHosts, Ulimit[] ulimits) { | ||
| RestartPolicy restartPolicy, String networkMode, Device[] devices, String[] extraHosts, Ulimit[] ulimits, | ||
| String pidMode) { | ||
| this.binds = new Binds(binds); | ||
| this.links = new Links(links); | ||
| this.lxcConf = lxcConf; | ||
|
|
@@ -101,6 +107,7 @@ public HostConfig(Bind[] binds, Link[] links, LxcConf[] lxcConf, LogConfig logCo | |
| this.devices = devices; | ||
| this.extraHosts = extraHosts; | ||
| this.ulimits = ulimits; | ||
| this.pidMode = pidMode; | ||
| } | ||
|
|
||
| @JsonIgnore | ||
|
|
@@ -194,6 +201,11 @@ public int getCpuShares() { | |
| return cpuShares; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public String getPidMode() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| return pidMode; | ||
| } | ||
|
|
||
| @JsonIgnore | ||
| public void setBinds(Bind... binds) { | ||
| this.binds = new Binds(binds); | ||
|
|
@@ -273,6 +285,10 @@ public void setUlimits(Ulimit[] ulimits) { | |
| this.ulimits = ulimits; | ||
| } | ||
|
|
||
| public void setPidMode(String pidMode) { | ||
| this.pidMode = pidMode; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return ToStringBuilder.reflectionToString(this); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotate with
@CheckForNull