Skip to content

Commit

Permalink
fix clb cannot get metric
Browse files Browse the repository at this point in the history
  • Loading branch information
shitoumomo committed Mar 31, 2022
1 parent 822ff84 commit 9d80d8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/instance/repository_clb.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ func init() {
registerRepository("QCE/LOADBALANCE", NewClbTcInstanceRepository)
}

var open = "OPEN"

type ClbTcInstanceRepository struct {
client *sdk.Client
logger log.Logger
Expand All @@ -36,6 +38,7 @@ func (repo *ClbTcInstanceRepository) Get(id string) (instance TcInstance, err er
} else {
req.LoadBalancerIds = []*string{&id}
}
req.LoadBalancerType = &open

resp, err := repo.client.DescribeLoadBalancers(req)
if err != nil {
Expand Down Expand Up @@ -67,6 +70,7 @@ func (repo *ClbTcInstanceRepository) ListByFilters(filters map[string]string) (i

req.Offset = &offset
req.Limit = &limit
req.LoadBalancerType = &open

getMoreInstances:
resp, err := repo.client.DescribeLoadBalancers(req)
Expand Down

0 comments on commit 9d80d8f

Please sign in to comment.