Merge pull request #29826 from vdemeester/29809-fix-network-ipam-configuration

[1.13.x] Change the way IPAM configuration is handled on stack deploy
This commit is contained in:
Victor Vieux 2017-01-25 11:51:35 -08:00 committed by GitHub
commit 3fdce9676b

View file

@ -186,9 +186,13 @@ func BasicNetworkCreateToGRPC(create basictypes.NetworkCreateRequest) swarmapi.N
Attachable: create.Attachable,
}
if create.IPAM != nil {
driver := create.IPAM.Driver
if driver == "" {
driver = "default"
}
ns.IPAM = &swarmapi.IPAMOptions{
Driver: &swarmapi.Driver{
Name: create.IPAM.Driver,
Name: driver,
Options: create.IPAM.Options,
},
}