Skip to content

Commit

Permalink
fix: 避免乌兰察布区域拉取资源异常
Browse files Browse the repository at this point in the history
  • Loading branch information
Qu Xuan committed Jul 17, 2020
1 parent 5cd0873 commit a443975
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pkg/multicloud/aliyun/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ type SRegion struct {
RegionId string
LocalName string

RegionEndpoint string

izones []cloudprovider.ICloudZone

ivpcs []cloudprovider.ICloudVpc
Expand Down Expand Up @@ -105,7 +107,11 @@ func (self *SRegion) ecsRequest(apiName string, params map[string]string) (jsonu
if err != nil {
return nil, err
}
return jsonRequest(client, "ecs.aliyuncs.com", ALIYUN_API_VERSION, apiName, params, self.client.debug)
endpoint := self.RegionEndpoint
if len(endpoint) == 0 {
endpoint = "ecs.aliyuncs.com"
}
return jsonRequest(client, endpoint, ALIYUN_API_VERSION, apiName, params, self.client.debug)
}

func (self *SRegion) rdsRequest(apiName string, params map[string]string) (jsonutils.JSONObject, error) {
Expand Down

0 comments on commit a443975

Please sign in to comment.