Merge pull request #6232 from tb365/bugfix/tb-bugfix-0509

huawei network id fix
This commit is contained in:
Zexi Li
2020-05-10 21:33:15 +08:00
committed by GitHub
2 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -950,7 +950,8 @@ func (lb *SLoadbalancer) SyncWithCloudLoadbalancer(ctx context.Context, userCred
lb.EgressMbps = extLb.GetEgressMbps()
lb.ChargeType = extLb.GetChargeType()
lb.ManagerId = provider.Id
lbNetworkIds := getExtLbNetworkIds(extLb)
lb.NetworkId = strings.Join(lbNetworkIds, ",")
if extLb.GetMetadata() != nil {
lb.LBInfo = extLb.GetMetadata()
}
+6 -1
View File
@@ -149,7 +149,12 @@ func (self *SLoadbalancer) GetNetworkType() string {
}
func (self *SLoadbalancer) GetNetworkIds() []string {
return []string{self.VipSubnetID}
net := self.GetNetwork()
if net != nil {
return []string{net.GetId()}
}
return []string{}
}
func (self *SLoadbalancer) GetNetwork() *SNetwork {