mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #5948 from tb365/automated-cherry-pick-of-#5945-upstream-release-3.1
Automated cherry pick of #5945: huawei elb sync vpc
This commit is contained in:
@@ -803,6 +803,12 @@ func (lb *SLoadbalancer) SyncWithCloudLoadbalancer(ctx context.Context, userCred
|
||||
lb.LBInfo = extLb.GetMetadata()
|
||||
}
|
||||
|
||||
if vpcId := extLb.GetVpcId(); len(vpcId) > 0 {
|
||||
if vpc, err := db.FetchByExternalId(VpcManager, vpcId); err == nil && vpc != nil {
|
||||
lb.VpcId = vpc.GetId()
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user