mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #11741 from rainzm/vmware/net_dup
fix(region): prevent the creation of redundant network segments when managing vmware
This commit is contained in:
@@ -230,6 +230,9 @@ func (self *CloudAccountSyncVMwareNetworkTask) createNetworks(ctx context.Contex
|
||||
var err error
|
||||
ret := make(map[string][]models.SVs2Wire)
|
||||
for i := range capWires {
|
||||
if len(capWires[i].GuestNetworks)+len(capWires[i].HostNetworks) == 0 {
|
||||
continue
|
||||
}
|
||||
var wireId = capWires[i].WireId
|
||||
if len(wireId) == 0 {
|
||||
wireId, err = self.createWire(ctx, cloudaccount, api.DEFAULT_VPC_ID, zoneId, capWires[i].Name, capWires[i].Description)
|
||||
|
||||
Reference in New Issue
Block a user