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.
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
Allow user to specify default address pools for docker networks #36396
Allow user to specify default address pools for docker networks #36396
Changes from all commits
173b3c3
File filter...
Jump to…
cpuguy83Apr 25, 2018
Contributor
These flushes are pretty generic. Can we instead delete the rules that are needed?
Alternatively maybe start the tests in a custom network namespace to prevent leaking to other tests.
selansenApr 25, 2018
Author
Contributor
one of the key test for this feature is to delete docker0 network and see if it comes up with new IP Subnetwork range. So we need this.
cpuguy83Apr 25, 2018
Contributor
But it's flushing the whole table.
selansenApr 25, 2018
Author
Contributor
func DeleteInterface(t *testing.T, ifName string) {
This is helper function and it is used only in test API. when we delete interface we clear NAT rules associated to have clear start for testing purpose. I did some code reading and looks like already same function is added in helper.go. Pls take a look at it
moby/integration/network/helpers.go
Line 31 in 18bfe3c
cpuguy83Apr 25, 2018
Contributor
If it works I guess it doesn't matter🤷♂️
cpuguy83Apr 10, 2018
Contributor
Seems like we really want
type PoolsOpt []*types.NetworkToSplit
, though I'm not sure why that would be a pointer.thaJeztahApr 26, 2018
Member
@selansen could you have a look at this one? (also why we need a pointer)?
selansenApr 26, 2018
Author
Contributor
I had discussion with Brian over phone on this. when we expand this feature to add global scope we will be adding more attribute to this structure and hence keeping struct as it is.
cpuguy83Apr 10, 2018
Contributor
This could use a unit test.
selansenApr 20, 2018
•
edited
Author
Contributor
I have newly added 6 more integration tests now to cover all combination.
Will check if any Set functions have unit test and add accordingly
selansenApr 23, 2018
Author
Contributor
added unit test also for Set function
thaJeztahApr 30, 2018
Member
not a blocker (should check what we do for other options), but we should consider removing these, and be strict (i.e. only lowercase if that's what the option is named)
thaJeztahApr 27, 2018
Member
Ok, I just checked: what's needed to make
default-address-pools
(plural) work insidedaemon.json
, but--default-address-pool
as flag, is to implement theNamedOption
interface;(last line is optional, and only to verify we implement the
NamedOption
interface)Adding the above, and both of these will work:
As flag (singular)
In daemon.json (plural):