Skip to content
Snippets Groups Projects
Unverified Commit 4d3c7f30 authored by 李泽玺's avatar 李泽玺 Committed by GitHub
Browse files

Merge pull request #8785 from tb365/automated-cherry-pick-of-#8783-upstream-release-3.4

Automated cherry pick of #8783: aliyun finance cloud region add suffix
parents fd26fc19 befef016
No related branches found
No related tags found
No related merge requests found
......@@ -196,7 +196,11 @@ func (self *SRegion) GetId() string {
}
func (self *SRegion) GetName() string {
return fmt.Sprintf("%s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName)
if self.GetCloudEnv() == ALIYUN_FINANCE_CLOUDENV && !strings.Contains(self.LocalName, "金融") {
return fmt.Sprintf("%s %s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName, "金融云")
} else {
return fmt.Sprintf("%s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName)
}
}
func (self *SRegion) GetGlobalId() string {
......@@ -212,7 +216,7 @@ func (self *SRegion) GetProvider() string {
}
func (self *SRegion) GetCloudEnv() string {
return ""
return self.client.cloudEnv
}
func (self *SRegion) GetGeographicInfo() cloudprovider.SGeographicInfo {
......
......@@ -16,6 +16,7 @@ package aliyun
import (
"fmt"
"strings"
"yunion.io/x/jsonutils"
"yunion.io/x/log"
......@@ -139,7 +140,11 @@ func (self *SZone) GetId() string {
}
func (self *SZone) GetName() string {
return fmt.Sprintf("%s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName)
if self.region.GetCloudEnv() == ALIYUN_FINANCE_CLOUDENV && !strings.Contains(self.LocalName, "金融") {
return fmt.Sprintf("%s %s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName, "金融云")
} else {
return fmt.Sprintf("%s %s", CLOUD_PROVIDER_ALIYUN_CN, self.LocalName)
}
}
func (self *SZone) GetGlobalId() string {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment