From d926846381976f8291dcf32f1d683a9d0163139f Mon Sep 17 00:00:00 2001 From: devad Date: Fri, 15 Apr 2022 15:42:20 +0800 Subject: [PATCH] ECS impl Signed-off-by: devad --- lan_trans/idl/pbtenant/tenant.pb.go | 154 +++++++++--------- .../openapiv2/idl/pbecs/ecs.swagger.json | 10 +- .../openapiv2/idl/pbpod/pod.swagger.json | 29 ++-- 3 files changed, 103 insertions(+), 90 deletions(-) diff --git a/lan_trans/idl/pbtenant/tenant.pb.go b/lan_trans/idl/pbtenant/tenant.pb.go index 50f3487..0b05b84 100644 --- a/lan_trans/idl/pbtenant/tenant.pb.go +++ b/lan_trans/idl/pbtenant/tenant.pb.go @@ -262,26 +262,28 @@ func (AliRegionId) EnumDescriptor() ([]byte, []int) { type TencentRegionId int32 const ( - TencentRegionId_tc_all TencentRegionId = 0 - TencentRegionId_tc_ap_bangkok TencentRegionId = 1 // 曼谷 - TencentRegionId_tc_ap_beijing TencentRegionId = 2 // 北京 - TencentRegionId_tc_ap_chengdu TencentRegionId = 3 // 成都 - TencentRegionId_tc_ap_chongqing TencentRegionId = 4 // 重庆 - TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 // 广州 - TencentRegionId_tc_ap_guangzhou_open TencentRegionId = 6 // 广州Open - TencentRegionId_tc_ap_hongkong TencentRegionId = 7 // 中国香港 - TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 孟买 - TencentRegionId_tc_ap_seoul TencentRegionId = 9 // 首尔 - TencentRegionId_tc_ap_shanghai TencentRegionId = 10 // 上海 - TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 11 // 上海金融 - TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 12 // 深圳金融 - TencentRegionId_tc_ap_singapore TencentRegionId = 13 // 新加坡 - TencentRegionId_tc_ap_tokyo TencentRegionId = 14 // 东京 - TencentRegionId_tc_eu_frankfurt TencentRegionId = 15 // 法兰克福 - TencentRegionId_tc_eu_moscow TencentRegionId = 16 // 莫斯科 - TencentRegionId_tc_na_ashburn TencentRegionId = 17 // 阿什本 - TencentRegionId_tc_na_siliconvalley TencentRegionId = 18 // 硅谷 - TencentRegionId_tc_na_toronto TencentRegionId = 19 // 多伦多 + TencentRegionId_tc_all TencentRegionId = 0 + TencentRegionId_tc_ap_bangkok TencentRegionId = 1 //亚太东南(曼谷) + TencentRegionId_tc_ap_beijing TencentRegionId = 2 //华北地区(北京) + TencentRegionId_tc_ap_chengdu TencentRegionId = 3 //西南地区(成都) + TencentRegionId_tc_ap_chongqing TencentRegionId = 4 //西南地区(重庆) + TencentRegionId_tc_ap_guangzhou TencentRegionId = 5 //华南地区(广州) + TencentRegionId_tc_ap_hongkong TencentRegionId = 6 //港澳台地区(中国香港) + TencentRegionId_tc_ap_jakarta TencentRegionId = 7 //亚太东南(雅加达) + TencentRegionId_tc_ap_mumbai TencentRegionId = 8 // 亚太南部(孟买) + TencentRegionId_tc_ap_nanjing TencentRegionId = 9 //华东地区(南京) + TencentRegionId_tc_ap_seoul TencentRegionId = 10 //亚太东北(首尔) + TencentRegionId_tc_ap_shanghai TencentRegionId = 11 //华东地区(上海) + TencentRegionId_tc_ap_shanghai_fsi TencentRegionId = 12 //华东地区(上海金融) + TencentRegionId_tc_ap_shenzhen_fsi TencentRegionId = 13 //华南地区(深圳金融) + TencentRegionId_tc_ap_singapore TencentRegionId = 14 //亚太东南(新加坡) + TencentRegionId_tc_ap_tokyo TencentRegionId = 15 //亚太东北(东京) + TencentRegionId_tc_eu_frankfurt TencentRegionId = 16 //欧洲地区(法兰克福) + TencentRegionId_tc_eu_moscow TencentRegionId = 17 //欧洲地区(莫斯科) + TencentRegionId_tc_na_ashburn TencentRegionId = 18 //美国东部(弗吉尼亚) + TencentRegionId_tc_na_siliconvalley TencentRegionId = 19 //美国西部(硅谷) + TencentRegionId_tc_na_toronto TencentRegionId = 20 //北美地区(多伦多) + TencentRegionId_tc_sa_saopaulo TencentRegionId = 21 //南美地区(圣保罗) ) // Enum value maps for TencentRegionId. @@ -293,42 +295,46 @@ var ( 3: "tc_ap_chengdu", 4: "tc_ap_chongqing", 5: "tc_ap_guangzhou", - 6: "tc_ap_guangzhou_open", - 7: "tc_ap_hongkong", + 6: "tc_ap_hongkong", + 7: "tc_ap_jakarta", 8: "tc_ap_mumbai", - 9: "tc_ap_seoul", - 10: "tc_ap_shanghai", - 11: "tc_ap_shanghai_fsi", - 12: "tc_ap_shenzhen_fsi", - 13: "tc_ap_singapore", - 14: "tc_ap_tokyo", - 15: "tc_eu_frankfurt", - 16: "tc_eu_moscow", - 17: "tc_na_ashburn", - 18: "tc_na_siliconvalley", - 19: "tc_na_toronto", + 9: "tc_ap_nanjing", + 10: "tc_ap_seoul", + 11: "tc_ap_shanghai", + 12: "tc_ap_shanghai_fsi", + 13: "tc_ap_shenzhen_fsi", + 14: "tc_ap_singapore", + 15: "tc_ap_tokyo", + 16: "tc_eu_frankfurt", + 17: "tc_eu_moscow", + 18: "tc_na_ashburn", + 19: "tc_na_siliconvalley", + 20: "tc_na_toronto", + 21: "tc_sa_saopaulo", } TencentRegionId_value = map[string]int32{ - "tc_all": 0, - "tc_ap_bangkok": 1, - "tc_ap_beijing": 2, - "tc_ap_chengdu": 3, - "tc_ap_chongqing": 4, - "tc_ap_guangzhou": 5, - "tc_ap_guangzhou_open": 6, - "tc_ap_hongkong": 7, - "tc_ap_mumbai": 8, - "tc_ap_seoul": 9, - "tc_ap_shanghai": 10, - "tc_ap_shanghai_fsi": 11, - "tc_ap_shenzhen_fsi": 12, - "tc_ap_singapore": 13, - "tc_ap_tokyo": 14, - "tc_eu_frankfurt": 15, - "tc_eu_moscow": 16, - "tc_na_ashburn": 17, - "tc_na_siliconvalley": 18, - "tc_na_toronto": 19, + "tc_all": 0, + "tc_ap_bangkok": 1, + "tc_ap_beijing": 2, + "tc_ap_chengdu": 3, + "tc_ap_chongqing": 4, + "tc_ap_guangzhou": 5, + "tc_ap_hongkong": 6, + "tc_ap_jakarta": 7, + "tc_ap_mumbai": 8, + "tc_ap_nanjing": 9, + "tc_ap_seoul": 10, + "tc_ap_shanghai": 11, + "tc_ap_shanghai_fsi": 12, + "tc_ap_shenzhen_fsi": 13, + "tc_ap_singapore": 14, + "tc_ap_tokyo": 15, + "tc_eu_frankfurt": 16, + "tc_eu_moscow": 17, + "tc_na_ashburn": 18, + "tc_na_siliconvalley": 19, + "tc_na_toronto": 20, + "tc_sa_saopaulo": 21, } ) @@ -799,7 +805,7 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x65, 0x61, 0x73, 0x74, 0x5f, 0x31, 0x10, 0x14, 0x12, 0x14, 0x0a, 0x10, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x63, 0x65, 0x6e, 0x74, 0x72, 0x61, 0x6c, 0x5f, 0x31, 0x10, 0x15, 0x12, 0x11, 0x0a, 0x0d, 0x61, 0x6c, 0x69, 0x5f, 0x65, 0x75, 0x5f, 0x77, 0x65, 0x73, 0x74, 0x5f, 0x31, 0x10, - 0x16, 0x2a, 0xa1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, + 0x16, 0x2a, 0xc1, 0x03, 0x0a, 0x0f, 0x54, 0x65, 0x6e, 0x63, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x74, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x61, 0x6e, 0x67, 0x6b, 0x6f, 0x6b, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x62, 0x65, @@ -807,25 +813,27 @@ var file_idl_pbtenant_tenant_proto_rawDesc = []byte{ 0x5f, 0x63, 0x68, 0x65, 0x6e, 0x67, 0x64, 0x75, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x63, 0x68, 0x6f, 0x6e, 0x67, 0x71, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, 0x61, 0x6e, 0x67, 0x7a, 0x68, - 0x6f, 0x75, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x67, 0x75, - 0x61, 0x6e, 0x67, 0x7a, 0x68, 0x6f, 0x75, 0x5f, 0x6f, 0x70, 0x65, 0x6e, 0x10, 0x06, 0x12, 0x12, - 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, - 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, - 0x61, 0x69, 0x10, 0x08, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, - 0x6f, 0x75, 0x6c, 0x10, 0x09, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, - 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x10, 0x0a, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, - 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, - 0x68, 0x65, 0x6e, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, - 0x61, 0x70, 0x5f, 0x73, 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0d, 0x12, 0x0f, - 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0e, 0x12, - 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, - 0x72, 0x74, 0x10, 0x0f, 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, - 0x73, 0x63, 0x6f, 0x77, 0x10, 0x10, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, - 0x61, 0x73, 0x68, 0x62, 0x75, 0x72, 0x6e, 0x10, 0x11, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, - 0x6e, 0x61, 0x5f, 0x73, 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, - 0x10, 0x12, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, - 0x6e, 0x74, 0x6f, 0x10, 0x13, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, + 0x6f, 0x75, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x68, 0x6f, + 0x6e, 0x67, 0x6b, 0x6f, 0x6e, 0x67, 0x10, 0x06, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x61, + 0x70, 0x5f, 0x6a, 0x61, 0x6b, 0x61, 0x72, 0x74, 0x61, 0x10, 0x07, 0x12, 0x10, 0x0a, 0x0c, 0x74, + 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6d, 0x75, 0x6d, 0x62, 0x61, 0x69, 0x10, 0x08, 0x12, 0x11, 0x0a, + 0x0d, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x6e, 0x61, 0x6e, 0x6a, 0x69, 0x6e, 0x67, 0x10, 0x09, + 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x65, 0x6f, 0x75, 0x6c, 0x10, + 0x0a, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x61, 0x6e, 0x67, + 0x68, 0x61, 0x69, 0x10, 0x0b, 0x12, 0x16, 0x0a, 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x68, 0x61, 0x6e, 0x67, 0x68, 0x61, 0x69, 0x5f, 0x66, 0x73, 0x69, 0x10, 0x0c, 0x12, 0x16, 0x0a, + 0x12, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, 0x68, 0x65, 0x6e, 0x7a, 0x68, 0x65, 0x6e, 0x5f, + 0x66, 0x73, 0x69, 0x10, 0x0d, 0x12, 0x13, 0x0a, 0x0f, 0x74, 0x63, 0x5f, 0x61, 0x70, 0x5f, 0x73, + 0x69, 0x6e, 0x67, 0x61, 0x70, 0x6f, 0x72, 0x65, 0x10, 0x0e, 0x12, 0x0f, 0x0a, 0x0b, 0x74, 0x63, + 0x5f, 0x61, 0x70, 0x5f, 0x74, 0x6f, 0x6b, 0x79, 0x6f, 0x10, 0x0f, 0x12, 0x13, 0x0a, 0x0f, 0x74, + 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x66, 0x72, 0x61, 0x6e, 0x6b, 0x66, 0x75, 0x72, 0x74, 0x10, 0x10, + 0x12, 0x10, 0x0a, 0x0c, 0x74, 0x63, 0x5f, 0x65, 0x75, 0x5f, 0x6d, 0x6f, 0x73, 0x63, 0x6f, 0x77, + 0x10, 0x11, 0x12, 0x11, 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x61, 0x73, 0x68, 0x62, + 0x75, 0x72, 0x6e, 0x10, 0x12, 0x12, 0x17, 0x0a, 0x13, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x73, + 0x69, 0x6c, 0x69, 0x63, 0x6f, 0x6e, 0x76, 0x61, 0x6c, 0x6c, 0x65, 0x79, 0x10, 0x13, 0x12, 0x11, + 0x0a, 0x0d, 0x74, 0x63, 0x5f, 0x6e, 0x61, 0x5f, 0x74, 0x6f, 0x72, 0x6f, 0x6e, 0x74, 0x6f, 0x10, + 0x14, 0x12, 0x12, 0x0a, 0x0e, 0x74, 0x63, 0x5f, 0x73, 0x61, 0x5f, 0x73, 0x61, 0x6f, 0x70, 0x61, + 0x75, 0x6c, 0x6f, 0x10, 0x15, 0x2a, 0xfb, 0x01, 0x0a, 0x0e, 0x48, 0x75, 0x61, 0x77, 0x65, 0x69, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x0a, 0x0a, 0x06, 0x68, 0x77, 0x5f, 0x61, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, 0x5f, 0x6e, 0x6f, 0x72, 0x74, 0x68, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x68, 0x77, 0x5f, 0x63, 0x6e, diff --git a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json index f6ab810..cb35b46 100644 --- a/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json +++ b/lan_trans/openapiv2/idl/pbecs/ecs.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -45,7 +45,8 @@ "ali", "tencent", "huawei", - "aws" + "k8s", + "harvester" ], "default": "ali" } @@ -198,7 +199,7 @@ "parameters": [ { "name": "provider", - "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云 腾讯EK目前转内测,接口无法调用,暂时搁置\n - huawei: 2 - 华为云\n - aws: 3 - 亚马逊云", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -206,7 +207,8 @@ "ali", "tencent", "huawei", - "aws" + "k8s", + "harvester" ], "default": "ali" }, diff --git a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json index c14bd5a..32ac949 100644 --- a/lan_trans/openapiv2/idl/pbpod/pod.swagger.json +++ b/lan_trans/openapiv2/idl/pbpod/pod.swagger.json @@ -37,7 +37,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -205,7 +205,7 @@ "parameters": [ { "name": "provider", - "description": "云名称\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", + "description": "云名称.\n\n - ali: 0 - 阿里云\n - tencent: 1 - 腾讯云\n - huawei: 2 - 华为云\n - k8s: 3 - K8S\n - harvester: 3 - Harvester", "in": "query", "required": false, "type": "string", @@ -220,14 +220,14 @@ }, { "name": "accountName", - "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户", + "description": "账户名称,根据config.yaml中的配置,默认为第一个配置的账户.", "in": "query", "required": false, "type": "string" }, { "name": "regionId", - "description": "区域Id,参考 tenant.proto 中的各个云的区域", + "description": "区域Id,参考 tenant.proto 中的各个云的区域.", "in": "query", "required": false, "type": "integer", @@ -235,7 +235,7 @@ }, { "name": "regionName", - "description": "区域名称,各云厂商自定义的region name", + "description": "区域名称,各云厂商自定义的region name.", "in": "query", "required": false, "type": "integer", @@ -243,7 +243,7 @@ }, { "name": "podId", - "description": "podID", + "description": "podID.", "in": "query", "required": false, "type": "integer", @@ -251,7 +251,7 @@ }, { "name": "pageNumber", - "description": "分页相关参数,页码", + "description": "分页相关参数,页码.", "in": "query", "required": false, "type": "integer", @@ -259,7 +259,7 @@ }, { "name": "pageSize", - "description": "分页相关参数,每页数量", + "description": "分页相关参数,每页数量.", "in": "query", "required": false, "type": "integer", @@ -267,14 +267,14 @@ }, { "name": "nextToken", - "description": "分页相关参数,下一页的token", + "description": "分页相关参数,下一页的token.", "in": "query", "required": false, "type": "string" }, { "name": "namespace", - "description": "namespace", + "description": "namespace.", "in": "query", "required": false, "type": "string" @@ -675,11 +675,14 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string" + }, + "value": { + "type": "string", + "format": "byte" } - }, - "additionalProperties": {} + } }, "rpcStatus": { "type": "object",