mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #7221 from ioito/hotfix/qx-aliyun-endpoint
fix: 避免乌兰察布区域拉取资源异常
This commit is contained in:
@@ -43,6 +43,8 @@ type SRegion struct {
|
||||
RegionId string
|
||||
LocalName string
|
||||
|
||||
RegionEndpoint string
|
||||
|
||||
izones []cloudprovider.ICloudZone
|
||||
|
||||
ivpcs []cloudprovider.ICloudVpc
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user