You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

pod.proto 4.7 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. syntax = "proto3";
  2. package pbpod;
  3. option go_package = "gitlink.org.cn/JCCE/PCM/lan_trans/idl/pbpod";
  4. import "idl/pbtenant/tenant.proto";
  5. import "google/api/annotations.proto";
  6. message PodInstance {
  7. // 云类型
  8. pbtenant.CloudProvider provider = 1;
  9. // 账号名称
  10. string account_name = 2;
  11. // 实例id
  12. string pod_id = 3;
  13. // 实例名称
  14. string pod_name = 4;
  15. // 地域,数据中心
  16. int32 region_id = 5;
  17. // 镜像
  18. string container_image = 6;
  19. // 容器名称
  20. string container_name = 7;
  21. // vcpu数
  22. string cpu_pod = 8;
  23. // 内存MB
  24. string memory_pod = 9;
  25. //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
  26. string security_group_id = 10;
  27. //子网ID 对应腾讯 SubnetId(腾讯必需)
  28. string subnet_id = 11;
  29. //VPC ID 对应腾讯 VpcId(腾讯必需)
  30. string vpc_id = 12;
  31. //名空间
  32. string namespace = 13;
  33. }
  34. message CreatePodReq {
  35. // 云类型
  36. pbtenant.CloudProvider provider = 1;
  37. // 账号名称
  38. string account_name = 2;
  39. // 实例id
  40. string pod_id = 3;
  41. // 实例名称
  42. string pod_name = 4;
  43. // 地域,数据中心
  44. int32 region_id = 5;
  45. // 镜像
  46. string container_image = 6;
  47. // 容器名称
  48. string container_name = 7;
  49. // v cpu数
  50. string cpu_pod = 8;
  51. // 内存MB
  52. string memory_pod = 9;
  53. //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
  54. string security_group_id = 10;
  55. //子网ID 对应腾讯 SubnetId(腾讯必需)
  56. string subnet_id = 11;
  57. //VPC ID 对应腾讯 VpcId(腾讯必需)
  58. string vpc_id = 12;
  59. //名空间
  60. string namespace = 13;
  61. }
  62. message CreatePodResp {
  63. // Pod集合
  64. repeated PodInstance pods = 1;
  65. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  66. bool finished = 2;
  67. // 请求id,出现问题后提供给云厂商,排查问题
  68. string request_id = 3;
  69. }
  70. message DeletePodReq {
  71. // 云类型
  72. pbtenant.CloudProvider provider = 1;
  73. // 账号名称
  74. string account_name = 2;
  75. // 实例名称
  76. string pod_name = 3;
  77. //namespace
  78. string namespace = 4;
  79. // 地域,数据中心
  80. int32 region_id = 5;
  81. }
  82. message DeletePodResp {
  83. // Pod集合
  84. repeated PodInstance pods = 1;
  85. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  86. bool finished = 2;
  87. // 请求id,出现问题后提供给云厂商,排查问题
  88. string request_id = 3;
  89. }
  90. message ListPodDetailReq {
  91. // 云名称
  92. pbtenant.CloudProvider provider = 1;
  93. // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户
  94. string account_name = 2;
  95. // 区域Id,参考 tenant.proto 中的各个云的区域
  96. int32 region_id = 3;
  97. // podID
  98. int32 pod_id = 4;
  99. // 分页相关参数,页码
  100. int32 page_number = 5;
  101. // 分页相关参数,每页数量
  102. int32 page_size = 6;
  103. // 分页相关参数,下一页的token
  104. string next_token = 7;
  105. // namespace
  106. string namespace = 8;
  107. }
  108. message ListPodDetailResp {
  109. // Pod集合
  110. repeated PodInstance pods = 1;
  111. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  112. bool finished = 2;
  113. // 分页相关参数,页码
  114. int32 page_number = 3;
  115. // 分页相关参数,每页数量
  116. int32 page_size = 4;
  117. // 分页相关参数,下一页的token
  118. string next_token = 5;
  119. // 请求id,出现问题后提供给云厂商,排查问题
  120. string request_id = 6;
  121. }
  122. message ListPodReq {
  123. // 云名称
  124. pbtenant.CloudProvider provider = 1;
  125. }
  126. message ListPodResp {
  127. // pod集合
  128. repeated PodInstance pods = 1;
  129. }
  130. message ListPodAllReq{}
  131. // Pod类产品接口
  132. // 阿里云 - ECI
  133. // 腾讯云 - TKS
  134. // 华为云 - CCI
  135. service PodService {
  136. // 创建Pod
  137. rpc CreatePod(CreatePodReq) returns (CreatePodResp) {
  138. option (google.api.http) = {
  139. post : "/apis/pod/create"
  140. body : "*"
  141. };
  142. }
  143. // 删除Pod
  144. rpc DeletePod(DeletePodReq) returns (DeletePodResp) {
  145. option (google.api.http) = {
  146. post : "/apis/pod/delete/{namespace}/{pod_name}"
  147. body : "*"
  148. };
  149. }
  150. // 查询Pod明细
  151. rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp) {
  152. option (google.api.http) = {
  153. post : "/apis/pod/detail"
  154. body : "*"
  155. };
  156. }
  157. // 查询Pod全量 - 根据云类型
  158. rpc ListPod(ListPodReq) returns (ListPodResp) {
  159. option (google.api.http) = {
  160. post : "/apis/pod"
  161. body : "*"
  162. };
  163. }
  164. // 查询所有云的Pod
  165. rpc ListPodAll(ListPodAllReq) returns (ListPodResp) {
  166. option (google.api.http) = {
  167. post : "/apis/pod/all"
  168. body : "*"
  169. };
  170. }
  171. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.