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.

pcm-core.api 46 kB

2 years ago
2 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308
  1. syntax = "v1"
  2. info(
  3. title: "gateway"
  4. desc: "gateway端微服务"
  5. author: "zhouqj"
  6. email: "450705171@qq.com"
  7. )
  8. type (
  9. getRegionResp {
  10. Code int32 `json:"code"`
  11. Msg string `json:"msg"`
  12. Data RegionNum `json:"data"`
  13. }
  14. RegionNum {
  15. RegionSum int64 `json:"regionSum"`
  16. SoftStackSum int64 `json:"softStackSum"`
  17. }
  18. )
  19. type (
  20. centerResourcesResp {
  21. CentersIndex []CenterIndex `json:"centersIndex"`
  22. }
  23. CenterIndex {
  24. Id int64 `json:"id"`
  25. Name string `json:"name"`
  26. Cpu string `json:"cpu"`
  27. Memory string `json:"memory"`
  28. Storage string `json:"storage"`
  29. CenterType string `json:"centerType"`
  30. }
  31. )
  32. type (
  33. HomeOverviewReq {
  34. }
  35. HomeOverviewResp {
  36. Code int `json:"code"`
  37. Message string `json:"message"`
  38. Data HomeOverviewData `json:"data"`
  39. }
  40. HomeOverviewData{
  41. AdaptSum int64 `json:"adaptSum"`
  42. ClusterSum int64 `json:"clusterSum"`
  43. StorageSum float32 `json:"storageSum"`
  44. TaskSum int64 `json:"taskSum"`
  45. }
  46. )
  47. type (
  48. PublicImageReq {
  49. }
  50. PublicImageResp {
  51. Code int `json:"code"`
  52. Message string `json:"message"`
  53. ImageDict []ImageDict `json:"imageRDict"`
  54. }
  55. ImageDict {
  56. Id int `json:"id"`
  57. PublicImageName string `json:"public_image_name"`
  58. }
  59. )
  60. type (
  61. PublicFlavorReq {
  62. }
  63. PublicFlavorResp {
  64. Code int `json:"code"`
  65. Message string `json:"message"`
  66. FlavorDict []FlavorDict `json:"flavorDict"`
  67. }
  68. FlavorDict {
  69. Id int `json:"id"`
  70. PublicFlavorName string `json:"public_flavor_name"`
  71. }
  72. )
  73. type (
  74. PublicNetworkReq {
  75. }
  76. PublicNetworkResp {
  77. Code int `json:"code"`
  78. Message string `json:"message"`
  79. NetworkDict []NetworkDict `json:"networkDict"`
  80. }
  81. NetworkDict {
  82. Id int `json:"id"`
  83. PublicNetworkName string `json:"public_netWork_name"`
  84. }
  85. )
  86. type remoteResp {
  87. Code int `json:"code"`
  88. Message string `json:"message"`
  89. Data interface{} `json:"data"`
  90. }
  91. type (
  92. clustersLoadReq {
  93. ClusterName string `form:"clusterName"`
  94. }
  95. clustersLoadResp {
  96. Data interface{} `json:"data"`
  97. }
  98. )
  99. type (
  100. syncClusterLoadReq {
  101. clusterLoadRecords []ClusterLoadRecord `json:"clusterLoadRecords"`
  102. }
  103. ClusterLoadRecord {
  104. AdapterId int64 `json:"adapterId,optional"`
  105. ClusterName string `json:"clusterName,optional"`
  106. CpuAvail float64 `json:"cpuAvail,optional"`
  107. CpuTotal float64 `json:"cpuTotal,optional"`
  108. CpuUtilisation float64 `json:"cpuUtilisation,optional"`
  109. MemoryAvail float64 `json:"memoryAvail,optional"`
  110. MemoryUtilisation float64 `json:"memoryUtilisation,optional"`
  111. MemoryTotal float64 `json:"memoryTotal,optional"`
  112. DiskAvail float64 `json:"diskAvail,optional"`
  113. DiskTotal float64 `json:"diskTotal,optional"`
  114. DiskUtilisation float64 `json:"diskUtilisation,optional"`
  115. PodsUtilisation float64 `json:"podsUtilisation,optional"`
  116. PodsCount int64 `json:"podsCount,optional"`
  117. PodsTotal int64 `json:"podsTotal,optional"`
  118. }
  119. )
  120. type (
  121. getClusterListReq {
  122. Id int64 `form:"id"`
  123. }
  124. getClusterListResp {
  125. Clusters []ClusterInfo `json:"clusters"`
  126. }
  127. )
  128. type (
  129. listRegionResp {
  130. Code int32 `json:"code"`
  131. Msg string `json:"msg"`
  132. Data []Region `json:"data"`
  133. }
  134. Region {
  135. RegionName string `json:"RegionName"` // 域名
  136. SoftStack string `json:"SoftStack"` // 软件栈
  137. SlurmNum int64 `json:"SlurmNum"` // 超算域适配slurm数量
  138. AdaptorInterfaceSum int64 `json:"AdaptorInterfaceSum"` // 适配接口数量
  139. RunningJobs int64 `json:"runningJobs"`
  140. }
  141. )
  142. type (
  143. GeneralTaskReq {
  144. Name string `json:"name"`
  145. AdapterIds []string `json:"adapterIds"`
  146. ClusterIds []string `json:"clusterIds"`
  147. Strategy string `json:"strategy"`
  148. StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
  149. ReqBody []string `json:"reqBody"`
  150. Replicas int64 `json:"replicas,string"`
  151. }
  152. PodLogsReq {
  153. TaskId string `json:"taskId"`
  154. TaskName string `json:"taskName"`
  155. ClusterId string `json:"clusterId"`
  156. ClusterName string `json:"clusterName"`
  157. AdapterId string `json:"adapterId"`
  158. AdapterName string `json:"adapterName"`
  159. PodName string `json:"podName"`
  160. stream bool `json:"stream"`
  161. }
  162. )
  163. type deleteTaskReq {
  164. Id int64 `path:"id"`
  165. }
  166. type commitTaskReq {
  167. Name string `json:"name"`
  168. NsID string `json:"nsID"`
  169. Replicas int64 `json:"replicas,optional"`
  170. MatchLabels map[string]string `json:"matchLabels,optional"`
  171. YamlList []string `json:"yamlList"`
  172. ClusterName string `json:"clusterName"`
  173. }
  174. type (
  175. scheduleTaskByYamlReq {
  176. Name string `yaml:"name"`
  177. Description string `yaml:"description"`
  178. TenantId int64 `yaml:"tenantId"`
  179. NsID string `yaml:"nsID"`
  180. Tasks []TaskYaml `yaml:"tasks"`
  181. }
  182. TaskYaml {
  183. Replicas int64 `yaml:"replicas"`
  184. TaskId int64 `yaml:"taskId"`
  185. NsID string `yaml:"nsID"`
  186. TaskType string `yaml:"taskType"`
  187. ParticipantId int64 `yaml:"participantId"`
  188. MatchLabels map[string]string `yaml:"matchLabels"`
  189. Metadata interface{} `yaml:"metadata"`
  190. }
  191. )
  192. type (
  193. commitVmTaskReq {
  194. Name string `json:"name"`
  195. AdapterIds []string `json:"adapterIds,optional"`
  196. ClusterIds []string `json:"clusterIds"`
  197. Strategy string `json:"strategy"`
  198. StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
  199. MinCount int64 `json:"min_count,optional"`
  200. ImageRef int64 `json:"imageRef,optional"`
  201. FlavorRef int64 `json:"flavorRef,optional"`
  202. Uuid int64 `json:"uuid,optional"`
  203. Replicas int64 `json:"replicas,string"`
  204. VmName string `json:"vm_name,optional"`
  205. }
  206. TaskVm {
  207. Image string `json:"image"`
  208. Flavor string `json:"flavor"`
  209. Uuid string `json:"uuid"`
  210. Platform string `json:"platform"`
  211. }
  212. VmOption {
  213. AdapterId string `json:"adapterId"`
  214. VmClusterIds []string `json:"vmClusterIds"`
  215. Replicas int64 `json:"replicas,optional"`
  216. Name string `json:"name"`
  217. //ResourceType string `json:"resourceType"`
  218. //TaskType string `json:"taskType"`
  219. Strategy string `json:"strategy"`
  220. ClusterToStaticWeight map[string]int32 `json:"clusterToStaticWeight"`
  221. MatchLabels map[string]string `json:"matchLabels,optional"`
  222. StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"`
  223. CreateMulServer []CreateMulDomainServer `json:"createMulServer,optional"`
  224. }
  225. CreateMulDomainServer {
  226. Platform string `json:"platform,optional"`
  227. name string `json:"name,optional"`
  228. min_count int64 `json:"min_count,optional"`
  229. imageRef string `json:"imageRef,optional"`
  230. flavorRef string `json:"flavorRef,optional"`
  231. uuid string `json:"uuid,optional"`
  232. ClusterId string `json:"clusterId,optional"`
  233. }
  234. commitVmTaskResp {
  235. Code int32 `json:"code"`
  236. Msg string `json:"msg"`
  237. }
  238. ScheduleVmResult {
  239. ClusterId string `json:"clusterId"`
  240. TaskId string `json:"taskId"`
  241. Strategy string `json:"strategy"`
  242. Replica int32 `json:"replica"`
  243. Msg string `json:"msg"`
  244. }
  245. VmTask{
  246. Id string `json:"id" copier:"Id"`
  247. Links []VmLinks `json:"links" copier:"Links"`
  248. OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"`
  249. SecurityGroups []VmSecurity_groups_server `json:"security_groups" copier:"SecurityGroups"`
  250. AdminPass string `json:"adminPass" copier:"AdminPass"`
  251. }
  252. VmLinks {
  253. Href string `json:"href " copier:"Href"`
  254. Rel string `json:"rel" copier:"Rel"`
  255. }
  256. // commitVmTaskReq {
  257. // Name string `json:"name"`
  258. // NsID string `json:"nsID"`
  259. // Replicas int64 `json:"replicas,optional"`
  260. // MatchLabels map[string]string `json:"matchLabels,optional"`
  261. // AdapterId string `json:"adapterId,optional"`
  262. // ClusterType string `json:"clusterType,optional"`
  263. // //Virtual Machine Section
  264. // CreateMulServer []CreateMulDomainServer `json:"createMulServer,optional"`
  265. // }
  266. // CreateMulDomainServer {
  267. // Platform string `json:"platform,optional"`
  268. // Name string `json:"name,optional"`
  269. // Min_count int64 `json:"min_count,optional"`
  270. // ImageRef string `json:"imageRef,optional"`
  271. // FlavorRef string `json:"flavorRef,optional"`
  272. // Uuid string `json:"uuid,optional"`
  273. // }
  274. // commitVmTaskResp {
  275. // // VmTask []VmTask `json:"vmTask" copier:"VmTask"`
  276. // TaskId int64 `json:"taskId"`
  277. // Code int32 `json:"code"`
  278. // Msg string `json:"msg"`
  279. // }
  280. // VmTask {
  281. // Id string `json:"id" copier:"Id"`
  282. // Links []VmLinks `json:"links" copier:"Links"`
  283. // OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"`
  284. // SecurityGroups []VmSecurity_groups_server `json:"security_groups" copier:"SecurityGroups"`
  285. // AdminPass string `json:"adminPass" copier:"AdminPass"`
  286. // }
  287. // VmLinks {
  288. // Href string `json:"href " copier:"Href"`
  289. // Rel string `json:"rel" copier:"Rel"`
  290. // }
  291. VmSecurity_groups_server {
  292. Name string `json:"name" copier:"Name"`
  293. }
  294. )
  295. type (
  296. scheduleTaskByYamlResp {
  297. TaskId int64 `json:"taskId"`
  298. }
  299. )
  300. type (
  301. scheduleTaskReq {
  302. Name string `json:"name"`
  303. Synergy string `json:"synergy"`
  304. Description string `json:"description"`
  305. Strategy string `json:"strategy"`
  306. Tasks []TaskInfo `json:"tasks"`
  307. }
  308. TaskInfo {
  309. TaskId int64 `json:"taskId,optional"`
  310. TaskType string `json:"taskType,optional"`
  311. MatchLabels map[string]string `json:"matchLabels"`
  312. ParticipantId int64 `json:"participantId"`
  313. Metadata interface{} `json:"metadata"`
  314. }
  315. )
  316. type (
  317. jobTotalResp {
  318. AllCardRunTime float64 `json:"allCardRunTime"`
  319. AllJobCount float64 `json:"allJobCount"`
  320. AllJobRunTime float64 `json:"allJobRunTime"`
  321. TrainJobs []TrainJob `json:"trainJobs"`
  322. }
  323. TrainJob {
  324. Name string `json:"name"`
  325. Status string `json:"status"`
  326. ParticipantName string `json:"participantName"`
  327. SynergyStatus string `json:"synergyStatus"`
  328. Strategy int `json:"strategy"`
  329. }
  330. )
  331. // 任务列表参数
  332. type (
  333. taskListReq {
  334. PageNum int `form:"pageNum"`
  335. PageSize int `form:"pageSize"`
  336. }
  337. taskListResp {
  338. TotalCount int64 `json:"totalCount"` // 任务总数
  339. NormalCount int64 `json:"normalCount"` // 正常任务数
  340. AlarmCount int64 `json:"alarmCount"` // 任务告警数
  341. Tasks []Task `json:"tasks"`
  342. }
  343. Task {
  344. Id int64 `json:"id"`
  345. Name string `json:"name"`
  346. Status string `json:"status"`
  347. TaskType string `json:"taskType"`
  348. StartTime string `json:"startTime"`
  349. EndTime string `json:"endTime"`
  350. ParticipantStatus string `json:"participantStatus"`
  351. ParticipantId int64 `json:"participantId"`
  352. ParticipantName string `json:"participantName"`
  353. }
  354. pageTaskReq {
  355. Name string `form:"name,optional"`
  356. PageInfo
  357. }
  358. TaskModel {
  359. Id int64 `json:"id,omitempty,string" db:"id"` // id
  360. Name string `json:"name,omitempty" db:"name"` // 作业名称
  361. Description string `json:"description,omitempty" db:"description"` // 作业描述
  362. Status string `json:"status,omitempty" db:"status"` // 作业状态
  363. Strategy int64 `json:"strategy" db:"strategy"` // 策略
  364. SynergyStatus int64 `json:"synergyStatus" db:"synergy_status"` // 协同状态(0-未协同、1-已协同)
  365. CommitTime string `json:"commitTime,omitempty" db:"commit_time"` // 提交时间
  366. StartTime string `json:"startTime,omitempty" db:"start_time"` // 开始时间
  367. EndTime string `json:"endTime,omitempty" db:"end_time"` // 结束运行时间
  368. RunningTime int64 `json:"runningTime" db:"running_time"` // 已运行时间(单位秒)
  369. YamlString string `json:"yamlString,omitempty" db:"yaml_string"`
  370. Result string `json:"result,omitempty" db:"result"` // 作业结果
  371. DeletedAt string `json:"deletedAt,omitempty" gorm:"index" db:"deleted_at"`
  372. NsID string `json:"nsId,omitempty" db:"ns_id"`
  373. TenantId string `json:"tenantId,omitempty" db:"tenant_id"`
  374. CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  375. UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"`
  376. AdapterTypeDict string `json:"adapterTypeDict" db:"adapter_type_dict" gorm:"adapter_type_dict"` //适配器类型(对应字典表的值
  377. TaskTypeDict string `json:"taskTypeDict" db:"task_type_dict" gorm:"task_type_dict"` //任务类型(对应字典表的值
  378. }
  379. )
  380. // 任务列表参数
  381. type (
  382. taskDetailReq {
  383. TaskId int64 `path:"taskId"`
  384. }
  385. taskDetailResp {
  386. CpuCores float64 `json:"cpuCores"`
  387. CpuRate float64 `json:"cpuRate"`
  388. CpuLimit float64 `json:"cpuLimit"`
  389. GpuCores float64 `json:"gpuCores"`
  390. GpuRate float64 `json:"gpuRate"`
  391. GpuLimit float64 `json:"gpuLimit"`
  392. MemoryTotal float64 `json:"memoryTotal"`
  393. MemoryRate float64 `json:"memoryRate"`
  394. MemoryLimit float64 `json:"memoryLimit"`
  395. }
  396. )
  397. type (
  398. listCenterResp {
  399. Code int32 `json:"code"`
  400. Msg string `json:"msg"`
  401. Data CenterData `json:"data"`
  402. }
  403. CenterData {
  404. TotalCount int `json:"totalCount"`
  405. Centers []Center `json:"centers"`
  406. }
  407. Center {
  408. Id int64 `json:"id"`
  409. CenterSource string `json:"centerSource"`
  410. SourceId string `json:"sourceId"`
  411. Name string `json:"name"`
  412. Description string `json:"description"`
  413. Type string `json:"type"`
  414. Area string `json:"area"`
  415. City string `json:"city"`
  416. Longitude float64 `json:"longitude"`
  417. Latitude float64 `json:"latitude"`
  418. Status string `json:"status"`
  419. UserNum int64 `json:"userNum"`
  420. DeletedFlag int64 `json:"deletedFlag"`
  421. CloudClusterNum int64 `json:"cloudClusterNum"`
  422. CloudNodeNum int64 `json:"cloudNodeNum"`
  423. CloudCpuNum int64 `json:"cloudCpuNum"`
  424. CloudGpuNum int64 `json:"cloudGpuNum"`
  425. CloudMngFlops int64 `json:"cloudMngFlops"`
  426. CloudUmngFlops int64 `json:"cloudUmngFlops"`
  427. CloudMngStorage int64 `json:"cloudMngStorage"`
  428. CloudUmngStorage int64 `json:"cloudUmngStorage"`
  429. AiClusterNum int64 `json:"aiClusterNum"`
  430. AiNodeNum int64 `json:"aiNodeNum"`
  431. AiCpuNum int64 `json:"aiCpuNum"`
  432. AiGpuNum int64 `json:"aiGpuNum"`
  433. AiMngFlops int64 `json:"aiMngFlops"`
  434. AiUmngFlops int64 `json:"aiUmngFlops"`
  435. AiMngStorage int64 `json:"aiMngStorage"`
  436. AiUmngStorage int64 `json:"aiUmngStorage"`
  437. HpcClusterNum int64 `json:"hpcClusterNum"`
  438. HpcNodeNum int64 `json:"hpcNodeNum"`
  439. HpcCpuNum int64 `json:"hpcCpuNum"`
  440. HpcGpuNum int64 `json:"hpcGpuNum"`
  441. HpcMngFlops int64 `json:"hpcMngFlops"`
  442. HpcUmngFlops int64 `json:"hpcUmngFlops"`
  443. HpcMngStorage int64 `json:"hpcMngStorage"`
  444. HpcUmngStorage int64 `json:"hpcUmngStorage"`
  445. Edwc bool `json:"edwc"`
  446. Ydyl bool `json:"ydyl"`
  447. HubCode int64 `json:"hubCode"`
  448. }
  449. )
  450. type (
  451. listClusterReq {
  452. CenterId int32 `path:"centerId"`
  453. }
  454. listClusterResp {
  455. Code int32 `json:"code"`
  456. Msg string `json:"msg"`
  457. Data ClusterData `json:"data"`
  458. }
  459. ClusterData {
  460. TotalCount int `json:"totalCount"`
  461. Clusters []ComputeCluster `json:"clusters"`
  462. }
  463. ComputeCluster {
  464. Id int64 `json:"id"`
  465. Name string `json:"name"`
  466. Type string `json:"type"`
  467. JcceDomainId int64 `json:"jcceDomainId"`
  468. JcceDomainName string `json:"jcceDomainName"`
  469. Longitude float64 `json:"longitude"`
  470. Latitude float64 `json:"latitude"`
  471. Description string `json:"description"`
  472. }
  473. )
  474. type ScreenChartResp {
  475. ComputingPower []int `json:"computingPower"`
  476. CpuAvg []int `json:"cpuAvg"`
  477. CpuLoad []int `json:"cpuLoad"`
  478. MemoryLoad []int `json:"memoryLoad"`
  479. MemoryAvg []int `json:"memoryAvg"`
  480. CenterName string `json:"centerName"`
  481. }
  482. type ScreenInfoResp {
  483. StorageUsed float32 `json:"storageUsed"`
  484. StorageUsing float32 `json:"storageUsing"`
  485. UsageRate float32 `json:"usageRate"`
  486. UsingRate float32 `json:"usingRate"`
  487. ApiDelay string `json:"apiDelay"`
  488. SchedulerTimes int `json:"schedulerTimes"`
  489. SchedulerErr int `json:"schedulerErr"`
  490. ApiTimes string `json:"apiTimes"`
  491. CenterCount int `json:"centerCount"`
  492. ComputingPower float64 `json:"computingPower"`
  493. ClusterCount int `json:"clusterCount"`
  494. RunningCount int `json:"runningCount"`
  495. CardCount int `json:"cardCount"`
  496. RunningTime int `json:"runningTime"`
  497. }
  498. type (
  499. cpResp {
  500. POpsAtFp16 float32 `json:"pOpsAtFp16"`
  501. }
  502. GiResp {
  503. CpuNum int32 `json:"cpuNum,optional"`
  504. MemoryInGib int32 `json:"memoryInGib,optional"`
  505. StorageInGib int32 `json:"storageInGib,optional"`
  506. }
  507. )
  508. type (
  509. DomainResourceResp {
  510. TotalCount int `json:"totalCount"`
  511. DomainResourceList []DomainResource `json:"domainResourceList"`
  512. }
  513. DomainResource {
  514. Id int64 `json:"id"` // id
  515. DomainId string `json:"domainId"` // 资源域id
  516. DomainName string `json:"domainName"` // 资源域名称
  517. JobCount int64 `json:"jobCount"` // 资源域任务数量
  518. DomainSource int64 `json:"domainSource"` // 资源域数据来源:0-nudt,1-鹏城
  519. Stack string `json:"stack"` // 技术栈
  520. ResourceType string `json:"resourceType"` // 资源类型
  521. Cpu float64 `json:"cpu"` // cpu使用率
  522. Memory float64 `json:"memory"` // 内存使用率
  523. Disk float64 `json:"disk"` // 存储使用率
  524. NodeCount float64 `json:"nodeCount"` //节点使用率
  525. // DeleteFlag int64 `json:"delete_flag"` // 是否删除 0:未删除,1:已经删除
  526. Description string `json:"description"` //集群描述
  527. ClusterName string `json:"clusterName"` //集群名称
  528. CpuTotal float64 `json:"cpuTotal"` //cpu总核数
  529. MemoryTotal float64 `json:"memoryTotal"` //内存总量Gi
  530. DiskTotal float64 `json:"diskTotal"` //存储总量GB
  531. NodeTotal float64 `json:"nodeTotal"` //容器节点数
  532. CpuUsage float64 `json:"cpuUsage"` //cpu已使用核数
  533. MemoryUsage float64 `json:"memoryUsage"` //内存已使用Gi
  534. DiskUsage float64 `json:"diskUsage"` //存储已使用GB
  535. NodeUsage float64 `json:"nodeUsage"` //容器节点已使用
  536. }
  537. )
  538. type (
  539. ResourcePanelConfigReq {
  540. Id int64 `json:"id"` //id
  541. Title string `json:"title"` //标题
  542. TitleColor string `json:"titleColor"` //标题色
  543. MainColor string `json:"mainColor"` //主色调
  544. MainColor2 string `json:"mainColor2"` //次主色调
  545. TextColor string `json:"textColor"` //文字颜色
  546. BackgroundColor string `json:"backgroundColor"` //背景底色
  547. Center string `json:"center"` //中心点
  548. CenterPosition string `json:"centerPosition"` //comment 中心点坐标
  549. ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色
  550. StatusIng string `json:"statusIng"` //接入中图标
  551. StatusUn string `json:"statusUn"` //未接入图标
  552. StatusEnd string `json:"statusEnd"` //已接入图标
  553. TitleIcon string `json:"titleIcon"` //标题底图
  554. SubTitleIcon string `json:"subTitleIcon"` //小标题底图
  555. NumberBg string `json:"numberBg"` //数字底图
  556. TaskBg string `json:"taskBg"` //任务底图
  557. }
  558. ResourcePanelConfigResp {
  559. Id int64 `json:"id"` //id
  560. Title string `json:"title"` //标题,
  561. TitleColor string `json:"titleColor"` //标题色,
  562. MainColor string `json:"mainColor"` //主色调,
  563. MainColor2 string `json:"mainColor2"` //次主色调,
  564. TextColor string `json:"textColor"` //文字颜色,
  565. BackgroundColor string `json:"backgroundColor"` //背景底色,
  566. Center string `json:"center"` //中心点,
  567. CenterPosition string `json:"centerPosition"` //comment 中心点坐标,
  568. ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色,
  569. StatusIng string `json:"statusIng"` //接入中图标,
  570. StatusUn string `json:"statusUn"` //未接入图标,
  571. StatusEnd string `json:"statusEnd"` //已接入图标,
  572. TitleIcon string `json:"titleIcon"` //标题底图,
  573. SubTitleIcon string `json:"subTitleIcon"` //小标题底图,
  574. NumberBg string `json:"numberBg"` //数字底图,
  575. TaskBg string `json:"taskBg"` //任务底图,
  576. CreateTime string `json:"createTime"` //创建时间,
  577. UpdateTime string `json:"updateTime"` //更新时间
  578. }
  579. )
  580. type (
  581. ComputilityStatisticsResp {
  582. Code int32 `json:"code,omitempty"`
  583. Msg string `json:"msg,omitempty"`
  584. ErrorMsg string `json:"ErrorMsg,omitempty"`
  585. ComputilityStatistics ComputilityStatistics `json:"data"` //容器节点已使用
  586. }
  587. ComputilityStatistics {
  588. DomainSum int64 `json:"domainSum"` //域总数
  589. TotalComputility float64 `json:"totalComputility"` //算力总和
  590. ClusterNum int64 `json:"clusterNum"` //集群总数
  591. }
  592. )
  593. //jccSchedule容器集群资源监控 > start
  594. type NodeAssetsResp {
  595. NodeAssets []NodeAsset `json:"nodeAssets"`
  596. }
  597. type NodeAsset {
  598. Name string `json:"Name"` //租户名称
  599. NodeName string `json:"NodeName"` // 节点名称
  600. CpuTotal int64 `json:"CpuTotal"` // cpu核数
  601. CpuUsable float64 `json:"CpuUsable"` // cpu可用率
  602. DiskTotal int64 `json:"DiskTotal"` // 磁盘空间
  603. DiskAvail int64 `json:"DiskAvail"` // 磁盘可用空间
  604. MemTotal int64 `json:"MemTotal"` // 内存总数
  605. MemAvail int64 `json:"MemAvail"` // 内存可用数
  606. GpuTotal int64 `json:"GpuTotal"` // gpu总数
  607. GpuAvail int64 `json:"GpuAvail"` // gpu可用数
  608. ParticipantId int64 `json:"ParticipantId"` // 集群动态信息id
  609. }
  610. type participantListResp {
  611. Participants []Participant `json:"participants"`
  612. }
  613. type Participant {
  614. Id int64 `json:"id"`
  615. Name string `json:"name"`
  616. Address string `json:"address"`
  617. MetricsUrl string `json:"metricsUrl"`
  618. TenantName string `json:"tenantName"`
  619. TypeName string `json:"typeName"`
  620. }
  621. // apps列表参数
  622. type (
  623. AppListReq {
  624. NsID string `form:"nsID"`
  625. }
  626. AppListResp {
  627. Apps []App `json:"apps"` //应用列表
  628. }
  629. Replica {
  630. ClusterName string `json:"clusterName"`
  631. Replica int32 `json:"replica"`
  632. }
  633. App {
  634. Id int64 `json:"id,optional" db:"id"`
  635. Name string `json:"name,optional"`
  636. Status string `json:"status,optional"`
  637. CreateTime string `json:"createTime,optional"`
  638. MinReplicas string `json:"minReplicas,optional"`
  639. MaxReplicas string `json:"maxReplicas,optional"`
  640. AppLocations []AppLocation `json:"appLocations,optional"`
  641. }
  642. AppLocation {
  643. ParticipantId string `json:"participantId,optional" db:"participant_id"`
  644. ParticipantName string `json:"participantName,optional" db:"participant_name"`
  645. Kind string `json:"kind,optional" db:"kind"`
  646. }
  647. )
  648. //apps 详情参数
  649. type (
  650. AppDetailReq {
  651. Name string `path:"appName"`
  652. NsID string `form:"nsID"`
  653. }
  654. AppDetailResp {
  655. CpuCores float64 `json:"cpuCores"`
  656. CpuRate float64 `json:"cpuRate"`
  657. CpuLimit float64 `json:"cpuLimit"`
  658. GpuCores float64 `json:"gpuCores"`
  659. GpuRate float64 `json:"gpuRate"`
  660. GpuLimit float64 `json:"gpuLimit"`
  661. MemoryTotal float64 `json:"memoryTotal"`
  662. MemoryRate float64 `json:"memoryRate"`
  663. MemoryLimit float64 `json:"memoryLimit"`
  664. }
  665. AppTaskResp {
  666. Data interface{} `json:"data"`
  667. }
  668. )
  669. type (
  670. DeleteAppReq {
  671. Name string `form:"name"`
  672. NsID string `form:"nsID"`
  673. }
  674. DeleteAppResp {
  675. Code int `json:"code,omitempty"`
  676. Msg string `json:"msg,omitempty"`
  677. Data interface{} `json:"data,omitempty"`
  678. }
  679. AppResp {
  680. Code int `json:"code,omitempty"`
  681. Msg string `json:"msg,omitempty"`
  682. Data interface{} `json:"data,omitempty"`
  683. }
  684. )
  685. type (
  686. AdapterQueryReq {
  687. Id string `form:"id,optional" db:"id"`
  688. Name string `form:"name,optional"`
  689. Type string `form:"type,optional"`
  690. ResourceType string `form:"resourceType,optional"`
  691. Nickname string `form:"nickname,optional"`
  692. Version string `form:"version,optional"`
  693. Server string `form:"server,optional"`
  694. PageInfo
  695. }
  696. AdapterRelationQueryReq {
  697. Id string `form:"id,optional" db:"id"`
  698. Name string `form:"name,optional"`
  699. Type string `form:"type,optional"`
  700. ResourceType string `form:"resourceType,optional"`
  701. Nickname string `form:"nickname,optional"`
  702. Version string `form:"version,optional"`
  703. Server string `form:"server,optional"`
  704. }
  705. AdapterReq {
  706. Id string `json:"id,optional" db:"id"`
  707. Name string `json:"name,optional"`
  708. Type string `json:"type,optional"`
  709. ResourceType string `json:"resourceType,optional"`
  710. Nickname string `json:"nickname,optional"`
  711. Version string `json:"version,optional"`
  712. Server string `json:"server,optional"`
  713. }
  714. AdapterCreateReq {
  715. Id string `json:"id,optional" db:"id"`
  716. Name string `json:"name"`
  717. Type string `json:"type"`
  718. ResourceType string `json:"resourceType"`
  719. Nickname string `json:"nickname"`
  720. Version string `json:"version"`
  721. Server string `json:"server"`
  722. }
  723. AdapterDelReq {
  724. Id string `form:"id,optional" db:"id"`
  725. }
  726. AdapterInfo {
  727. Id string `json:"id,omitempty" db:"id"`
  728. Name string `json:"name,omitempty" db:"name"`
  729. Type string `json:"type,omitempty" db:"type"`
  730. ResourceType string `json:"resourceType,omitempty" db:"resource_type"`
  731. Nickname string `json:"nickname,omitempty" db:"nickname"`
  732. Version string `json:"version,omitempty" db:"version"`
  733. Server string `json:"server,omitempty" db:"server"`
  734. CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
  735. }
  736. AdapterResp {
  737. Id string `json:"id,omitempty" db:"id"`
  738. Name string `json:"name,omitempty" db:"name"`
  739. Type string `json:"type,omitempty" db:"type"`
  740. ResourceType string `json:"resourceType,omitempty" db:"resource_type"`
  741. Nickname string `json:"nickname,omitempty" db:"nickname"`
  742. Version string `json:"version,omitempty" db:"version"`
  743. Server string `json:"server,omitempty" db:"server"`
  744. CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
  745. }
  746. AdapterListResp {
  747. List []AdapterInfo `json:"list,omitempty"`
  748. }
  749. AdapterRelationResp {
  750. List []*ClusterRelationInfo `json:"list,omitempty"`
  751. }
  752. AdapterRelation {
  753. Id string `json:"id,omitempty" db:"id"`
  754. Name string `json:"name,omitempty" db:"name"`
  755. Type string `json:"type,omitempty" db:"type"`
  756. ResourceType string `json:"resourceType" db:"resource_type"`
  757. Nickname string `json:"nickname,omitempty" db:"nickname"`
  758. Version string `json:"version,omitempty" db:"version"`
  759. Server string `json:"server,omitempty" db:"server"`
  760. CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
  761. Clusters []*ClusterInfo `json:"clusters,omitempty"`
  762. }
  763. )
  764. type (
  765. ClusterReq {
  766. Id string `form:"id,optional"`
  767. AdapterId string `form:"adapterId,optional"`
  768. Name string `form:"name,optional"`
  769. Nickname string `form:"nickname,optional"`
  770. Description string `form:"description,optional"`
  771. Server string `form:"server,optional"`
  772. MonitorServer string `form:"monitorServer,optional"`
  773. Username string `form:"username,optional"`
  774. Password string `form:"password,optional"`
  775. Token string `form:"token,optional"`
  776. Ak string `form:"ak,optional"`
  777. Sk string `form:"sk,optional"`
  778. Region string `form:"region,optional"`
  779. ProjectId string `form:"projectId,optional"`
  780. Version string `form:"version,optional"`
  781. Label string `form:"label,optional"`
  782. OwnerId string `form:"ownerId,omitempty,optional"`
  783. AuthType string `form:"authType,optional"`
  784. Type string `form:"type,optional"`
  785. ProducerDict string `form:"producerDict,optional"`
  786. RegionDict string `form:"regionDict,optional"`
  787. ResourceType string `form:"resourceType,optional"`
  788. PageInfo
  789. }
  790. ClusterCreateReq {
  791. Id string `json:"id,optional"`
  792. AdapterId string `json:"adapterId,optional"`
  793. Name string `json:"name,optional"`
  794. Nickname string `json:"nickname,optional"`
  795. Description string `json:"description,optional"`
  796. Server string `json:"server,optional"`
  797. MonitorServer string `json:"monitorServer,optional"`
  798. Username string `json:"username,optional"`
  799. Password string `json:"password,optional"`
  800. Token string `json:"token,optional"`
  801. Ak string `json:"ak,optional"`
  802. Sk string `json:"sk,optional"`
  803. Region []string `json:"region,optional"`
  804. ProjectId string `json:"projectId,optional"`
  805. Version string `json:"version,optional"`
  806. Label string `json:"label,optional"`
  807. OwnerId string `json:"ownerId,omitempty,optional"`
  808. AuthType string `json:"authType,optional"`
  809. ProducerDict string `json:"producerDict,optional"`
  810. RegionDict string `json:"regionDict,optional"`
  811. RegionName string `json:"regionName,optional"`
  812. }
  813. ClusterInfo {
  814. Id string `json:"id,omitempty" db:"id"`
  815. AdapterId string `json:"adapterId,omitempty" db:"adapter_id"`
  816. Name string `json:"name,omitempty" db:"name"`
  817. Nickname string `json:"nickname,omitempty" db:"nickname"`
  818. Description string `json:"description,omitempty" db:"description"`
  819. Server string `json:"server,omitempty" db:"server"`
  820. MonitorServer string `json:"monitorServer,omitempty" db:"monitor_server"`
  821. Username string `json:"username,omitempty" db:"username"`
  822. Password string `json:"password,omitempty" db:"password"`
  823. Token string `json:"token,omitempty" db:"token"`
  824. Ak string `json:"ak,omitempty" db:"ak"`
  825. Sk string `json:"sk,omitempty" db:"sk"`
  826. Region string `json:"region,omitempty" db:"region"`
  827. ProjectId string `json:"projectId,omitempty" db:"project_id"`
  828. Version string `json:"version,omitempty" db:"version"`
  829. Label string `json:"label,omitempty" db:"label"`
  830. OwnerId string `json:"ownerId,omitempty" db:"owner_id"`
  831. AuthType string `json:"authType,omitempty" db:"auth_type"`
  832. ProducerDict string `json:"producerDict,omitempty" db:"producer_dict"`
  833. RegionDict string `json:"regionDict,omitempty" db:"region_dict"`
  834. Location string `json:"location,omitempty" db:"location"`
  835. CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  836. }
  837. )
  838. type ClusterDelReq {
  839. Id string `form:"id,optional"`
  840. }
  841. type ClusterResp {
  842. List ClusterInfo `json:"list,omitempty"`
  843. }
  844. type ClusterListResp {
  845. List []ClusterInfo `json:"list,omitempty"`
  846. }
  847. type clusterSumReq {
  848. }
  849. type clusterSumReqResp {
  850. PodSum int `json:"podSum,omitempty"`
  851. VmSum int `json:"vmSum,omitempty"`
  852. AdapterSum int `json:"AdapterSum,omitempty"`
  853. TaskSum int `json:"TaskSum,omitempty"`
  854. }
  855. type ClusterRelationInfo {
  856. Id string `json:"id,omitempty" db:"id"`
  857. Name string `json:"name,omitempty" db:"name"`
  858. Type string `json:"type,omitempty" db:"type"`
  859. Nickname string `json:"nickname,omitempty" db:"nickname"`
  860. Version string `json:"version,omitempty" db:"version"`
  861. Server string `json:"server,omitempty" db:"server"`
  862. CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"`
  863. CId string `json:"cId,omitempty" db:"id"`
  864. CAdapterId string `json:"cAdapterId,omitempty" db:"adapter_id"`
  865. CName string `json:"cName,omitempty" db:"name"`
  866. CNickname string `json:"cNickname,omitempty" db:"nickname"`
  867. CDescription string `json:"cDescription,omitempty" db:"description"`
  868. CServer string `json:"cServer,omitempty" db:"server"`
  869. CMonitorServer string `json:"cMonitorServer,omitempty" db:"monitor_server"`
  870. CUsername string `json:"cUsername,omitempty" db:"username"`
  871. CPassword string `json:"cPassword,omitempty" db:"password"`
  872. CToken string `json:"cToken,omitempty" db:"token"`
  873. CAk string `json:"cAk,omitempty" db:"ak"`
  874. CSk string `json:"cSk,omitempty" db:"sk"`
  875. CRegion string `json:"cRegion,omitempty" db:"region"`
  876. CProjectId string `json:"cProjectId,omitempty" db:"project_id"`
  877. CVersion string `json:"cVersion,omitempty" db:"version"`
  878. CLabel string `json:"cLabel,omitempty" db:"label"`
  879. COwnerId string `json:"cOwnerId,omitempty" db:"owner_id"`
  880. CAuthType string `json:"cAuthType,omitempty" db:"auth_type"`
  881. CRegionDict string `json:"cRegionDict,omitempty" db:"-"`
  882. CProducerDict string `json:"cProducerDict,omitempty" db:"-"`
  883. CCreateTime string `json:"cCreateTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  884. }
  885. type (
  886. DictInfo {
  887. Id string `json:"id,omitempty"`
  888. DictName string `json:"dictName,omitempty"`
  889. DictCode string `json:"dictCode,omitempty"`
  890. Description string `json:"description,omitempty"`
  891. Type string `json:"type,omitempty" db:"type"`
  892. Status string `json:"status,omitempty" db:"status"`
  893. CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  894. }
  895. DictReq {
  896. Id string `form:"id,optional"`
  897. DictName string `form:"dictName,optional"`
  898. DictCode string `form:"dictCode,optional"`
  899. Description string `form:"description,optional"`
  900. Type string `form:"type,optional"`
  901. Status string `form:"status,optional"`
  902. PageInfo
  903. }
  904. DictEditReq {
  905. Id string `json:"id,optional"`
  906. DictName string `json:"dictName,optional"`
  907. DictCode string `json:"dictCode,optional"`
  908. Description string `json:"description,optional"`
  909. Type string `json:"type,optional"`
  910. Status string `json:"status,optional"`
  911. }
  912. DictResp {
  913. Id string `json:"id,omitempty"`
  914. DictName string `json:"dictName,omitempty"`
  915. DictCode string `json:"dictCode,omitempty"`
  916. Description string `json:"description,omitempty"`
  917. Type string `json:"type,omitempty"`
  918. Status string `json:"status,omitempty"`
  919. CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  920. DictItemInfo []*DictItemInfo `json:"dictItemInfo,omitempty"`
  921. }
  922. Dicts {
  923. List []DictInfo `json:"list,omitempty"`
  924. }
  925. DictItemInfo {
  926. Id string `json:"id,omitempty"`
  927. DictId string `json:"dictId,omitempty"`
  928. ItemText string `json:"itemText,omitempty"`
  929. ItemValue string `json:"itemValue,omitempty"`
  930. Description string `json:"description,omitempty"`
  931. SortOrder string `json:"sortOrder,omitempty"`
  932. ParentId string `json:"parentId,omitempty"`
  933. Status string `json:"status,omitempty" db:"status"`
  934. CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  935. Children []DictItemInfo `json:"children,omitempty" gorm:"-"`
  936. }
  937. DictItemReq {
  938. Id string `form:"id,optional"`
  939. DictId string `form:"dictId,optional"`
  940. ItemText string `form:"itemText,optional"`
  941. ItemValue string `form:"itemValue,optional"`
  942. Description string `form:"description,optional"`
  943. SortOrder string `form:"sortOrder,optional"`
  944. Type string `form:"type,optional"`
  945. ParentId string `form:"parentId,optional"`
  946. Status string `form:"status,optional"`
  947. }
  948. DictItemEditReq {
  949. Id string `json:"id,optional"`
  950. DictId string `json:"dictId,optional"`
  951. ItemText string `json:"itemText,optional"`
  952. ItemValue string `json:"itemValue,optional"`
  953. Description string `json:"description,optional"`
  954. SortOrder string `json:"sortOrder,optional"`
  955. ParentId string `json:"parentId,optional"`
  956. Status string `json:"status,optional"`
  957. }
  958. DictItemResp {
  959. Id string `json:"id,omitempty"`
  960. DictId string `json:"dictId,omitempty"`
  961. ItemText string `json:"itemText,omitempty"`
  962. ItemValue string `json:"itemValue,omitempty"`
  963. Description string `json:"description,omitempty"`
  964. SortOrder string `json:"sortOrder,omitempty"`
  965. ParentId string `json:"parentId,omitempty"`
  966. Status string `json:"status,omitempty"`
  967. CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"`
  968. DictInfo *DictInfo `json:"dictInfo,omitempty"`
  969. }
  970. DictItems {
  971. List []DictItemInfo `json:"list,omitempty"`
  972. }
  973. DictCodeReq {
  974. DictCode string `path:"dictCode"`
  975. }
  976. )
  977. type (
  978. CId {
  979. Id string `path:"id":"id,omitempty" validate:"required"`
  980. }
  981. CIds {
  982. Ids []string `json:"ids,omitempty" validate:"required"`
  983. }
  984. FId {
  985. Id string `form:"id":"id,omitempty" validate:"required"`
  986. }
  987. )
  988. type (
  989. PageInfo {
  990. PageNum int `form:"pageNum"`
  991. PageSize int `form:"pageSize"`
  992. }
  993. PageResult {
  994. List interface{} `json:"list,omitempty"`
  995. Total int64 `json:"total,omitempty"`
  996. PageNum int `json:"pageNum,omitempty"`
  997. PageSize int `json:"pageSize,omitempty"`
  998. }
  999. ListResult{
  1000. List interface{} `json:"list,omitempty"`
  1001. }
  1002. )
  1003. type (
  1004. HpcInfo {
  1005. Id int64 `json:"id"` // id
  1006. TaskId int64 `json:"task_id"` // 任务id
  1007. JobId string `json:"job_id"` // 作业id(在第三方系统中的作业id)
  1008. AdapterId int64 `json:"adapter_id"` // 执行任务的适配器id
  1009. ClusterId int64 `json:"cluster_id"` // 执行任务的集群id
  1010. ClusterType string `json:"cluster_type"` // 执行任务的集群类型
  1011. Name string `json:"name"` // 名称
  1012. Status string `json:"status"` // 状态
  1013. CmdScript string `json:"cmd_script"`
  1014. StartTime string `json:"start_time"` // 开始时间
  1015. RunningTime int64 `json:"running_time"` // 运行时间
  1016. DerivedEs string `json:"derived_es"`
  1017. Cluster string `json:"cluster"`
  1018. BlockId int64 `json:"block_id"`
  1019. AllocNodes int64 `json:"alloc_nodes"`
  1020. AllocCpu int64 `json:"alloc_cpu"`
  1021. CardCount int64 `json:"card_count"` // 卡数
  1022. Version string `json:"version"`
  1023. Account string `json:"account"`
  1024. WorkDir string `json:"work_dir"` // 工作路径
  1025. AssocId int64 `json:"assoc_id"`
  1026. ExitCode int64 `json:"exit_code"`
  1027. WallTime string `json:"wall_time"` // 最大运行时间
  1028. Result string `json:"result"` // 运行结果
  1029. DeletedAt string `json:"deleted_at"` // 删除时间
  1030. YamlString string `json:"yaml_string"`
  1031. AppType string `json:"app_type"` // 应用类型
  1032. AppName string `json:"app_name"` // 应用名称
  1033. Queue string `json:"queue"` // 队列名称
  1034. SubmitType string `json:"submit_type"` // cmd(命令行模式)
  1035. NNode string `json:"n_node"` // 节点个数(当指定该参数时,GAP_NODE_STRING必须为"")
  1036. StdOutFile string `json:"std_out_file"` // 工作路径/std.err.%j
  1037. StdErrFile string `json:"std_err_file"` // 工作路径/std.err.%j
  1038. StdInput string `json:"std_input"`
  1039. Environment string `json:"environment"`
  1040. DeletedFlag int64 `json:"deleted_flag"` // 是否删除(0-否,1-是)
  1041. CreatedBy int64 `json:"created_by"` // 创建人
  1042. CreateTime string `json:"created_time"` // 创建时间
  1043. UpdatedBy int64 `json:"updated_by"` // 更新人
  1044. UpdateTime string `json:"updated_time"` // 更新时间
  1045. }
  1046. CloudInfo {
  1047. Participant int64 `json:"participant,omitempty"`
  1048. Id int64 `json:"id,omitempty"`
  1049. TaskId int64 `json:"taskId,omitempty"`
  1050. ApiVersion string `json:"apiVersion,omitempty"`
  1051. Kind string `json:"kind,omitempty"`
  1052. Namespace string `json:"namespace,omitempty"`
  1053. Name string `json:"name,omitempty"`
  1054. Status string `json:"status,omitempty"`
  1055. StartTime string `json:"startTime,omitempty"`
  1056. RunningTime int64 `json:"runningTime,omitempty"`
  1057. Result string `json:"result,omitempty"`
  1058. YamlString string `json:"yamlString,omitempty"`
  1059. }
  1060. AiInfo {
  1061. ParticipantId int64 `json:"participantId,omitempty"`
  1062. TaskId int64 `json:"taskId,omitempty"`
  1063. ProjectId string `json:"project_id,omitempty"`
  1064. Name string `json:"name,omitempty"`
  1065. Status string `json:"status,omitempty"`
  1066. StartTime string `json:"startTime,omitempty"`
  1067. RunningTime int64 `json:"runningTime,omitempty"`
  1068. Result string `json:"result,omitempty"`
  1069. JobId string `json:"jobId,omitempty"`
  1070. CreateTime string `json:"createTime,omitempty"`
  1071. ImageUrl string `json:"imageUrl,omitempty"`
  1072. Command string `json:"command,omitempty"`
  1073. FlavorId string `json:"flavorId,omitempty"`
  1074. SubscriptionId string `json:"subscriptionId,omitempty"`
  1075. ItemVersionId string `json:"itemVersionId,omitempty"`
  1076. }
  1077. VmInfo {
  1078. ParticipantId int64 `json:"participantId,omitempty"`
  1079. TaskId int64 `json:"taskId,omitempty"`
  1080. Name string `json:"name,omitempty"`
  1081. FlavorRef string `json:"flavor_ref,omitempty"`
  1082. ImageRef string `json:"image_ref,omitempty"`
  1083. NetworkUuid string `json:"network_uuid,omitempty"`
  1084. BlockUuid string `json:"block_uuid,omitempty"`
  1085. SourceType string `json:"source_type,omitempty"`
  1086. DeleteOnTermination bool `json:"delete_on_termination,omitempty"`
  1087. Status string `json:"status,omitempty"`
  1088. MinCount string `json:"min_count,omitempty"`
  1089. Platform string `json:"platform,omitempty"`
  1090. Uuid string `json:"uuid,omitempty"`
  1091. }
  1092. )
  1093. type (
  1094. PullTaskInfoReq {
  1095. AdapterId int64 `form:"adapterId"`
  1096. }
  1097. PullTaskInfoResp {
  1098. HpcInfoList []*HpcInfo `json:"HpcInfoList,omitempty"`
  1099. CloudInfoList []*CloudInfo `json:"CloudInfoList,omitempty"`
  1100. AiInfoList []*AiInfo `json:"AiInfoList,omitempty"`
  1101. VmInfoList []*VmInfo `json:"VmInfoList,omitempty"`
  1102. }
  1103. )
  1104. type (
  1105. PushTaskInfoReq {
  1106. AdapterId int64 `json:"adapterId"`
  1107. HpcInfoList []*HpcInfo `json:"hpcInfoList"`
  1108. CloudInfoList []*CloudInfo `json:"cloudInfoList"`
  1109. AiInfoList []*AiInfo `json:"aiInfoList"`
  1110. VmInfoList []*VmInfo `json:"vmInfoList"`
  1111. }
  1112. PushTaskInfoResp {
  1113. Code int64 `json:"code"`
  1114. Msg string `json:"msg"`
  1115. }
  1116. )
  1117. type (
  1118. PushResourceInfoReq {
  1119. AdapterId int64 `json:"adapterId"`
  1120. ResourceStats []ResourceStats `json:"resourceStats"`
  1121. }
  1122. PushResourceInfoResp {
  1123. Code int64 `json:"code"`
  1124. Msg string `json:"msg"`
  1125. }
  1126. )
  1127. type (
  1128. NoticeInfo {
  1129. AdapterId int64 `json:"adapterId"`
  1130. AdapterName string `json:"adapterName"`
  1131. ClusterId int64 `json:"clusterId"`
  1132. ClusterName string `json:"clusterName"`
  1133. NoticeType string `json:"noticeType"`
  1134. TaskName string `json:"taskName"`
  1135. Incident string `json:"incident"`
  1136. }
  1137. ListNoticeReq {}
  1138. ListNoticeResp {
  1139. Code int64 `json:"code"`
  1140. Msg string `json:"msg"`
  1141. Data []NoticeInfo `json:"data"`
  1142. }
  1143. PushNoticeReq {
  1144. NoticeInfo NoticeInfo `json:"noticeInfo"`
  1145. }
  1146. PushNoticeResp {
  1147. Code int64 `json:"code"`
  1148. Msg string `json:"msg"`
  1149. }
  1150. )
  1151. type ResourceStats {
  1152. ClusterId int64 `json:"clusterId"`
  1153. Name string `json:"name"`
  1154. CpuCoreAvail int64 `json:"cpuCoreAvail"`
  1155. CpuCoreTotal int64 `json:"cpuCoreTotal"`
  1156. MemAvail float64 `json:"memAvail"`
  1157. MemTotal float64 `json:"memTotal"`
  1158. DiskAvail float64 `json:"diskAvail"`
  1159. DiskTotal float64 `json:"diskTotal"`
  1160. GpuAvail int64 `json:"gpuAvail"`
  1161. CardsAvail []*Card `json:"cardsAvail"`
  1162. CpuCoreHours float64 `json:"cpuCoreHours"`
  1163. Balance float64 `json:"balance"`
  1164. }
  1165. type Card {
  1166. Platform string `json:"platform"`
  1167. Type string `json:"type"`
  1168. Name string `json:"name"`
  1169. TOpsAtFp16 float64 `json:"TOpsAtFp16"`
  1170. CardHours float64 `json:"cardHours"`
  1171. CardNum int32 `json:"cardNum"`
  1172. }
  1173. type TaskStatusResp {
  1174. Succeeded int `json:"Succeeded"`
  1175. Failed int `json:"Failed"`
  1176. Running int `json:"Running"`
  1177. Saved int `json:"Saved"`
  1178. }
  1179. type (
  1180. TaskDetailsResp {
  1181. Name string `json:"name"`
  1182. description string `json:"description"`
  1183. StartTime string `json:"startTime"`
  1184. EndTime string `json:"endTime"`
  1185. Strategy int64 `json:"strategy"`
  1186. SynergyStatus int64 `json:"synergyStatus"`
  1187. ClusterInfos []*ClusterInfo `json:"clusterInfos"`
  1188. SubTaskInfos []*SubTaskInfo `json:"subTaskInfos"`
  1189. TaskTypeDict string `json:"taskTypeDict"`
  1190. AdapterTypeDict string `json:"adapterTypeDict"`
  1191. }
  1192. SubTaskInfo{
  1193. Id string `json:"id" db:"id"`
  1194. Name string `json:"name" db:"name"`
  1195. ClusterId string `json:"clusterId" db:"cluster_id"`
  1196. ClusterName string `json:"clusterName" db:"cluster_name"`
  1197. Status string `json:"status" db:"status"`
  1198. Remark string `json:"remark" db:"remark"`
  1199. InferUrl string `json:"inferUrl"`
  1200. }
  1201. )
  1202. type (
  1203. CommonResp {
  1204. Code int `json:"code,omitempty"`
  1205. Msg string `json:"msg,omitempty"`
  1206. Data interface{} `json:"data,omitempty"`
  1207. }
  1208. )

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.