From 6ba9a8fae83fa41ebe38e6c2655a708d0d333cda Mon Sep 17 00:00:00 2001 From: Qu Xuan Date: Wed, 3 Jun 2020 20:39:00 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0region=E7=BF=BB?= =?UTF-8?q?=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/apis/compute/cloudregions_const.go | 9 +++++++++ pkg/multicloud/aws/latitude_and_longitude.go | 1 + pkg/multicloud/huawei/latitud_and_longitude.go | 5 +++++ pkg/multicloud/qcloud/latitud_and_longitude.go | 2 ++ 4 files changed, 17 insertions(+) diff --git a/pkg/apis/compute/cloudregions_const.go b/pkg/apis/compute/cloudregions_const.go index 069fbc0bc3..56fccd2d51 100644 --- a/pkg/apis/compute/cloudregions_const.go +++ b/pkg/apis/compute/cloudregions_const.go @@ -56,6 +56,7 @@ const ( CITY_NAN_JING = "Nanjing" //南京 CITY_FO_SHAN = "Foshan" //佛山 CITY_QUAN_ZHOU = "Quanzhou" //泉州 + CITY_NEI_MENG_GU = "Neimenggu" //内蒙古 // 日本 CITY_TOKYO = "Tokyo" //东京 @@ -150,6 +151,12 @@ const ( // 巴西 CITY_SAO_PAULO = "Sao Paulo" //圣保罗 + // 智利 + CITY_SANTIAGO = "Santiago" // 圣地亚哥 + + // 墨西哥 + CITY_MEXICO = "Mexico" // 墨西哥 + // 荷兰 CITY_HOLLAND = "Holland" //荷兰 @@ -195,4 +202,6 @@ const ( COUNTRY_CODE_VN = "VN" //越南 COUNTRY_CODE_CH = "CH" //瑞士 COUNTRY_CODE_NO = "NO" //挪威 + COUNTRY_CODE_MX = "MX" //墨西哥 + COUNTRY_CODE_CL = "CL" //智利 ) diff --git a/pkg/multicloud/aws/latitude_and_longitude.go b/pkg/multicloud/aws/latitude_and_longitude.go index d94f0e6d64..907298594e 100644 --- a/pkg/multicloud/aws/latitude_and_longitude.go +++ b/pkg/multicloud/aws/latitude_and_longitude.go @@ -32,6 +32,7 @@ var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ "ap-southeast-1": {Latitude: 1.352083, Longitude: 103.819836, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, "ap-southeast-2": {Latitude: -33.8688197, Longitude: 151.2092955, City: api.CITY_SYDNEY, CountryCode: api.COUNTRY_CODE_AU}, "ap-northeast-1": {Latitude: 35.7090259, Longitude: 139.7319925, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, + "ap-east-1": {Latitude: 22.396428, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, "ca-central-1": {Latitude: 56.130366, Longitude: -106.346771, City: api.CITY_CANADA_CENTRAL, CountryCode: api.COUNTRY_CODE_CA}, "cn-north-1": {Latitude: 39.90419989999999, Longitude: 116.4073963, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, "cn-northwest-1": {Latitude: 37.198731, Longitude: 106.1580937, City: api.CITY_NING_XIA, CountryCode: api.COUNTRY_CODE_CN}, diff --git a/pkg/multicloud/huawei/latitud_and_longitude.go b/pkg/multicloud/huawei/latitud_and_longitude.go index 9cab6fd2cc..faac90d77f 100644 --- a/pkg/multicloud/huawei/latitud_and_longitude.go +++ b/pkg/multicloud/huawei/latitud_and_longitude.go @@ -36,4 +36,9 @@ var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ "cn-northeast-1": {Latitude: 38.91400300000001, Longitude: 121.614682, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, "cn-southwest-2": {Latitude: 26.6470035286, Longitude: 106.6302113880, City: api.CITY_GUI_YANG, CountryCode: api.COUNTRY_CODE_CN}, "af-south-1": {Latitude: -26.1714537, Longitude: 27.8999389, City: api.CITY_JOHANNESBURG, CountryCode: api.COUNTRY_CODE_ZA}, + "sa-brazil-1": {Latitude: -23.5505199, Longitude: -46.6333094, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR}, + "na-mexico-1": {Latitude: 55.1182908, Longitude: 141.0377645, City: api.CITY_MEXICO, CountryCode: api.COUNTRY_CODE_MX}, + "la-south-2": {Latitude: -33.45206, Longitude: -70.676031, City: api.CITY_SANTIAGO, CountryCode: api.COUNTRY_CODE_CL}, + "cn-north-9": {Latitude: 41.0178713, Longitude: 113.094978, City: api.CITY_NEI_MENG_GU, CountryCode: api.COUNTRY_CODE_CN}, + "cn-north-219": {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, } diff --git a/pkg/multicloud/qcloud/latitud_and_longitude.go b/pkg/multicloud/qcloud/latitud_and_longitude.go index ed9baece5f..09f0ba3e37 100644 --- a/pkg/multicloud/qcloud/latitud_and_longitude.go +++ b/pkg/multicloud/qcloud/latitud_and_longitude.go @@ -39,4 +39,6 @@ var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ "na-ashburn": {Latitude: 37.431572, Longitude: -78.656891, City: api.CITY_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, // 腾讯云 美国东部(弗吉尼亚) "na-siliconvalley": {Latitude: 37.387474, Longitude: -122.057541, City: api.CITY_SILICONVALLEY, CountryCode: api.COUNTRY_CODE_US}, // 腾讯云 美国西部(硅谷) "na-toronto": {Latitude: 43.653225, Longitude: -79.383186, City: api.CITY_TORONTO, CountryCode: api.COUNTRY_CODE_CA}, // 腾讯云 北美地区(多伦多) + + "ap-nanjing": {Latitude: 32.0584065670, Longitude: 118.7964897811, City: api.CITY_NAN_JING, CountryCode: api.COUNTRY_CODE_CN}, }