Skip to content

Commit

Permalink
huawei elb sync vpc
Browse files Browse the repository at this point in the history
  • Loading branch information
tangbin committed Apr 22, 2020
1 parent e55bb82 commit bd0a8f7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/compute/models/loadbalancers.go
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,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
})

Expand Down

0 comments on commit bd0a8f7

Please sign in to comment.