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:
Zexi Li
2020-04-22 23:55:51 +08:00
committed by GitHub
+6
View File
@@ -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
})