-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add missing properties for Status in the Inspect response #372
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
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |
| import java.util.List; | ||
| import java.util.Map; | ||
|
|
||
| import javax.annotation.CheckForNull; | ||
|
|
||
| import org.apache.commons.lang.builder.ToStringBuilder; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
|
@@ -225,44 +227,90 @@ public String toString() { | |
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class ContainerState { | ||
|
|
||
| @JsonProperty("Status") | ||
| private String status; | ||
|
|
||
| @JsonProperty("Running") | ||
| private Boolean running; | ||
|
|
||
| @JsonProperty("Paused") | ||
| private Boolean paused; | ||
|
|
||
| @JsonProperty("Restarting") | ||
| private Boolean restarting; | ||
|
|
||
| @JsonProperty("OOMKilled") | ||
| private Boolean oomKilled; | ||
|
|
||
| @JsonProperty("Dead") | ||
| private Boolean dead; | ||
|
|
||
| @JsonProperty("Pid") | ||
| private Integer pid; | ||
|
|
||
| @JsonProperty("ExitCode") | ||
| private Integer exitCode; | ||
|
|
||
| @JsonProperty("Error") | ||
| private String error; | ||
|
|
||
| @JsonProperty("StartedAt") | ||
| private String startedAt; | ||
|
|
||
| @JsonProperty("FinishedAt") | ||
| private String finishedAt; | ||
|
|
||
| @CheckForNull | ||
| public String getStatus() { | ||
| return status; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Boolean isRunning() { | ||
| return running; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Boolean isPaused() { | ||
| return paused; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Boolean isRestarting() { | ||
| return restarting; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Boolean isOOMKilled() { | ||
|
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. Boolean shouldn't be used with
Contributor
Author
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. Just trying to be consistent with the existing methods isRunning & isPaused. |
||
| return oomKilled; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Boolean isDead() { | ||
| return dead; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Integer getPid() { | ||
| return pid; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public Integer getExitCode() { | ||
| return exitCode; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public String getError() { | ||
| return error; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public String getStartedAt() { | ||
| return startedAt; | ||
| } | ||
|
|
||
| @CheckForNull | ||
| public String getFinishedAt() { | ||
| return finishedAt; | ||
| } | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Didn't found in 1.17..1.21 please point on API documentation
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.
Please see:
https://docs.docker.com/v1.8/reference/api/docker_remote_api_v1.17/
"State": { "Error": "", * "ExitCode": 9, "FinishedAt":
"2015-01-06T15:47:32.080254511Z", *"OOMKilled": false, * "Paused": false,
"Pid": 0, *"Restarting": false*, * "Running": false, "StartedAt":
"2015-01-06T15:47:32.072697474Z" },
Also, while the docker document does not have it, I see some additional
properties in the latest 1.21 (Docker 1.9 API). I can remove them if you
strictly want to go by the documentation but usually docker documentation
is always behind..
}
On Fri, Nov 20, 2015 at 10:54 AM, Kanstantsin Shautsou <
notifications@github.com> wrote:
Ritesh
Founder @ Nirmata http://nirmata.com/
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.
Filled moby/moby#18127
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.
Upstream merged