func (daemon *Daemon) CreateNetwork(name, driver string, ipam network.IPAM, options map[string]string) (libnetwork.Network, error) {
	c := daemon.netController
	if driver == "" {
		driver = c.Config().Daemon.DefaultDriver
	}

	nwOptions := []libnetwork.NetworkOption{}

	v4Conf, v6Conf, err := getIpamConfig(ipam.Config)
	if err != nil {
		return nil, err
	}

	nwOptions = append(nwOptions, libnetwork.NetworkOptionIpam(ipam.Driver, "", v4Conf, v6Conf))
	nwOptions = append(nwOptions, libnetwork.NetworkOptionDriverOpts(options))
	return c.NewNetwork(driver, name, nwOptions...)
}
// CreateNetwork creates a network with the given name, driver and other optional parameters
CreateNetwork creates a network with the given name, driver and other optional parameters
// CreateNetwork creates a network with the given name driver and other optional parameters
func (daemon *Daemon) CreateNetwork(name, driver string, ipam network.IPAM, options map[string]string) (libnetwork.Network, error) {
	c := daemon.netController
	if driver == "" {
		driver = c.Config().Daemon.DefaultDriver
	}
	nwOptions := []libnetwork.NetworkOption{}
	v4Conf, v6Conf, err := getIpamConfig(ipam.Config)
	if err != nil {
		return nil, err
	}
	nwOptions = append(nwOptions, libnetwork.NetworkOptionIpam(ipam.Driver, "", v4Conf, v6Conf))
	nwOptions = append(nwOptions, libnetwork.NetworkOptionDriverOpts(options))
	return c.NewNetwork(driver, name, nwOptions...)
}
func ( daemon * Daemon ) CreateNetwork ( name , driver string , ipam network . IPAM , options map [ string ] string ) ( libnetwork . Network , error ) { c := daemon . netController if driver == " " { driver = c . Config ( ) . Daemon . DefaultDriver } nwOptions := [ ] libnetwork . NetworkOption { } v4Conf , v6Conf , err := getIpamConfig ( ipam . Config ) if err != nil { return nil , err } nwOptions = append ( nwOptions , libnetwork . NetworkOptionIpam ( ipam . Driver , " " , v4Conf , v6Conf ) ) nwOptions = append ( nwOptions , libnetwork . NetworkOptionDriverOpts ( options ) ) return c . NewNetwork ( driver , name , nwOptions ... ) }
CreateNetwork creates a network with the given name, driver and other optional parameters
CreateNetwork creates a network with the given name driver and other optional parameters