code: func procCreateNetwork(c libnetwork.NetworkController, vars map[string]string, body []byte) (interface{}, *responseStatus) {
  	var create networkCreate
  
  	err := json.Unmarshal(body, &create)
  	if err != nil {
  		return nil, &responseStatus{Status: "Invalid body: " + err.Error(), StatusCode: http.StatusBadRequest}
  	}
  	processCreateDefaults(c, &create)
  
  	options := []libnetwork.NetworkOption{}
  	if val, ok := create.NetworkOpts[netlabel.Internal]; ok {
  		internal, err := strconv.ParseBool(val)
  		if err != nil {
  			return nil, &responseStatus{Status: err.Error(), StatusCode: http.StatusBadRequest}
  		}
  		if internal {
  			options = append(options, libnetwork.NetworkOptionInternalNetwork())
  		}
  	}
  	if val, ok := create.NetworkOpts[netlabel.EnableIPv6]; ok {
  		enableIPv6, err := strconv.ParseBool(val)
  		if err != nil {
  			return nil, &responseStatus{Status: err.Error(), StatusCode: http.StatusBadRequest}
  		}
  		options = append(options, libnetwork.NetworkOptionEnableIPv6(enableIPv6))
  	}
  	if len(create.DriverOpts) > 0 {
  		options = append(options, libnetwork.NetworkOptionDriverOpts(create.DriverOpts))
  	}
  
  	if len(create.IPv4Conf) > 0 {
  		ipamV4Conf := &libnetwork.IpamConf{
  			PreferredPool: create.IPv4Conf[0].PreferredPool,
  			SubPool:       create.IPv4Conf[0].SubPool,
  		}
  
  		options = append(options, libnetwork.NetworkOptionIpam("default", "", []*libnetwork.IpamConf{ipamV4Conf}, nil, nil))
  	}
  
  	nw, err := c.NewNetwork(create.NetworkType, create.Name, create.ID, options...)
  	if err != nil {
  		return nil, convertNetworkError(err)
  	}
  
  	return nw.ID(), &createdResponse
  }
docs: /***************************
   NetworkController interface
  ****************************/