Merge pull request #30633 from vdemeester/29809-fix-network-ipam-configuration-on-master

Follow-up of 29826 Use default driver for IPAM if none
This commit is contained in:
Vincent Demeester 2017-02-01 17:53:49 +01:00 committed by GitHub
commit 829ea91bd1

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,
},
}