X Tutup
Skip to content

Add ability to configure IPAM config for CreateNetworkCmd #550

Merged
marcuslinke merged 8 commits intodocker-java:masterfrom
vuminhkh:master
May 12, 2016
Merged

Add ability to configure IPAM config for CreateNetworkCmd #550
marcuslinke merged 8 commits intodocker-java:masterfrom
vuminhkh:master

Conversation

@vuminhkh
Copy link
Copy Markdown
Contributor

Hi,

I'm fixing a minor issue in network creation API. Please let me know if it's ok for you. Thanks.

Regards,

Minh Khang VU


This change is Reviewable

@codecov-io
Copy link
Copy Markdown

Current coverage is 23.78%

Merging #550 into master will decrease coverage by -0.03% as of cc0beb0

@@            master    #550   diff @@
======================================
  Files          296     296       
  Stmts         6123    6131     +8
  Branches       532     533     +1
  Methods          0       0       
======================================
  Hit           1458    1458       
  Partial         85      85       
- Missed        4580    4588     +8

Review entire Coverage Diff as of cc0beb0

Powered by Codecov. Updated on successful CI builds.

CreateNetworkResponse createNetworkResponse = dockerClient.createNetworkCmd().withName(networkName).exec();
Network.Ipam.Config config = new Network.Ipam.Config();
config.setSubnet("10.67.79.0/24");
CreateNetworkResponse createNetworkResponse = dockerClient.createNetworkCmd().withName(networkName).withIpamConfig(config).exec();
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.

please create separate test

@marcuslinke marcuslinke added this to the 3.0.0-RC6 milestone Apr 22, 2016
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import org.testng.annotations.*;
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.

please don't use hash imports

@marcuslinke
Copy link
Copy Markdown
Contributor

@vuminhkh Please rename tests to createNetworkWithIpamConfig. Thanks! Beside this it LGTM. @KostyaSha WDYT?

@marcuslinke marcuslinke merged commit 4431df9 into docker-java:master May 12, 2016
@marcuslinke
Copy link
Copy Markdown
Contributor

@vuminhkh Thanks for contributing!

if (this.ipam == null) {
this.ipam = new Ipam();
}
this.ipam.getConfig().add(config);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No. In this line.

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.

4 participants

X Tutup