func GetNetworkInfo()

in Kubernetes/wincni/network/network.go [68:85]


func GetNetworkInfo(hnsNetwork *hcsshim.HNSNetwork) *NetworkInfo {
	var subnets []SubnetInfo
	for _, subnet := range hnsNetwork.Subnets {
		subnets = append(subnets, GetSubnetInfo(&subnet))
	}
	return &NetworkInfo{
		ID:            hnsNetwork.Id,
		Name:          hnsNetwork.Name,
		Type:          NetworkType(hnsNetwork.Type),
		InterfaceName: hnsNetwork.NetworkAdapterName,
		Subnets:       subnets,
		DNS: DNSInfo{
			Suffix:  hnsNetwork.DNSSuffix,
			Servers: strings.Split(hnsNetwork.DNSServerList, ","),
		},
		Policies: GetNetworkPolicies(hnsNetwork.Policies),
	}
}