Add missing properties for Status in the Inspect response#372
Add missing properties for Status in the Inspect response#372patelrit wants to merge 3 commits intodocker-java:masterfrom NirmataOSS:master
Conversation
|
Added missing Status properties |
|
Any thoughts or comments on this pull request? Most of these properties have been in the inspect response since api version 1.19 sudo docker version Client version: 1.7.0 Client API version: 1.19 Go version (client): go1.4.2 Git commit (client): 0baf609 OS/Arch (client): linux/amd64 Server version: 1.7.0 Server API version: 1.19 Go version (server): go1.4.2 Git commit (server): 0baf609 OS/Arch (server): linux/amd64 ubuntu@ip-10-10-129-55:~$ sudo docker inspect d3377a2140e3 [ { |
|
@patelrit Thanks! Will try to merge it into |
|
Awesome! Thank you! On Thu, Nov 19, 2015 at 11:39 PM, marcuslinke notifications@github.com
Ritesh |
|
@patelrit Please put |
|
@marcuslinke should this be covered with tests? Seems on old daemon we should expecte |
|
As we can't test against different docker host versions I think this is not needed. In general a test, if present, should test against the supported docker version of docker-java (as stated in the README) |
There was a problem hiding this comment.
Boolean shouldn't be used with isXX() as it not a primitive, use getXX()
There was a problem hiding this comment.
Just trying to be consistent with the existing methods isRunning & isPaused.
Bad... |
|
I will handle this PR and sync into 2.3 and master. |
There was a problem hiding this comment.
Didn't found in 1.17..1.21 please point on API documentation
There was a problem hiding this comment.
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..
"State": {
-
"Status": "exited",* "Running": false, "Paused": false, "Restarting": false, "OOMKilled": false, -
"Dead": false,* "Pid": 0, "ExitCode": 0, "Error": "", "StartedAt": "2015-11-20T19:02:48.972024978Z", "FinishedAt": "2015-11-20T19:02:48.998958231Z"}
On Fri, Nov 20, 2015 at 10:54 AM, Kanstantsin Shautsou <
notifications@github.com> wrote:
In
src/main/java/com/github/dockerjava/api/command/InspectContainerResponse.java
#372 (comment)
:@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;Didn't found in 1.17..1.21 please point on API documentation
—
Reply to this email directly or view it on GitHub
https://github.com/docker-java/docker-java/pull/372/files#r45503748.
Ritesh
Founder @ Nirmata http://nirmata.com/
|
@checkfornull everywhere |
|
@patelrit please hold on, i already reworked all related changes. |
|
I picked your change and modified in #378 closing this. |
InspectContainerResponse is missing some properties #371