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 7.0 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
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
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
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295
  1. syntax = "proto3";
  2. package pbpod;
  3. option go_package = "code.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. //pcm id
  12. string pcm_id = 3;
  13. // 实例id
  14. string pod_id = 4;
  15. // 实例名称
  16. string pod_name = 5;
  17. // 地域ID
  18. int32 region_id = 6;
  19. // 地域Name
  20. string region_name = 7;
  21. // 镜像
  22. string container_image = 8;
  23. // 容器名称
  24. string container_name = 9;
  25. // vcpu数
  26. string cpu_pod = 10;
  27. // 内存MB
  28. string memory_pod = 11;
  29. //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
  30. string security_group_id = 12;
  31. //子网ID 对应腾讯 SubnetId(腾讯必需)
  32. string subnet_id = 13;
  33. //VPC ID 对应腾讯 VpcId(腾讯必需)
  34. string vpc_id = 14;
  35. //名空间
  36. string namespace = 15;
  37. // 实例状态
  38. string status = 16;
  39. }
  40. message CreatePodsReq {
  41. // 创建请求集合
  42. repeated CreatePodReq createPodReq = 1;
  43. }
  44. message CreatePodsResp {
  45. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  46. bool finished = 2;
  47. // 请求id,出现问题后提供给云厂商,排查问题
  48. repeated string request_id = 3;
  49. }
  50. message CreatePodReq {
  51. // 云类型
  52. pbtenant.CloudProvider provider = 1;
  53. // 账号名称
  54. string account_name = 2;
  55. // 实例id
  56. string pod_id = 3;
  57. // 实例名称
  58. string pod_name = 4;
  59. // 地域,数据中心
  60. int32 region_id = 5;
  61. // 镜像
  62. string container_image = 6;
  63. // 容器名称
  64. string container_name = 7;
  65. // v cpu数
  66. string cpu_pod = 8;
  67. // 内存MB
  68. string memory_pod = 9;
  69. //安全组ID 对应腾讯 SecurityGroupIds(腾讯必需)
  70. string security_group_id = 10;
  71. //子网ID 对应腾讯 SubnetId(腾讯必需)
  72. string subnet_id = 11;
  73. //VPC ID 对应腾讯 VpcId(腾讯必需)
  74. string vpc_id = 12;
  75. //名空间
  76. string namespace = 13;
  77. //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
  78. string requestSource = 14;
  79. }
  80. message CreatePodResp {
  81. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  82. bool finished = 1;
  83. // 请求id,出现问题后提供给云厂商,排查问题
  84. string request_id = 2;
  85. // podId
  86. string pod_id = 3;
  87. // podName
  88. string pod_name = 4;
  89. }
  90. message DeletePodReq {
  91. // 云类型
  92. pbtenant.CloudProvider provider = 1;
  93. // 账号名称
  94. string account_name = 2;
  95. // pcm id
  96. string pcm_id = 3;
  97. // podId
  98. string pod_id = 4;
  99. // podName
  100. string pod_name = 5;
  101. //namespace
  102. string namespace = 6;
  103. // 地域,数据中心
  104. int32 region_id = 7;
  105. //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
  106. string requestSource = 8;
  107. }
  108. message DeletePodResp {
  109. // 删除是否完成
  110. bool finished = 1;
  111. // 请求id,出现问题后提供给云厂商,排查问题
  112. string request_id = 2;
  113. // podId
  114. string pod_id = 3;
  115. // podName
  116. string pod_name = 4;
  117. }
  118. message UpdatePodReq {
  119. // 云类型
  120. pbtenant.CloudProvider provider = 1;
  121. // 账号名称
  122. string account_name = 2;
  123. // pcm ID
  124. string pcm_id = 3;
  125. // podId
  126. string pod_id = 4;
  127. // podName
  128. string pod_name = 5;
  129. //namespace
  130. string namespace = 6;
  131. // 地域,数据中心
  132. int32 region_id = 7;
  133. // 镜像
  134. string container_image = 8;
  135. // 容器名称
  136. string container_name = 9;
  137. // v cpu数
  138. string cpu_pod = 10;
  139. // 内存MB
  140. string memory_pod = 11;
  141. // 重启策略
  142. string restart_policy = 12;
  143. // labels
  144. string labels = 13;
  145. //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
  146. string requestSource = 14;
  147. }
  148. message UpdatePodResp {
  149. // 更新是否完成
  150. bool finished = 1;
  151. // 请求id,出现问题后提供给云厂商,排查问题
  152. string request_id = 2;
  153. // podId
  154. string pod_id = 3;
  155. // podName
  156. string pod_name = 4;
  157. }
  158. message ListPodDetailReq {
  159. // 云名称
  160. pbtenant.CloudProvider provider = 1;
  161. // 账户名称,根据config.yaml中的配置,默认为第一个配置的账户
  162. string account_name = 2;
  163. // 区域Id,参考 tenant.proto 中的各个云的区域
  164. int32 region_id = 3;
  165. // 区域名称,各云厂商自定义的region name
  166. int32 region_name = 4;
  167. // podID
  168. int32 pod_id = 5;
  169. // 分页相关参数,页码
  170. int32 page_number = 6;
  171. // 分页相关参数,每页数量
  172. int32 page_size = 7;
  173. // 分页相关参数,下一页的token
  174. string next_token = 8;
  175. // namespace
  176. string namespace = 9;
  177. }
  178. message ListPodDetailResp {
  179. // Pod集合
  180. repeated PodInstance pods = 1;
  181. // 查询是否完成,如果为否-false,则可以将下面三个分页参数填入到请求中,继续查询
  182. bool finished = 2;
  183. // 分页相关参数,页码
  184. int32 page_number = 3;
  185. // 分页相关参数,每页数量
  186. int32 page_size = 4;
  187. // 分页相关参数,下一页的token
  188. string next_token = 5;
  189. // 请求id,出现问题后提供给云厂商,排查问题
  190. string request_id = 6;
  191. }
  192. message ListPodReq {
  193. // cloud name
  194. pbtenant.CloudProvider provider = 1;
  195. //命名空间
  196. string namespace =2;
  197. //请求源,如果是从pcm sdk 过来的,则单独生成tenanters实体
  198. string requestSource =3;
  199. }
  200. message ListPodResp {
  201. // pod list
  202. repeated PodInstance pods = 1;
  203. }
  204. message GetPodRegionReq {
  205. // cloud name
  206. pbtenant.CloudProvider provider = 1;
  207. }
  208. message GetPodRegionResp {
  209. // region list
  210. repeated pbtenant.Region regions = 1;
  211. }
  212. message ListPodAllReq{}
  213. // Pod类产品接口
  214. // 阿里云 - ECI
  215. // 腾讯云 - TKS
  216. // 华为云 - CCI
  217. service PodService {
  218. // 创建Pods
  219. rpc CreatePods(CreatePodsReq) returns (CreatePodsResp) {
  220. option (google.api.http) = {
  221. post : "/apis/pod/createMulti"
  222. body : "*"
  223. };
  224. }
  225. // 创建Pod
  226. rpc CreatePod(CreatePodReq) returns (CreatePodResp) {
  227. option (google.api.http) = {
  228. post : "/apis/pod/create"
  229. body : "*"
  230. };
  231. }
  232. // 删除Pod
  233. rpc DeletePod(DeletePodReq) returns (DeletePodResp) {
  234. option (google.api.http) = {
  235. post : "/apis/pod/delete"
  236. body : "*"
  237. };
  238. }
  239. // 更新Pod
  240. rpc UpdatePod(UpdatePodReq) returns (UpdatePodResp) {
  241. option (google.api.http) = {
  242. put : "/apis/pod/update"
  243. body : "*"
  244. };
  245. }
  246. // 查询Pod明细
  247. rpc ListPodDetail(ListPodDetailReq) returns (ListPodDetailResp) {
  248. option (google.api.http) = {
  249. get : "/apis/pod/detail"
  250. };
  251. }
  252. // 查询Pod全量 - 根据云类型
  253. rpc ListPod(ListPodReq) returns (ListPodResp) {
  254. option (google.api.http) = {
  255. get : "/apis/pod"
  256. };
  257. }
  258. // 查询所有云的Pod
  259. rpc ListPodAll(ListPodAllReq) returns (ListPodResp) {
  260. option (google.api.http) = {
  261. get : "/apis/pod/all"
  262. };
  263. }
  264. }

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.