MCPcopy Create free account
hub / github.com/deepflowio/deepflow / getSubDomainNetworks

Method getSubDomainNetworks

server/controller/cloud/sub_domain.go:872–908  ·  view source on GitHub ↗
(
	subDomainLcuuid string, resource *kubernetes_model.KubernetesGatherResource, azLcuuid string,
)

Source from the content-addressed store, hash-verified

870}
871
872func (c *Cloud) getSubDomainNetworks(
873 subDomainLcuuid string, resource *kubernetes_model.KubernetesGatherResource, azLcuuid string,
874) []model.Network {
875 var retNetworks []model.Network
876
877 // 遍历Networks,更新az和subDomain信息
878 for _, network := range []model.Network{
879 resource.PodNetwork, resource.PodServiceNetwork,
880 } {
881 retNetworks = append(retNetworks, model.Network{
882 Lcuuid: network.Lcuuid,
883 Name: network.Name,
884 Label: network.Label,
885 NetType: network.NetType,
886 VPCLcuuid: network.VPCLcuuid,
887 AZLcuuid: azLcuuid,
888 RegionLcuuid: network.RegionLcuuid,
889 SubDomainLcuuid: subDomainLcuuid,
890 })
891 }
892
893 // set podNodeNetwork netType = LAN
894 for _, network := range []model.Network{resource.PodNodeNetwork} {
895 retNetworks = append(retNetworks, model.Network{
896 Lcuuid: network.Lcuuid,
897 Name: network.Name,
898 Label: network.Label,
899 NetType: common.NETWORK_TYPE_LAN,
900 VPCLcuuid: network.VPCLcuuid,
901 AZLcuuid: azLcuuid,
902 RegionLcuuid: network.RegionLcuuid,
903 SubDomainLcuuid: subDomainLcuuid,
904 })
905 }
906
907 return retNetworks
908}
909
910func (c *Cloud) getSubDomainConfigMaps(
911 subDomainLcuuid string, resource *kubernetes_model.KubernetesGatherResource, azLcuuid string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected