diff --git a/pkg/apis/compute/cloudregions_const.go b/pkg/apis/compute/cloudregions_const.go index f0f34f8846..de1419db49 100644 --- a/pkg/apis/compute/cloudregions_const.go +++ b/pkg/apis/compute/cloudregions_const.go @@ -67,6 +67,7 @@ const ( CITY_XIA_MEN = "XiaMen" //厦门 CITY_HUAI_NAN = "HuaiNan" //淮南 CITY_SU_QIAN = "SuQian" //宿迁 + CITY_DA_LIAN = "Dalian" //大连 // 日本 CITY_TOKYO = "Tokyo" //东京 @@ -101,6 +102,7 @@ const ( CITY_JAKARTA = "Jakarta" //雅加达 // 印度 + CITY_DELHI = "Delhi" // 德里 CITY_MUMBAI = "Mumbai" //孟买 CITY_KANCHIPURAM = "Kanchipuram" //甘吉布勒姆 CITY_MAHARASHTRA = "Maharashtra" //马哈拉施特拉邦 @@ -159,6 +161,9 @@ const ( // 瑞典 CITY_STOCKHOLM = "Stockholm" //斯德哥尔摩 + // 波兰 + CITY_WARSAW = "Warsaw" // 华沙 + // 巴西 CITY_SAO_PAULO = "Sao Paulo" //圣保罗 CITY_RIO_DE_JANEIRO = "Rio de Janeiro" // 里约热内卢 @@ -220,4 +225,7 @@ const ( COUNTRY_CODE_MX = "MX" //墨西哥 COUNTRY_CODE_CL = "CL" //智利 COUNTRY_CODE_BH = "BH" //巴林 + COUNTRY_CODE_PL = "PL" //波兰 + COUNTRY_CODE_FI = "FI" //芬兰 + COUNTRY_CODE_BE = "BE" //比利时 ) diff --git a/pkg/apis/compute/regiondata.go b/pkg/apis/compute/regiondata.go new file mode 100644 index 0000000000..c21e7142ae --- /dev/null +++ b/pkg/apis/compute/regiondata.go @@ -0,0 +1,556 @@ +// Copyright 2019 Yunion +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package compute + +import ( + "yunion.io/x/onecloud/pkg/cloudprovider" +) + +var ( + // China + RegionBeijing = cloudprovider.SGeographicInfo{ + Latitude: 39.90419989999999, + Longitude: 116.4073963, + City: CITY_BEI_JING, + CountryCode: COUNTRY_CODE_CN, + } + RegionNingxia = cloudprovider.SGeographicInfo{ + Latitude: 37.198731, + Longitude: 106.1580937, + City: CITY_NING_XIA, + CountryCode: COUNTRY_CODE_CN, + } + RegionShanghai = cloudprovider.SGeographicInfo{ + Latitude: 31.17, + Longitude: 121.47, + City: CITY_SHANG_HAI, + CountryCode: COUNTRY_CODE_CN, + } + RegionGuangzhou = cloudprovider.SGeographicInfo{ + Latitude: 23.12911, + Longitude: 113.264385, + City: CITY_GUANG_ZHOU, + CountryCode: COUNTRY_CODE_CN, + } + RegionDalian = cloudprovider.SGeographicInfo{ + Latitude: 38.91400300000001, + Longitude: 121.614682, + City: CITY_DA_LIAN, + CountryCode: COUNTRY_CODE_CN, + } + RegionGuiyang = cloudprovider.SGeographicInfo{ + Latitude: 26.6470035286, + Longitude: 106.6302113880, + City: CITY_GUI_YANG, + CountryCode: COUNTRY_CODE_CN, + } + RegionNeimenggu = cloudprovider.SGeographicInfo{ + Latitude: 41.0178713, + Longitude: 113.094978, + City: CITY_NEI_MENG_GU, + CountryCode: COUNTRY_CODE_CN, + } + RegionQingdao = cloudprovider.SGeographicInfo{ + Latitude: 36.067108, + Longitude: 120.382607, + City: CITY_QING_DAO, + CountryCode: COUNTRY_CODE_CN, + } + RegionZhangjiakou = cloudprovider.SGeographicInfo{ + Latitude: 40.767544, + Longitude: 114.886337, + City: CITY_ZHANG_JIA_KOU, + CountryCode: COUNTRY_CODE_CN, + } + RegionHuhehaote = cloudprovider.SGeographicInfo{ + Latitude: 40.842358, + Longitude: 111.749992, + City: CITY_HU_HE_HAO_TE, + CountryCode: COUNTRY_CODE_CN, + } + RegionHangzhou = cloudprovider.SGeographicInfo{ + Latitude: 30.274084, + Longitude: 120.155067, + City: CITY_HANG_ZHOU, + CountryCode: COUNTRY_CODE_CN, + } + RegionShenzhen = cloudprovider.SGeographicInfo{ + Latitude: 22.543097, + Longitude: 114.057861, + City: CITY_SHEN_ZHEN, + CountryCode: COUNTRY_CODE_CN, + } + RegionChengdu = cloudprovider.SGeographicInfo{ + Latitude: 30.572815, + Longitude: 104.066803, + City: CITY_CHENG_DU, + CountryCode: COUNTRY_CODE_CN, + } + RegionHeyuan = cloudprovider.SGeographicInfo{ + Latitude: 23.7292717, + Longitude: 114.6965786, + City: CITY_HE_YUAN, + CountryCode: COUNTRY_CODE_CN, + } + RegionWulanchabu = cloudprovider.SGeographicInfo{ + Latitude: 41.0178065, + Longitude: 113.094978, + City: CITY_WU_LAN_CHA_BU, + CountryCode: COUNTRY_CODE_CN, + } + RegionChongqing = cloudprovider.SGeographicInfo{ + Latitude: 29.431585, + Longitude: 106.912254, + City: CITY_CHONG_QING, + CountryCode: COUNTRY_CODE_CN, + } + RegionNanjing = cloudprovider.SGeographicInfo{ + Latitude: 32.0584065670, + Longitude: 118.7964897811, + City: CITY_NAN_JING, + CountryCode: COUNTRY_CODE_CN, + } + + // Asia + RegionTaiwan = cloudprovider.SGeographicInfo{ + Latitude: 25.0443, + Longitude: 121.509, + City: CITY_TAI_WAN, + CountryCode: COUNTRY_CODE_CN, + } + RegionHongkong = cloudprovider.SGeographicInfo{ + Latitude: 22.396427, + Longitude: 114.109497, + City: CITY_HONG_KONG, + CountryCode: COUNTRY_CODE_CN, + } + RegionTokyo = cloudprovider.SGeographicInfo{ + Latitude: 35.709026, + Longitude: 139.731995, + City: CITY_TOKYO, + CountryCode: COUNTRY_CODE_JP, + } + RegionOsaka = cloudprovider.SGeographicInfo{ + Latitude: 34.6937378, + Longitude: 135.5021651, + City: CITY_OSAKA, + CountryCode: COUNTRY_CODE_JP, + } + RegionSeoul = cloudprovider.SGeographicInfo{ + Latitude: 34.6937378, + Longitude: 135.5021651, + City: CITY_SEOUL, + CountryCode: COUNTRY_CODE_KR, + } + RegionBusan = cloudprovider.SGeographicInfo{ + Latitude: 35.1, + Longitude: 129.0403, + City: CITY_BUSAN, + CountryCode: COUNTRY_CODE_KR, + } + + RegionMumbai = cloudprovider.SGeographicInfo{ + Latitude: 19.07599, + Longitude: 72.877393, + City: CITY_MUMBAI, + CountryCode: COUNTRY_CODE_IN, + } + RegionDelhi = cloudprovider.SGeographicInfo{ + Latitude: 28.61, + Longitude: 77.23, + City: CITY_DELHI, + CountryCode: COUNTRY_CODE_IN, + } + RegionMaharashtra = cloudprovider.SGeographicInfo{ + Latitude: 18.97, + Longitude: 72.82, + City: CITY_MAHARASHTRA, + CountryCode: COUNTRY_CODE_IN, + } + RegionKanchipuram = cloudprovider.SGeographicInfo{ + Latitude: 12.8387, + Longitude: 79.7016, + City: CITY_KANCHIPURAM, + CountryCode: COUNTRY_CODE_IN, + } + + RegionSingapore = cloudprovider.SGeographicInfo{ + Latitude: 1.352083, + Longitude: 103.819839, + City: CITY_SINGAPORE, + CountryCode: COUNTRY_CODE_SG, + } + RegionJakarta = cloudprovider.SGeographicInfo{ + Latitude: -6.175110, + Longitude: 106.865036, + City: CITY_JAKARTA, + CountryCode: COUNTRY_CODE_ID, + } + RegionKualaLumpur = cloudprovider.SGeographicInfo{ + Latitude: 3.139003, + Longitude: 101.686852, + City: CITY_KUALA_LUMPUR, + CountryCode: COUNTRY_CODE_MY, + } + RegionBangkok = cloudprovider.SGeographicInfo{ + Latitude: 13.7563309, + Longitude: 100.5017651, + City: CITY_BANGKOK, + CountryCode: COUNTRY_CODE_TH, + } + + RegionSydney = cloudprovider.SGeographicInfo{ + Latitude: -33.8688197, + Longitude: 151.2092955, + City: CITY_SYDNEY, + CountryCode: COUNTRY_CODE_AU, + } + RegionMelbourne = cloudprovider.SGeographicInfo{ + Latitude: -37.813611, + Longitude: 144.963056, + City: CITY_MELBOURNE, + CountryCode: COUNTRY_CODE_AU, + } + //亚拉伦拉 澳大利亚 + RegionYarralumla = cloudprovider.SGeographicInfo{ + Latitude: -35.3016, + Longitude: 149.078, + City: CITY_YARRALUMLA, + CountryCode: COUNTRY_CODE_AU, + } + + // Africa + RegionCapeTown = cloudprovider.SGeographicInfo{ + Latitude: -33.9152209, + Longitude: 18.3758904, + City: CITY_CAPE_TOWN, + CountryCode: COUNTRY_CODE_ZA, + } + // 比勒陀利亚 + RegionPretoria = cloudprovider.SGeographicInfo{ + Latitude: -25.716667, + Longitude: 28.283333, + City: CITY_PRETORIA, + CountryCode: COUNTRY_CODE_ZA, + } + RegionJohannesburg = cloudprovider.SGeographicInfo{ + Latitude: -26.1714537, + Longitude: 27.8999389, + City: CITY_JOHANNESBURG, + CountryCode: COUNTRY_CODE_ZA, + } + + // Middleeast + RegionBahrain = cloudprovider.SGeographicInfo{ + Latitude: 25.9408826, + Longitude: 50.4474957, + City: CITY_BAHRAIN, + CountryCode: COUNTRY_CODE_BH, + } + RegionDubai = cloudprovider.SGeographicInfo{ + Latitude: 25.263056, + Longitude: 55.297222, + City: CITY_DUBAI, + CountryCode: COUNTRY_CODE_AE, + } + + // Europe + RegionFinland = cloudprovider.SGeographicInfo{ + Latitude: 64.8255731, + Longitude: 21.5432837, + City: CITY_FINLAND, + CountryCode: COUNTRY_CODE_FI, + } + RegionBelgium = cloudprovider.SGeographicInfo{ + Latitude: 50.499734, + Longitude: 3.9057517, + City: CITY_BELGIUM, + CountryCode: COUNTRY_CODE_BE, + } + RegionLondon = cloudprovider.SGeographicInfo{ + Latitude: 51.507351, + Longitude: -0.127758, + City: CITY_LONDON, + CountryCode: COUNTRY_CODE_GB, + } + RegionHalton = cloudprovider.SGeographicInfo{ + Latitude: 53.3331, + Longitude: -2.6957, + City: CITY_HALTON, + CountryCode: COUNTRY_CODE_GB, + } + RegionSussex = cloudprovider.SGeographicInfo{ + Latitude: 51, + Longitude: 0, + City: CITY_WEST_SUSSEX, + CountryCode: COUNTRY_CODE_GB, + } + RegionFrankfurt = cloudprovider.SGeographicInfo{ + Latitude: 51.165691, + Longitude: 10.451526, + City: CITY_FRANKFURT, + CountryCode: COUNTRY_CODE_DE, + } + RegionHolland = cloudprovider.SGeographicInfo{ + Latitude: 52.2076831, + Longitude: 4.1585786, + City: CITY_HOLLAND, + CountryCode: COUNTRY_CODE_NL, + } + RegionZurich = cloudprovider.SGeographicInfo{ + Latitude: 47.3774497, + Longitude: 8.5016958, + City: CITY_ZURICH, + CountryCode: COUNTRY_CODE_CH, + } + RegionWarsaw = cloudprovider.SGeographicInfo{ + Latitude: 52.233333, + Longitude: 21.016667, + City: CITY_WARSAW, + CountryCode: COUNTRY_CODE_PL, + } + RegionIreland = cloudprovider.SGeographicInfo{ + Latitude: 53.41291, + Longitude: -8.24389, + City: CITY_IRELAND, + CountryCode: COUNTRY_CODE_IE, + } + RegionDublin = cloudprovider.SGeographicInfo{ + Latitude: 53.349722, + Longitude: -6.260278, + City: CITY_DUBLIN, + CountryCode: COUNTRY_CODE_IE, + } + RegionParis = cloudprovider.SGeographicInfo{ + Latitude: 48.856614, + Longitude: 2.3522219, + City: CITY_PARIS, + CountryCode: COUNTRY_CODE_FR, + } + RegionAllier = cloudprovider.SGeographicInfo{ + Latitude: 46.5178, + Longitude: 3.3592, + City: CITY_ALLIER, + CountryCode: COUNTRY_CODE_FR, + } + RegionTarn = cloudprovider.SGeographicInfo{ + Latitude: 43.8656, + Longitude: 1.505, + City: CITY_TARN, + CountryCode: COUNTRY_CODE_FR, + } + RegionStockholm = cloudprovider.SGeographicInfo{ + Latitude: 59.1946, + Longitude: 18.47, + City: CITY_STOCKHOLM, + CountryCode: COUNTRY_CODE_SE, + } + RegionDelmenhorst = cloudprovider.SGeographicInfo{ + Latitude: 53.050556, + Longitude: 8.631667, + City: CITY_DELMENHORST, + CountryCode: COUNTRY_CODE_DE, + } + RegionGeneva = cloudprovider.SGeographicInfo{ + Latitude: 46.201667, + Longitude: 6.146944, + City: CITY_GENEVA, + CountryCode: COUNTRY_CODE_CH, + } + RegionStavanger = cloudprovider.SGeographicInfo{ + Latitude: 58.963333, + Longitude: 5.718889, + City: CITY_STAVANGER, + CountryCode: COUNTRY_CODE_NO, + } + RegionOslo = cloudprovider.SGeographicInfo{ + Latitude: 59.905556, + Longitude: 10.768333, + City: CITY_OSLO, + CountryCode: COUNTRY_CODE_NO, + } + + RegionMoscow = cloudprovider.SGeographicInfo{ + Latitude: 55.755825, + Longitude: 37.617298, + City: CITY_MOSCOW, + CountryCode: COUNTRY_CODE_RU, + } + + // America + RegionMontreal = cloudprovider.SGeographicInfo{ + Latitude: 45.5580206, + Longitude: -73.8003414, + City: CITY_MONTREAL, + CountryCode: COUNTRY_CODE_CA, + } + RegionToronto = cloudprovider.SGeographicInfo{ + Latitude: 43.653225, + Longitude: -79.383186, + City: CITY_TORONTO, + CountryCode: COUNTRY_CODE_CA, + } + RegionCanadaCentral = cloudprovider.SGeographicInfo{ + Latitude: 56.130366, + Longitude: -106.346771, + City: CITY_CANADA_CENTRAL, + CountryCode: COUNTRY_CODE_CA, + } + RegionQuebec = cloudprovider.SGeographicInfo{ + Latitude: 52, + Longitude: -72, + City: CITY_QUEBEC, + CountryCode: COUNTRY_CODE_CA, + } + + RegionSaoPaulo = cloudprovider.SGeographicInfo{ + Latitude: -23.5505199, + Longitude: -46.6333094, + City: CITY_SAO_PAULO, + CountryCode: COUNTRY_CODE_BR, + } + // 里约热内卢 + RegionRioDeJaneiro = cloudprovider.SGeographicInfo{ + Latitude: -22.9083, + Longitude: -43.1964, + City: CITY_RIO_DE_JANEIRO, + CountryCode: COUNTRY_CODE_BR, + } + + RegionMexico = cloudprovider.SGeographicInfo{ + Latitude: 55.1182908, + Longitude: 141.0377645, + City: CITY_MEXICO, + CountryCode: COUNTRY_CODE_MX, + } + + RegionSantiago = cloudprovider.SGeographicInfo{ + Latitude: -33.45206, + Longitude: -70.676031, + City: CITY_SANTIAGO, + CountryCode: COUNTRY_CODE_CL, + } + + RegionIowa = cloudprovider.SGeographicInfo{ + Latitude: 41.9328655, + Longitude: -94.5106809, + City: CITY_IOWA, + CountryCode: COUNTRY_CODE_US, + } + RegionCarolina = cloudprovider.SGeographicInfo{ + Latitude: 33.6194409, + Longitude: -82.0475635, + City: CITY_SOUTH_CAROLINA, + CountryCode: COUNTRY_CODE_US, + } + // 西雅图,华盛顿州 + RegionWashington = cloudprovider.SGeographicInfo{ + Latitude: 47.6, + Longitude: -122.3, + City: CITY_WASHINGTON, + CountryCode: COUNTRY_CODE_US, + } + RegionVirginia = cloudprovider.SGeographicInfo{ + Latitude: 37.4315734, + Longitude: -78.6568942, + City: CITY_VIRGINIA, + CountryCode: COUNTRY_CODE_US, + } + RegionTexas = cloudprovider.SGeographicInfo{ + Latitude: 31, + Longitude: -100, + City: CITY_TEXAS, + CountryCode: COUNTRY_CODE_US, + } + RegionChicago = cloudprovider.SGeographicInfo{ + Latitude: 41.8819, + Longitude: -87.6278, + City: CITY_CHICAGO, + CountryCode: COUNTRY_CODE_US, + } + RegionPhoenix = cloudprovider.SGeographicInfo{ + Latitude: 33.4483, + Longitude: -112.0739, + City: CITY_PHOENIX, + CountryCode: COUNTRY_CODE_US, + } + RegionUtah = cloudprovider.SGeographicInfo{ + Latitude: 39.5, + Longitude: -111.5, + City: CITY_UTAH, + CountryCode: COUNTRY_CODE_US, + } + RegionSanFrancisco = cloudprovider.SGeographicInfo{ + Latitude: 37.7775, + Longitude: -122.4164, + City: CITY_SAN_FRANCISCO, + CountryCode: COUNTRY_CODE_US, + } + RegionSiliconValley = cloudprovider.SGeographicInfo{ + Latitude: 37.387474, + Longitude: -122.057541, + City: CITY_SILICONVALLEY, + CountryCode: COUNTRY_CODE_US, + } + RegionNothVirginia = cloudprovider.SGeographicInfo{ + Latitude: 37.4315734, + Longitude: -78.6568942, + City: CITY_N_VIRGINIA, + CountryCode: COUNTRY_CODE_US, + } + RegionOregon = cloudprovider.SGeographicInfo{ + Latitude: 43.8041334, + Longitude: -120.5542012, + City: CITY_OREGON, + CountryCode: COUNTRY_CODE_US, + } + RegionLosAngeles = cloudprovider.SGeographicInfo{ + Latitude: 34.0522342, + Longitude: -118.2436849, + City: CITY_LOS_ANGELES, + CountryCode: COUNTRY_CODE_US, + } + RegionSaltLakeCity = cloudprovider.SGeographicInfo{ + Latitude: 40.7767168, + Longitude: -111.9905243, + City: CITY_SALT_LAKE_CITY, + CountryCode: COUNTRY_CODE_US, + } + RegionLasVegas = cloudprovider.SGeographicInfo{ + Latitude: 36.1249185, + Longitude: -115.3150811, + City: CITY_LAS_VEGAS, + CountryCode: COUNTRY_CODE_US, + } + RegionNorthCalifornia = cloudprovider.SGeographicInfo{ + Latitude: 38.8375215, + Longitude: -120.8958242, + City: CITY_N_CALIFORNIA, + CountryCode: COUNTRY_CODE_US, + } + RegionOhio = cloudprovider.SGeographicInfo{ + Latitude: 40.4172871, + Longitude: -82.90712300000001, + City: CITY_OHIO, + CountryCode: COUNTRY_CODE_US, + } + + RegionUSGOVWest = cloudprovider.SGeographicInfo{ + Latitude: 37.09024, + Longitude: -95.712891, + City: CITY_US_GOV_WEST, + CountryCode: COUNTRY_CODE_US, + } +) diff --git a/pkg/multicloud/aliyun/latitud_and_longitude.go b/pkg/multicloud/aliyun/latitud_and_longitude.go index 93ba2cdeb8..86f869e19f 100644 --- a/pkg/multicloud/aliyun/latitud_and_longitude.go +++ b/pkg/multicloud/aliyun/latitud_and_longitude.go @@ -20,30 +20,30 @@ import ( ) var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ - "cn-qingdao": {Latitude: 36.067108, Longitude: 120.382607, City: api.CITY_QING_DAO, CountryCode: api.COUNTRY_CODE_CN}, - "cn-beijing": {Latitude: 39.904202, Longitude: 116.407394, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, - "cn-zhangjiakou": {Latitude: 40.767544, Longitude: 114.886337, City: api.CITY_ZHANG_JIA_KOU, CountryCode: api.COUNTRY_CODE_CN}, - "cn-huhehaote": {Latitude: 40.842358, Longitude: 111.749992, City: api.CITY_HU_HE_HAO_TE, CountryCode: api.COUNTRY_CODE_CN}, - "cn-huhehaote-nebula-1": {Latitude: 40.842358, Longitude: 111.749992, City: api.CITY_HU_HE_HAO_TE, CountryCode: api.COUNTRY_CODE_CN}, - "cn-hangzhou": {Latitude: 30.274084, Longitude: 120.155067, City: api.CITY_HANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, - "cn-shanghai": {Latitude: 31.230391, Longitude: 121.473701, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "cn-shanghai-finance-1": {Latitude: 31.230391, Longitude: 121.473701, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "cn-shenzhen": {Latitude: 22.543097, Longitude: 114.057861, City: api.CITY_SHEN_ZHEN, CountryCode: api.COUNTRY_CODE_CN}, - "cn-shenzhen-finance-1": {Latitude: 22.543097, Longitude: 114.057861, City: api.CITY_SHEN_ZHEN, CountryCode: api.COUNTRY_CODE_CN}, - "cn-hongkong": {Latitude: 22.396427, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, - "cn-chengdu": {Latitude: 30.572815, Longitude: 104.066803, City: api.CITY_CHENG_DU, CountryCode: api.COUNTRY_CODE_CN}, - "cn-heyuan": {Latitude: 23.7292717, Longitude: 114.6965786, City: api.CITY_HE_YUAN, CountryCode: api.COUNTRY_CODE_CN}, - "ap-northeast-1": {Latitude: 35.709026, Longitude: 139.731995, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, - "ap-southeast-1": {Latitude: 1.352083, Longitude: 103.819839, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, - "ap-southeast-2": {Latitude: -33.868820, Longitude: 151.209290, City: api.CITY_SYDNEY, CountryCode: api.COUNTRY_CODE_AU}, - "ap-southeast-3": {Latitude: 3.139003, Longitude: 101.686852, City: api.CITY_KUALA_LUMPUR, CountryCode: api.COUNTRY_CODE_MY}, - "ap-southeast-5": {Latitude: -6.175110, Longitude: 106.865036, City: api.CITY_JAKARTA, CountryCode: api.COUNTRY_CODE_ID}, - "ap-south-1": {Latitude: 19.075983, Longitude: 72.877655, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, - "us-east-1": {Latitude: 37.431572, Longitude: -78.656891, City: api.CITY_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, - "us-west-1": {Latitude: 37.387474, Longitude: -122.057541, City: api.CITY_SILICONVALLEY, CountryCode: api.COUNTRY_CODE_US}, - "eu-west-1": {Latitude: 51.507351, Longitude: -0.127758, City: api.CITY_LONDON, CountryCode: api.COUNTRY_CODE_GB}, - "me-east-1": {Latitude: 25.204849, Longitude: 55.270782, City: api.CITY_DUBAI, CountryCode: api.COUNTRY_CODE_AE}, - "eu-central-1": {Latitude: 50.110924, Longitude: 8.682127, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, - "cn-wulanchabu": {Latitude: 41.0178065, Longitude: 113.094978, City: api.CITY_WU_LAN_CHA_BU, CountryCode: api.COUNTRY_CODE_CN}, - "cn-guangzhou": {Latitude: 23.129110, Longitude: 113.264381, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, + "cn-qingdao": api.RegionQingdao, + "cn-beijing": api.RegionBeijing, + "cn-zhangjiakou": api.RegionZhangjiakou, + "cn-huhehaote": api.RegionHuhehaote, + "cn-huhehaote-nebula-1": api.RegionHuhehaote, + "cn-hangzhou": api.RegionHangzhou, + "cn-shanghai": api.RegionShanghai, + "cn-shanghai-finance-1": api.RegionShanghai, + "cn-shenzhen": api.RegionShenzhen, + "cn-shenzhen-finance-1": api.RegionShenzhen, + "cn-hongkong": api.RegionHongkong, + "cn-chengdu": api.RegionChengdu, + "cn-heyuan": api.RegionHeyuan, + "ap-northeast-1": api.RegionTokyo, + "ap-southeast-1": api.RegionSingapore, + "ap-southeast-2": api.RegionSydney, + "ap-southeast-3": api.RegionKualaLumpur, + "ap-southeast-5": api.RegionJakarta, + "ap-south-1": api.RegionMumbai, + "us-east-1": api.RegionVirginia, + "us-west-1": api.RegionSiliconValley, + "eu-west-1": api.RegionLondon, + "me-east-1": api.RegionDubai, + "eu-central-1": api.RegionFrankfurt, + "cn-wulanchabu": api.RegionWulanchabu, + "cn-guangzhou": api.RegionGuangzhou, } diff --git a/pkg/multicloud/aws/latitude_and_longitude.go b/pkg/multicloud/aws/latitude_and_longitude.go index 7b63487e62..5e517f8d39 100644 --- a/pkg/multicloud/aws/latitude_and_longitude.go +++ b/pkg/multicloud/aws/latitude_and_longitude.go @@ -22,28 +22,28 @@ import ( // https://docs.aws.amazon.com/general/latest/gr/rande.html var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ - "us-east-2": {Latitude: 40.4172871, Longitude: -82.90712300000001, City: api.CITY_OHIO, CountryCode: api.COUNTRY_CODE_US}, - "us-east-1": {Latitude: 37.4315734, Longitude: -78.6568942, City: api.CITY_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, - "us-west-1": {Latitude: 38.8375215, Longitude: -120.8958242, City: api.CITY_N_CALIFORNIA, CountryCode: api.COUNTRY_CODE_US}, - "us-west-2": {Latitude: 43.8041334, Longitude: -120.5542012, City: api.CITY_OREGON, CountryCode: api.COUNTRY_CODE_US}, - "ap-south-1": {Latitude: 19.0759837, Longitude: 72.8776559, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, - "ap-northeast-3": {Latitude: 34.6937378, Longitude: 135.5021651, City: api.CITY_OSAKA, CountryCode: api.COUNTRY_CODE_JP}, - "ap-northeast-2": {Latitude: 37.566535, Longitude: 126.9779692, City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR}, - "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}, - "eu-central-1": {Latitude: 50.1109221, Longitude: 8.6821267, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, - "eu-west-1": {Latitude: 53.41291, Longitude: -8.24389, City: api.CITY_IRELAND, CountryCode: api.COUNTRY_CODE_IE}, - "eu-west-2": {Latitude: 51.5073509, Longitude: -0.1277583, City: api.CITY_LONDON, CountryCode: api.COUNTRY_CODE_GB}, - "eu-west-3": {Latitude: 48.856614, Longitude: 2.3522219, City: api.CITY_PARIS, CountryCode: api.COUNTRY_CODE_FR}, - "eu-north-1": {Latitude: 59.1946, Longitude: 18.47, City: api.CITY_STOCKHOLM, CountryCode: api.COUNTRY_CODE_SE}, - "sa-east-1": {Latitude: -23.5505199, Longitude: -46.63330939999999, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR}, - "us-gov-west-1": {Latitude: 37.09024, Longitude: -95.712891, City: api.CITY_US_GOV_WEST, CountryCode: api.COUNTRY_CODE_US}, + "us-east-1": api.RegionNothVirginia, + "us-east-2": api.RegionOhio, + "us-west-1": api.RegionNorthCalifornia, + "us-west-2": api.RegionOregon, + "ap-south-1": api.RegionMumbai, + "ap-northeast-3": api.RegionOsaka, + "ap-northeast-2": api.RegionSeoul, + "ap-southeast-1": api.RegionSingapore, + "ap-southeast-2": api.RegionSydney, + "ap-northeast-1": api.RegionTokyo, + "ap-east-1": api.RegionHongkong, + "ca-central-1": api.RegionCanadaCentral, + "cn-north-1": api.RegionBeijing, + "cn-northwest-1": api.RegionNingxia, + "eu-central-1": api.RegionFrankfurt, + "eu-west-1": api.RegionIreland, + "eu-west-2": api.RegionLondon, + "eu-west-3": api.RegionParis, + "eu-north-1": api.RegionStockholm, + "sa-east-1": api.RegionSaoPaulo, + "us-gov-west-1": api.RegionUSGOVWest, - "af-south-1": {Latitude: -33.9152209, Longitude: 18.3758904, City: api.CITY_CAPE_TOWN, CountryCode: api.COUNTRY_CODE_ZA}, - "me-south-1": {Latitude: 25.9408826, Longitude: 50.4474957, City: api.CITY_BAHRAIN, CountryCode: api.COUNTRY_CODE_BH}, + "af-south-1": api.RegionCapeTown, + "me-south-1": api.RegionBahrain, } diff --git a/pkg/multicloud/azure/geographicinfo.go b/pkg/multicloud/azure/geographicinfo.go index aa4a65c0f3..4d1e3b5f27 100644 --- a/pkg/multicloud/azure/geographicinfo.go +++ b/pkg/multicloud/azure/geographicinfo.go @@ -20,51 +20,51 @@ import ( ) var AzureGeographicInfo = map[string]cloudprovider.SGeographicInfo{ - "southafricanorth": {City: api.CITY_PRETORIA, CountryCode: api.COUNTRY_CODE_ZA}, //比勒陀利亚, 南非 - "southafricawest": {City: api.CITY_CAPE_TOWN, CountryCode: api.COUNTRY_CODE_ZA}, //开普敦 南非 - "australiacentral2": {City: api.CITY_YARRALUMLA, CountryCode: api.COUNTRY_CODE_AU}, //亚拉伦拉 澳大利亚 - "koreasouth": {City: api.CITY_BUSAN, CountryCode: api.COUNTRY_CODE_KR}, //釜山 韩国 - "canadacentral": {City: api.CITY_TORONTO, CountryCode: api.COUNTRY_CODE_CA}, //加拿大 多伦多 - "northeurope": {City: api.CITY_DUBLIN, CountryCode: api.COUNTRY_CODE_IE}, //都柏林 爱尔兰 - "australiacentral": {City: api.CITY_YARRALUMLA, CountryCode: api.COUNTRY_CODE_AU}, //亚拉伦拉 澳大利亚 - "francecentral": {City: api.CITY_ALLIER, CountryCode: api.COUNTRY_CODE_FR}, //阿利埃河 法国 - "westus": {City: api.CITY_SAN_FRANCISCO, CountryCode: api.COUNTRY_CODE_US}, //旧金山 美国 - "japanwest": {City: api.CITY_OSAKA, CountryCode: api.COUNTRY_CODE_JP}, //大阪市 日本 - "francesouth": {City: api.CITY_TARN, CountryCode: api.COUNTRY_CODE_FR}, //塔恩 法国 - "eastus": {City: api.CITY_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, // 美国 弗吉尼亚 - "westindia": {City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, //印度 孟买 - "westcentralus": {City: api.CITY_UTAH, CountryCode: api.COUNTRY_CODE_US}, //美国 犹他州 - "southeastasia": {City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, //新加坡 - "eastasia": {City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, - "eastus2": {City: api.CITY_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, // 美国 弗吉尼亚 - "japaneast": {City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, // 日本 东京 - "ukwest": {City: api.CITY_HALTON, CountryCode: api.COUNTRY_CODE_GB}, //英国 哈尔顿 - "australiasoutheast": {City: api.CITY_MELBOURNE, CountryCode: api.COUNTRY_CODE_AU}, // 澳大利亚 墨尔本 - "uksouth": {City: api.CITY_WEST_SUSSEX, CountryCode: api.COUNTRY_CODE_GB}, //英国 西苏塞克斯 - "westus2": {City: api.CITY_WASHINGTON, CountryCode: api.COUNTRY_CODE_US}, //美国 华盛顿 - "southcentralus": {City: api.CITY_TEXAS, CountryCode: api.COUNTRY_CODE_US}, //美国 德克萨斯 - "brazilsouth": {City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR}, //巴西 圣保罗 - "koreacentral": {City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR}, //韩国 汉城 -> 首尔 - "centralindia": {City: api.CITY_MAHARASHTRA, CountryCode: api.COUNTRY_CODE_IN}, //印度 马哈拉施特拉邦 - "northcentralus": {City: api.CITY_CHICAGO, CountryCode: api.COUNTRY_CODE_US}, //美国 芝加哥 - "centralus": {City: api.CITY_IOWA, CountryCode: api.COUNTRY_CODE_US}, //美国 爱荷华 - "australiaeast": {City: api.CITY_SYDNEY, CountryCode: api.COUNTRY_CODE_AU}, //澳大利亚 悉尼 - "westeurope": {City: api.CITY_HOLLAND, CountryCode: api.COUNTRY_CODE_NL}, //荷兰 - "canadaeast": {City: api.CITY_QUEBEC, CountryCode: api.COUNTRY_CODE_CA}, //加拿大 魁北克市 - "southindia": {City: api.CITY_KANCHIPURAM, CountryCode: api.COUNTRY_CODE_IN}, //印度 甘吉布勒姆 - "uaenorth": {City: api.CITY_DUBAI, CountryCode: api.COUNTRY_CODE_AE}, - "uaecentral": {City: api.CITY_DUBAI, CountryCode: api.COUNTRY_CODE_AE}, - "switzerlandwest": {City: api.CITY_GENEVA, CountryCode: api.COUNTRY_CODE_CH}, // 日内瓦 - "switzerlandnorth": {City: api.CITY_ZURICH, CountryCode: api.COUNTRY_CODE_CH}, // 苏黎世 - "norwaywest": {City: api.CITY_STAVANGER, CountryCode: api.COUNTRY_CODE_NO}, // 斯塔万格 - "norwayeast": {City: api.CITY_OSLO, CountryCode: api.COUNTRY_CODE_NO}, // 奥斯陆 - "germanywestcentral": {City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, // 法兰克福 - "germanynorth": {City: api.CITY_DELMENHORST, CountryCode: api.COUNTRY_CODE_DE}, // 代尔门霍斯特 - "westus3": {City: api.CITY_PHOENIX, CountryCode: api.COUNTRY_CODE_US}, - "brazilsoutheast": {City: api.CITY_RIO_DE_JANEIRO, CountryCode: api.COUNTRY_CODE_BR}, + "southafricanorth": api.RegionPretoria, //比勒陀利亚, 南非 + "southafricawest": api.RegionCapeTown, //开普敦 南非 + "australiacentral2": api.RegionYarralumla, //亚拉伦拉 澳大利亚 + "koreasouth": api.RegionBusan, //釜山 韩国 + "canadacentral": api.RegionToronto, //加拿大 多伦多 + "northeurope": api.RegionDublin, //都柏林 爱尔兰 + "australiacentral": api.RegionYarralumla, //亚拉伦拉 澳大利亚 + "francecentral": api.RegionAllier, //阿利埃河 法国 + "westus": api.RegionSanFrancisco, //旧金山 美国 + "japanwest": api.RegionOsaka, //大阪市 日本 + "francesouth": api.RegionTarn, //塔恩 法国 + "eastus": api.RegionVirginia, // 美国 弗吉尼亚 + "westindia": api.RegionMumbai, //印度 孟买 + "westcentralus": api.RegionUtah, //美国 犹他州 + "southeastasia": api.RegionSingapore, //新加坡 + "eastasia": api.RegionHongkong, + "eastus2": api.RegionVirginia, // 美国 弗吉尼亚 + "japaneast": api.RegionTokyo, // 日本 东京 + "ukwest": api.RegionHalton, //英国 哈尔顿 + "australiasoutheast": api.RegionMelbourne, // 澳大利亚 墨尔本 + "uksouth": api.RegionSussex, //英国 西苏塞克斯 + "westus2": api.RegionWashington, //美国 华盛顿 + "southcentralus": api.RegionTexas, //美国 德克萨斯 + "brazilsouth": api.RegionSaoPaulo, //巴西 圣保罗 + "koreacentral": api.RegionSeoul, //韩国 汉城 -> 首尔 + "centralindia": api.RegionMaharashtra, //印度 马哈拉施特拉邦 + "northcentralus": api.RegionChicago, //美国 芝加哥 + "centralus": api.RegionIowa, //美国 爱荷华 + "australiaeast": api.RegionSydney, //澳大利亚 悉尼 + "westeurope": api.RegionHolland, //荷兰 + "canadaeast": api.RegionQuebec, //加拿大 魁北克市 + "southindia": api.RegionKanchipuram, //印度 甘吉布勒姆 + "uaenorth": api.RegionDubai, + "uaecentral": api.RegionDubai, + "switzerlandwest": api.RegionGeneva, // 日内瓦 + "switzerlandnorth": api.RegionZurich, // 苏黎世 + "norwaywest": api.RegionStavanger, // 斯塔万格 + "norwayeast": api.RegionOslo, // 奥斯陆 + "germanywestcentral": api.RegionFrankfurt, // 法兰克福 + "germanynorth": api.RegionDelmenhorst, // 代尔门霍斯特 + "westus3": api.RegionPhoenix, + "brazilsoutheast": api.RegionRioDeJaneiro, // 里约热内卢 - "chinaeast": {City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "chinaeast2": {City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "chinanorth": {City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, - "chinanorth2": {City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, + "chinaeast": api.RegionShanghai, + "chinaeast2": api.RegionShanghai, + "chinanorth": api.RegionBeijing, + "chinanorth2": api.RegionBeijing, } diff --git a/pkg/multicloud/google/latitude_and_longitude.go b/pkg/multicloud/google/latitude_and_longitude.go index 037adcf0b8..83f1c67663 100644 --- a/pkg/multicloud/google/latitude_and_longitude.go +++ b/pkg/multicloud/google/latitude_and_longitude.go @@ -20,32 +20,36 @@ import ( ) var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ - "asia-east1": {Latitude: 25.0443, Longitude: 121.509, City: api.CITY_TAI_WAN, CountryCode: api.COUNTRY_CODE_CN}, - "asia-east2": {Latitude: 22.396427, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, - "asia-northeast1": {Latitude: 35.709026, Longitude: 139.731995, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, - "asia-northeast2": {Latitude: 34.6937378, Longitude: 135.5021651, City: api.CITY_OSAKA, CountryCode: api.COUNTRY_CODE_JP}, - "asia-northeast3": {Latitude: 34.6937378, Longitude: 135.5021651, City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR}, - "asia-south1": {Latitude: 37.566535, Longitude: 126.9779692, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, - "asia-southeast1": {Latitude: 1.352083, Longitude: 103.819839, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, - "asia-southeast2": {Latitude: -6.175110, Longitude: 106.865036, City: api.CITY_JAKARTA, CountryCode: api.COUNTRY_CODE_ID}, - "australia-southeast1": {Latitude: -33.8688197, Longitude: 151.2092955, City: api.CITY_SYDNEY, CountryCode: api.COUNTRY_CODE_AU}, + "asia-east1": api.RegionTaiwan, + "asia-east2": api.RegionHongkong, + "asia-northeast1": api.RegionTokyo, + "asia-northeast2": api.RegionOsaka, + "asia-northeast3": api.RegionSeoul, + "asia-south1": api.RegionMumbai, + "asia-south2": api.RegionDelhi, + "asia-southeast1": api.RegionSingapore, + "asia-southeast2": api.RegionJakarta, + "australia-southeast1": api.RegionSydney, + "australia-southeast2": api.RegionMelbourne, - "europe-north1": {Latitude: 64.8255731, Longitude: 21.5432837, City: api.CITY_FINLAND, CountryCode: api.COUNTRY_CODE_CN}, - "europe-west1": {Latitude: 50.499734, Longitude: 3.9057517, City: api.CITY_BELGIUM, CountryCode: api.COUNTRY_CODE_CN}, - "europe-west2": {Latitude: 51.507351, Longitude: -0.127758, City: api.CITY_LONDON, CountryCode: api.COUNTRY_CODE_GB}, - "europe-west3": {Latitude: 51.165691, Longitude: 10.451526, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, - "europe-west4": {Latitude: 52.2076831, Longitude: 4.1585786, City: api.CITY_HOLLAND, CountryCode: api.COUNTRY_CODE_NL}, - "europe-west6": {Latitude: 47.3774497, Longitude: 8.5016958, City: api.CITY_ZURICH, CountryCode: api.COUNTRY_CODE_CH}, + "europe-north1": api.RegionFinland, + "europe-west1": api.RegionBelgium, + "europe-west2": api.RegionLondon, + "europe-west3": api.RegionFrankfurt, + "europe-west4": api.RegionHolland, + "europe-west6": api.RegionZurich, + "europe-central2": api.RegionWarsaw, - "northamerica-northeast1": {Latitude: 45.5580206, Longitude: -73.8003414, City: api.CITY_MONTREAL, CountryCode: api.COUNTRY_CODE_CA}, - "southamerica-east1": {Latitude: -23.5505199, Longitude: -46.6333094, City: api.CITY_SAO_PAULO, CountryCode: api.COUNTRY_CODE_BR}, - "us-central1": {Latitude: 41.9328655, Longitude: -94.5106809, City: api.CITY_IOWA, CountryCode: api.COUNTRY_CODE_US}, - "us-east1": {Latitude: 33.6194409, Longitude: -82.0475635, City: api.CITY_SOUTH_CAROLINA, CountryCode: api.COUNTRY_CODE_US}, - "us-east4": {Latitude: 37.4315734, Longitude: -78.6568942, City: api.CITY_N_VIRGINIA, CountryCode: api.COUNTRY_CODE_US}, - "us-west1": {Latitude: 43.8041334, Longitude: -120.5542012, City: api.CITY_OREGON, CountryCode: api.COUNTRY_CODE_US}, - "us-west2": {Latitude: 34.0522342, Longitude: -118.2436849, City: api.CITY_LOS_ANGELES, CountryCode: api.COUNTRY_CODE_US}, - "us-west3": {Latitude: 40.7767168, Longitude: -111.9905243, City: api.CITY_SALT_LAKE_CITY, CountryCode: api.COUNTRY_CODE_US}, - "us-west4": {Latitude: 36.1249185, Longitude: -115.3150811, City: api.CITY_LAS_VEGAS, CountryCode: api.COUNTRY_CODE_US}, + "northamerica-northeast1": api.RegionMontreal, + "northamerica-northeast2": api.RegionToronto, + "southamerica-east1": api.RegionSaoPaulo, + "us-central1": api.RegionIowa, + "us-east1": api.RegionCarolina, + "us-east4": api.RegionNothVirginia, + "us-west1": api.RegionOregon, + "us-west2": api.RegionLosAngeles, + "us-west3": api.RegionSaltLakeCity, + "us-west4": api.RegionLasVegas, } var RegionNames = map[string]string{ @@ -55,18 +59,22 @@ var RegionNames = map[string]string{ "asia-northeast2": "大阪", "asia-northeast3": "首尔", "asia-south1": "孟买", + "asia-south2": "德里", "asia-southeast1": "新加坡", "asia-southeast2": "雅加达", "australia-southeast1": "悉尼", + "australia-southeast2": "墨尔本", - "europe-north1": "芬兰", - "europe-west1": "比利时", - "europe-west2": "伦敦", - "europe-west3": "法兰克福", - "europe-west4": "荷兰", - "europe-west6": "苏黎世", + "europe-north1": "芬兰", + "europe-west1": "比利时", + "europe-west2": "伦敦", + "europe-west3": "法兰克福", + "europe-west4": "荷兰", + "europe-west6": "苏黎世", + "europe-central2": "华沙", "northamerica-northeast1": "蒙特利尔", + "northamerica-northeast2": "多伦多", "southamerica-east1": "圣保罗", "us-central1": "艾奥瓦", "us-east1": "南卡罗来纳州", diff --git a/pkg/multicloud/huawei/latitud_and_longitude.go b/pkg/multicloud/huawei/latitud_and_longitude.go index faac90d77f..d6ec366c55 100644 --- a/pkg/multicloud/huawei/latitud_and_longitude.go +++ b/pkg/multicloud/huawei/latitud_and_longitude.go @@ -23,22 +23,22 @@ import ( // International: https://developer-intl.huaweicloud.com/endpoint // ref: https://countrycode.org var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ - "cn-east-2": {Latitude: 31.210344, Longitude: 121.455364, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "cn-east-3": {Latitude: 31.210344, Longitude: 121.455364, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, - "cn-north-1": {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, - "cn-north-4": {Latitude: 39.997743, Longitude: 116.304542, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, - "cn-south-1": {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, - "cn-south-2": {Latitude: 23.12911, Longitude: 113.264385, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, - "ap-southeast-1": {Latitude: 22.396428, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, - "ap-southeast-2": {Latitude: 13.7563309, Longitude: 100.5017651, City: api.CITY_BANGKOK, CountryCode: api.COUNTRY_CODE_TH}, - "ap-southeast-3": {Latitude: 1.360386, Longitude: 103.821195, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, - "eu-west-0": {Latitude: 48.856614, Longitude: 2.3522219, City: api.CITY_PARIS, CountryCode: api.COUNTRY_CODE_FR}, - "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}, + "cn-east-2": api.RegionShanghai, + "cn-east-3": api.RegionShanghai, + "cn-north-1": api.RegionBeijing, + "cn-north-4": api.RegionBeijing, + "cn-south-1": api.RegionGuangzhou, + "cn-south-2": api.RegionGuangzhou, + "ap-southeast-1": api.RegionHongkong, + "ap-southeast-2": api.RegionBangkok, + "ap-southeast-3": api.RegionSingapore, + "eu-west-0": api.RegionParis, + "cn-northeast-1": api.RegionDalian, + "cn-southwest-2": api.RegionGuiyang, + "af-south-1": api.RegionJohannesburg, + "sa-brazil-1": api.RegionSaoPaulo, + "na-mexico-1": api.RegionMexico, + "la-south-2": api.RegionSantiago, + "cn-north-9": api.RegionNeimenggu, + "cn-north-219": api.RegionBeijing, } diff --git a/pkg/multicloud/qcloud/latitud_and_longitude.go b/pkg/multicloud/qcloud/latitud_and_longitude.go index 09f0ba3e37..8d87548c7b 100644 --- a/pkg/multicloud/qcloud/latitud_and_longitude.go +++ b/pkg/multicloud/qcloud/latitud_and_longitude.go @@ -20,25 +20,24 @@ import ( ) var LatitudeAndLongitude = map[string]cloudprovider.SGeographicInfo{ - "ap-bangkok": {Latitude: 13.756330, Longitude: 100.501762, City: api.CITY_BANGKOK, CountryCode: api.COUNTRY_CODE_TH}, // 腾讯云 亚太地区(曼谷) - "ap-beijing": {Latitude: 39.904202, Longitude: 116.407394, City: api.CITY_BEI_JING, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华北地区(北京) - "ap-chengdu": {Latitude: 30.572815, Longitude: 104.066803, City: api.CITY_CHENG_DU, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 西南地区(成都) - "ap-chongqing": {Latitude: 29.431585, Longitude: 106.912254, City: api.CITY_CHONG_QING, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 西南地区(重庆) - "ap-guangzhou": {Latitude: 23.129110, Longitude: 113.264381, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华南地区(广州) - "ap-guangzhou-open": {Latitude: 23.126593, Longitude: 113.273415, City: api.CITY_GUANG_ZHOU, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华南地区(广州Open) - "ap-hongkong": {Latitude: 22.396427, Longitude: 114.109497, City: api.CITY_HONG_KONG, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 东南亚地区(香港) - "ap-mumbai": {Latitude: 19.075983, Longitude: 72.877655, City: api.CITY_MUMBAI, CountryCode: api.COUNTRY_CODE_IN}, // 腾讯云 亚太地区(孟买) - "ap-seoul": {Latitude: 37.566536, Longitude: 126.977966, City: api.CITY_SEOUL, CountryCode: api.COUNTRY_CODE_KR}, // 腾讯云 东南亚地区(首尔) - "ap-shanghai": {Latitude: 31.230391, Longitude: 121.473701, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华东地区(上海) - "ap-shanghai-fsi": {Latitude: 31.311033, Longitude: 121.536217, City: api.CITY_SHANG_HAI, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华东地区(上海金融) - "ap-shenzhen-fsi": {Latitude: 22.531544, Longitude: 114.025467, City: api.CITY_SHEN_ZHEN, CountryCode: api.COUNTRY_CODE_CN}, // 腾讯云 华南地区(深圳金融) - "ap-singapore": {Latitude: 1.352083, Longitude: 103.819839, City: api.CITY_SINGAPORE, CountryCode: api.COUNTRY_CODE_SG}, // 腾讯云 东南亚地区(新加坡) - "ap-tokyo": {Latitude: 35.709026, Longitude: 139.731995, City: api.CITY_TOKYO, CountryCode: api.COUNTRY_CODE_JP}, // 腾讯云 亚太地区(东京) - "eu-frankfurt": {Latitude: 51.165691, Longitude: 10.451526, City: api.CITY_FRANKFURT, CountryCode: api.COUNTRY_CODE_DE}, // 腾讯云 欧洲地区(德国) - "eu-moscow": {Latitude: 55.755825, Longitude: 37.617298, City: api.CITY_MOSCOW, CountryCode: api.COUNTRY_CODE_RU}, // 腾讯云 欧洲地区(莫斯科) - "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}, + "ap-bangkok": api.RegionBangkok, // 腾讯云 亚太地区(曼谷) + "ap-beijing": api.RegionBeijing, // 腾讯云 华北地区(北京) + "ap-chengdu": api.RegionChengdu, // 腾讯云 西南地区(成都) + "ap-chongqing": api.RegionChongqing, // 腾讯云 西南地区(重庆) + "ap-guangzhou": api.RegionGuangzhou, // 腾讯云 华南地区(广州) + "ap-guangzhou-open": api.RegionGuangzhou, // 腾讯云 华南地区(广州Open) + "ap-hongkong": api.RegionHongkong, // 腾讯云 东南亚地区(香港) + "ap-mumbai": api.RegionMumbai, // 腾讯云 亚太地区(孟买) + "ap-seoul": api.RegionSeoul, // 腾讯云 东南亚地区(首尔) + "ap-shanghai": api.RegionShanghai, // 腾讯云 华东地区(上海) + "ap-shanghai-fsi": api.RegionShanghai, // 腾讯云 华东地区(上海金融) + "ap-shenzhen-fsi": api.RegionShenzhen, // 腾讯云 华南地区(深圳金融) + "ap-singapore": api.RegionSingapore, // 腾讯云 东南亚地区(新加坡) + "ap-tokyo": api.RegionTokyo, // 腾讯云 亚太地区(东京) + "eu-frankfurt": api.RegionFrankfurt, // 腾讯云 欧洲地区(德国) + "eu-moscow": api.RegionMoscow, // 腾讯云 欧洲地区(莫斯科) + "na-ashburn": api.RegionVirginia, // 腾讯云 美国东部(弗吉尼亚) + "na-siliconvalley": api.RegionSiliconValley, // 腾讯云 美国西部(硅谷) + "na-toronto": api.RegionToronto, // 腾讯云 北美地区(多伦多) + "ap-nanjing": api.RegionNanjing, }