-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docker Swarm Inspect Container Info Support #459
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
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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 |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| package com.github.dockerjava.api.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonInclude.Include; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| @JsonInclude(Include.NON_NULL) | ||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| public class Labels { | ||
|
|
||
| @JsonProperty("executiondriver") | ||
| private String executiondriver; | ||
|
|
||
| @JsonProperty("kernelversion") | ||
| private String kernelversion; | ||
|
|
||
| @JsonProperty("operatingsystem") | ||
| private String operatingsystem; | ||
|
|
||
| @JsonProperty("provider") | ||
| private String provider; | ||
|
|
||
| @JsonProperty("storagedriver") | ||
| private String storagedriver; | ||
|
|
||
| public String getExecutiondriver() { | ||
| return executiondriver; | ||
| } | ||
|
|
||
| public void setExecutiondriver(String executiondriver) { | ||
| this.executiondriver = executiondriver; | ||
| } | ||
|
|
||
| public String getKernelversion() { | ||
| return kernelversion; | ||
| } | ||
|
|
||
| public void setKernelversion(String kernelversion) { | ||
| this.kernelversion = kernelversion; | ||
| } | ||
|
|
||
| public String getOperatingsystem() { | ||
| return operatingsystem; | ||
| } | ||
|
|
||
| public void setOperatingsystem(String operatingsystem) { | ||
| this.operatingsystem = operatingsystem; | ||
| } | ||
|
|
||
| public String getProvider() { | ||
| return provider; | ||
| } | ||
|
|
||
| public void setProvider(String provider) { | ||
| this.provider = provider; | ||
| } | ||
|
|
||
| public String getStoragedriver() { | ||
| return storagedriver; | ||
| } | ||
|
|
||
| public void setStoragedriver(String storagedriver) { | ||
| this.storagedriver = storagedriver; | ||
| } | ||
|
|
||
| } |
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
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.
That would break backward compatibility if this field was right and contains data for docker API before.
Uh oh!
There was an error while loading. Please reload this page.
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.
So Looks like
Nodeis currently being used in Event response.But I can't seem to find where event response sends a node. I looked at 1.23 and 1.18 none of those events have
Node.I am confused 1. why its there 2. what kind of backward compatibility this would be breaking.
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.
It may happen that different calls has different internals in the same Node object, then it should be splitted.
If
Idexists in docker api, then you can't just remove it.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.
@suryagaddipati
A node as returned by the /events API, for instance, when Swarm is used.then it may be that swarm changed API. You should try get responces from 2 different swarm versions.
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.
Swarm
Nodealways had the same api response, there is no difference between versions.Can you link me to where swarm node api changed? I can't seem to find it, perhaps I missed it.
Uh oh!
There was an error while loading. Please reload this page.
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.
https://docs.docker.com/swarm/swarm-api/
Smells like Node is reused... will verify and think on creating ITs.
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.
hi @KostyaSha those docs seem out of date
https://github.com/docker/swarm/blob/master/scheduler/node/node.go#L11-L12
the case did indeed seems to have been changed by this commit, like you suspected.
probably a good idea to change Node class to have both fields and return the one that is not null. what do you think?
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.
@KostyaSha i created an issue on docker swarm docker-archive/classicswarm#2378
to clarify the breaking changes.
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.
Looks like they fixed docs.
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.
So i would suggest to make new
SwarmNodeclass as it seems that it fully otherNodeobjects and current dockerNodeclass shouldn't be changed.