Pass network driver option in docker network command

Signed-off-by: Madhu Venugopal <madhu@docker.com>
This commit is contained in:
Madhu Venugopal
2015-10-22 15:07:02 -04:00
committed by Tibor Vass
parent cbec9c9a6b
commit 1361eaef7c
6 changed files with 41 additions and 11 deletions
+2 -1
View File
@@ -96,7 +96,7 @@ func (n *networkRouter) postNetworkCreate(ctx context.Context, w http.ResponseWr
warning = fmt.Sprintf("Network with name %s (id : %s) already exists", nw.Name(), nw.ID())
}
nw, err = n.daemon.CreateNetwork(create.Name, create.Driver, create.IPAM)
nw, err = n.daemon.CreateNetwork(create.Name, create.Driver, create.IPAM, create.Options)
if err != nil {
return err
}
@@ -182,6 +182,7 @@ func buildNetworkResource(nw libnetwork.Network) *types.NetworkResource {
r.ID = nw.ID()
r.Scope = nw.Info().Scope()
r.Driver = nw.Type()
r.Options = nw.Info().DriverOptions()
r.Containers = make(map[string]types.EndpointResource)
buildIpamResources(r, nw)