Skip to content

Allow user to add groups to a container#950

Closed
bol wants to merge 7 commits intodocker-java:masterfrom
bol:master
Closed

Allow user to add groups to a container#950
bol wants to merge 7 commits intodocker-java:masterfrom
bol:master

Conversation

@bol
Copy link
Copy Markdown

@bol bol commented Nov 17, 2017

Adds support for the --add-group parameter for container creation and inspection.
Solves #907


This change is Reviewable

Niklas Bolander added 3 commits November 17, 2017 09:39
@codecov-io
Copy link
Copy Markdown

codecov-io commented Nov 17, 2017

Codecov Report

Merging #950 into master will increase coverage by 2.58%.
The diff coverage is 85.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #950      +/-   ##
==========================================
+ Coverage   59.34%   61.92%   +2.58%     
==========================================
  Files         441      411      -30     
  Lines        8699     8189     -510     
  Branches      540      530      -10     
==========================================
- Hits         5162     5071      -91     
+ Misses       3238     2817     -421     
- Partials      299      301       +2
Impacted Files Coverage Δ
...va/com/github/dockerjava/api/model/HostConfig.java 60.56% <100%> (+1.4%) ⬆️
...ockerjava/core/command/CreateContainerCmdImpl.java 53.02% <75%> (-0.34%) ⬇️
...va/com/github/dockerjava/api/model/Statistics.java 11.11% <0%> (-78.89%) ⬇️
...dockerjava/core/command/ListContainersCmdImpl.java 51.35% <0%> (-20.75%) ⬇️
...a/com/github/dockerjava/api/command/GraphData.java 87.5% <0%> (-12.5%) ⬇️
...thub/dockerjava/core/command/PullImageCmdImpl.java 76.19% <0%> (-8.03%) ⬇️
.../com/github/dockerjava/jaxrs/PullImageCmdExec.java 92.3% <0%> (-7.7%) ⬇️
.../github/dockerjava/core/command/CommitCmdImpl.java 32.95% <0%> (-3.41%) ⬇️
...a/com/github/dockerjava/core/RemoteApiVersion.java 75% <0%> (-2.97%) ⬇️
...hub/dockerjava/core/DefaultDockerClientConfig.java 80.55% <0%> (-2.48%) ⬇️
... and 206 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcb791a...db1df35. Read the comment docs.


@Override
public CreateContainerCmd withGroupAdd(String[] groupAdd) {
checkNotNull(groupAdd, "groupAdd was not specified");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove null check

* @see #groupAdd
*/
@CheckForNull
public String[] getGroupAdd() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use lists

Niklas Bolander and others added 4 commits November 21, 2017 09:54
@bol
Copy link
Copy Markdown
Author

bol commented Feb 7, 2018

Updated this PR with changes from master. Build is currently broken because eclipse.org is sending a 302 with a reference to their error page on a missing dependency instead of a proper 404. Should build cleanly again when their repo repo is back in a sane state.


@Override
@JsonIgnore
public List<String> getGroupAdd() {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't proxy host changes, keep only getter/setters in hostconfig

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that not make it awkward to use?
I saw several parts of hostconfig being proxied, is there a practice for which of them to expose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants