in Kubernetes/wincni/network/manager.go [75:94]
func (nm *networkManager) CreateNetwork(config *NetworkInfo) (*NetworkInfo, error) {
nm.Lock()
defer nm.Unlock()
hnsNetworkConfig := config.GetHNSNetworkConfig()
jsonString, err := json.Marshal(hnsNetworkConfig)
if err != nil {
return nil, err
}
configuration := string(jsonString)
hnsnetwork, err := hcsshim.HNSNetworkRequest(string(POST), "", configuration)
if err != nil {
return nil, err
}
// Update the ID of the
return GetNetworkInfo(hnsnetwork), err
}