code: func (d *driver) CreateNetwork(id string, option map[string]interface{}, nInfo driverapi.NetworkInfo, ipV4Data, ipV6Data []driverapi.IPAMData) error {
  	if len(ipV4Data) == 0 || ipV4Data[0].Pool.String() == "0.0.0.0/0" {
  		return types.BadRequestErrorf("ipv4 pool is empty")
  	}
  	// Sanity checks
  	d.Lock()
  	if _, ok := d.networks[id]; ok {
  		d.Unlock()
  		return types.ForbiddenErrorf("network %s exists", id)
  	}
  	d.Unlock()
  
  	// Parse and validate the config. It should not be conflict with existing networks' config
  	config, err := parseNetworkOptions(id, option)
  	if err != nil {
  		return err
  	}
  
  	if err = config.processIPAM(id, ipV4Data, ipV6Data); err != nil {
  		return err
  	}
  
  	// start the critical section, from this point onward we are dealing with the list of networks
  	// so to be consistent we cannot allow that the list changes
  	d.configNetwork.Lock()
  	defer d.configNetwork.Unlock()
  
  	// check network conflicts
  	if err = d.checkConflict(config); err != nil {
  		nerr, ok := err.(defaultBridgeNetworkConflict)
  		if !ok {
  			return err
  		}
  		// Got a conflict with a stale default network, clean that up and continue
  		logrus.Warn(nerr)
  		d.deleteNetwork(nerr.ID)
  	}
  
  	// there is no conflict, now create the network
  	if err = d.createNetwork(config); err != nil {
  		return err
  	}
  
  	return d.storeUpdate(config)
  }
docs: // Create a new network using bridge plugin