-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[WIP] Service APIs for Docker 1.12 #673
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
Conversation
@@ -251,6 +252,12 @@ | |||
|
|||
DisconnectFromNetworkCmd disconnectFromNetworkCmd(); | |||
|
|||
/** | |||
* * SERVICE API * |
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.
imho useless comment
|
As example see https://github.com/docker-java/docker-java/pull/669/files |
When you are unsure what types are you can look at https://github.com/docker/engine-api/ and https://github.com/docker/docker/ code (and their test cases also) |
Will merge #667 firstly, it will also help test serialization on your models. If you would need different local dockers, feel free to use https://hub.docker.com/r/kostyasha/dind/tags/ that is https://github.com/jpetazzo/dind fork or https://hub.docker.com/_/docker/ |
Note: some sucking tests failing 🏧 feel free to ignore their errors. |
@@ -573,6 +575,10 @@ public SSLParameters enableHostNameVerification(SSLParameters sslParameters) { | |||
return new DisconnectFromNetworkCmdExec(getBaseResource(), getDockerClientConfig()); | |||
} | |||
|
|||
@Override public ListServicesCmd.Exec createListServicesCmdExec() { |
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.
don't oneline annotation
05367a9
to
cd934c7
Compare
Please rebase. If you will have backward compatibility breaking changes, then it would be possible to switch to 3.1.X |
There's this |
If you can prove that |
I would also suggest split your changes into different small PRs (if all services/nodes are splittable). |
|
||
// CHECKSTYLE:OFF | ||
@Override | ||
public boolean equals(Object o) { |
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.
Use EqualsBuilder
Please let me know if you will need any help |
We split this into one PR per resource - so this one will be for services. Thanks for the link to the developer guide, I'll make sure to follow the guidelines. |
import java.io.Serializable; | ||
|
||
/** | ||
* @since {@link RemoteApiVersion#VERSION_1_24} |
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.
Discarding my initial idea to link class. To be faster you can skip this RAV class linking. and just place 1.24
.
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.
Now I've used the link everywhere already, and it's not slower because I copy-paste anyway.
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.
The idea was to click javadoc to RAV, and then have fast click to docker API page. But now i feel it too heavy.
} | ||
|
||
@Test | ||
public void testListContainers() throws Exception { |
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.
testListServices?
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.
Don't forget to add check for dockerClient API version and throw new SkipException
a8d25dc
to
e1669fd
Compare
Could you rebase? |
.withTaskHistoryRententionLimit(100) | ||
).withCaConfig(new SwarmCAConfig() | ||
.withNodeCertExpiry(60 * 60 * 1000000000L /*ns */)) | ||
.withRaft(new SwarmRaftConfig() |
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 would ask not to place )
on new line as it seems simple fluent code that used everywhere with dot on new line.
@Yogu @KostyaSha any updates here? Any way we could help to speed this up? |
Hey @MichaelRoeder Sorry, I was busy with a different project and then on vacation, but I'm now working on this again. This PR in particular is waiting on #686. |
I've implemented some service API's that I needed (InspectNodeCmd, InspectTaskCmd, ListServicesCmd, ListTasksCmd). If you want and if it helps I can do a pull request. |
Retriggering build. |
3052ba0
to
0c21e76
Compare
in #717 |
Implement APIs for the new
service
APIs APIs introduced in Docker 1.12This is a work in progress. Feel free to comment.
This change is
Depends on #686