153 lines
5.2 KiB
Plaintext
153 lines
5.2 KiB
Plaintext
syntax = "v1"
|
|
|
|
info(
|
|
title: "type title here"
|
|
desc: "type desc here"
|
|
author: "type author here"
|
|
email: "type email here"
|
|
version: "type version here"
|
|
)
|
|
|
|
type (
|
|
commitHpcTaskReq {
|
|
ClusterId int64 `json:"clusterId,optional"`
|
|
Name string `json:"name"`
|
|
Account string `json:"account,optional"`
|
|
Description string `json:"description,optional"`
|
|
TenantId int64 `json:"tenantId,optional"`
|
|
TaskId int64 `json:"taskId,optional"`
|
|
AdapterIds []string `json:"adapterIds,optional"`
|
|
MatchLabels map[string]string `json:"matchLabels,optional"`
|
|
CardCount int64 `json:"cardCount,optional"`
|
|
WorkDir string `json:"workDir,optional"` //paratera:workingDir
|
|
WallTime string `json:"wallTime,optional"`
|
|
CmdScript string `json:"cmdScript,optional"` // paratera:bootScript
|
|
AppType string `json:"appType,optional"`
|
|
AppName string `json:"appName,optional"` // paratera:jobGroupName ac:appname
|
|
Queue string `json:"queue,optional"`
|
|
NNode string `json:"nNode,optional"`
|
|
SubmitType string `json:"submitType,optional"`
|
|
StdInput string `json:"stdInput,optional"`
|
|
ClusterType string `json:"clusterType,optional"`
|
|
Partition string `json:"partition"`
|
|
}
|
|
|
|
commitHpcTaskResp {
|
|
TaskId int64 `json:"taskId"`
|
|
Code int32 `json:"code"`
|
|
Msg string `json:"msg"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
hpcOverViewReq {
|
|
}
|
|
hpcOverViewResp {
|
|
Code int32 `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data HPCOverView `json:"data"`
|
|
}
|
|
HPCOverView {
|
|
AdapterCount int32 `json:"adapterCount"`
|
|
StackCount int32 `json:"stackCount"`
|
|
ClusterCount int32 `json:"clusterCount"`
|
|
TaskCount int32 `json:"taskCount"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
hpcAdapterSummaryReq {
|
|
}
|
|
hpcAdapterSummaryResp {
|
|
Code int32 `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data []HPCAdapterSummary `json:"data"`
|
|
}
|
|
HPCAdapterSummary {
|
|
AdapterName string `json:"adapterName"`
|
|
StackCount int32 `json:"stackCount"`
|
|
ClusterCount int32 `json:"clusterCount"`
|
|
TaskCount int32 `json:"taskCount"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
hpcJobReq {
|
|
}
|
|
hpcJobResp {
|
|
Code int32 `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data []Job `json:"data"`
|
|
}
|
|
Job {
|
|
JobName string `json:"jobName"`
|
|
JobDesc string `json:"jobDesc"`
|
|
SubmitTime string `json:"submitTime"`
|
|
JobStatus string `json:"jobStatus"`
|
|
AdapterName string `json:"adapterName"`
|
|
ClusterName string `json:"clusterName"`
|
|
ClusterType string `json:"clusterType"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
hpcResourceReq {
|
|
}
|
|
hpcResourceResp {
|
|
Code int32 `json:"code"`
|
|
Msg string `json:"msg"`
|
|
Data HPCResource `json:"data"`
|
|
}
|
|
HPCResource {
|
|
GPUCardsTotal float64 `json:"gpuCoresTotal"`
|
|
CPUCoresTotal float64 `json:"cpuCoresTotal"`
|
|
RAMTotal float64 `json:"ramTotal"`
|
|
GPUCardsUsed float64 `json:"gpuCoresUsed"`
|
|
CPUCoresUsed float64 `json:"cpuCoresUsed"`
|
|
RAMUsed float64 `json:"ramUsed"`
|
|
GPURate float64 `json:"gpuRate"`
|
|
CPURate float64 `json:"cpuRate"`
|
|
RAMRate float64 `json:"ramRate"`
|
|
}
|
|
)
|
|
|
|
type cancelJobReq {
|
|
ClusterId int64 `form:"clusterId"`
|
|
JobId string `form:"jobId"`
|
|
}
|
|
|
|
type jobInfoReq {
|
|
ClusterId int64 `form:"clusterId"`
|
|
JobId string `form:"jobId"`
|
|
}
|
|
|
|
type jobInfoResp {
|
|
JobId string `form:"jobId"`
|
|
JobState string `json:"jobState"`
|
|
CurrentWorkingDirectory string `json:"currentWorkingDirectory"`
|
|
}
|
|
|
|
type QueueAssetsResp {
|
|
QueueAssets []QueueAsset `json:"queueAsset"`
|
|
}
|
|
type QueueAsset {
|
|
TenantName string `json:"tenantName"` //租户名称
|
|
ParticipantId int64 `json:"participantId"`
|
|
AclHosts string `json:"aclHosts"` // 可用节点,多个节点用逗号隔开
|
|
QueNodes string `json:"queNodes"` //队列节点总数
|
|
QueMinNodect string `json:"queMinNodect,omitempty"` //队列最小节点数
|
|
QueMaxNgpus string `json:"queMaxNgpus,omitempty"` //队列最大GPU卡数
|
|
QueMaxPPN string `json:"queMaxPPN,omitempty"` //使用该队列作业最大CPU核心数
|
|
QueChargeRate string `json:"queChargeRate,omitempty"` //费率
|
|
QueMaxNcpus string `json:"queMaxNcpus,omitempty"` //用户最大可用核心数
|
|
QueMaxNdcus string `json:"queMaxNdcus,omitempty"` //队列总DCU卡数
|
|
QueueName string `json:"queueName,omitempty"` //队列名称
|
|
QueMinNcpus string `json:"queMinNcpus,omitempty"` //队列最小CPU核数
|
|
QueFreeNodes string `json:"queFreeNodes,omitempty"` //队列空闲节点数
|
|
QueMaxNodect string `json:"queMaxNodect,omitempty"` //队列作业最大节点数
|
|
QueMaxGpuPN string `json:"queMaxGpuPN,omitempty"` //队列单作业最大GPU卡数
|
|
QueMaxWalltime string `json:"queMaxWalltime,omitempty"` //队列最大运行时间
|
|
QueMaxDcuPN string `json:"queMaxDcuPN,omitempty"` //队列单作业最大DCU卡数
|
|
QueFreeNcpus string `json:"queFreeNcpus"` //队列空闲cpu数
|
|
QueNcpus string `json:"queNcpus"` //队列cpu数
|
|
} |