mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #9463 from rainzm/vmware/vswitch
fix(region): exclude network recommended for host when suggesting net…
This commit is contained in:
@@ -655,6 +655,15 @@ func (scm *SCloudaccountManager) parseAndSuggest(params sParseAndSuggest) api.Cl
|
||||
}
|
||||
}
|
||||
|
||||
for i := range wireNet.HostSuggestedNetworks {
|
||||
ipStart, _ := netutils.NewIPV4Addr(wireNet.HostSuggestedNetworks[i].GuestIpStart)
|
||||
ipEnd, _ := netutils.NewIPV4Addr(wireNet.HostSuggestedNetworks[i].GuestIpEnd)
|
||||
existedNetMap[ipStart] = simpleNet{}
|
||||
if ipEnd != ipStart {
|
||||
existedNetMap[ipEnd] = simpleNet{}
|
||||
}
|
||||
}
|
||||
|
||||
guests := make([]api.CAGuestNet, len(ni.VMs))
|
||||
for i := range guests {
|
||||
guests[i].Name = ni.VMs[i].Name
|
||||
|
||||
Reference in New Issue
Block a user