forked from JointCloud/pcm-ac
getInstanceList&&submitImageInferTask
This commit is contained in:
parent
6491aaef93
commit
8518eb54ff
|
@ -46,6 +46,7 @@ ParastorQuotaUrl : "/hpc/openapi/v2/parastor/quota/usernames/{username}" #查询
|
|||
# 曙光Ai 相关配置
|
||||
BaseUrlAi : "https://ac.sugon.com"
|
||||
GetImageListAi : "/sothisai/api/tasks/training/images"
|
||||
GetInstanceAi : "/sothisai/api/instance-service"
|
||||
GetTaskAi : "/sothisai/api/{taskGroup}/training/tasks/{taskId}"
|
||||
SubmitTaskAi : "/sothisai/api/{taskGroup}/training/tasks"
|
||||
DeleteTaskAi : "/sothisai/api/tasks"
|
||||
|
|
3218
hpcAC/hpcAC.pb.go
3218
hpcAC/hpcAC.pb.go
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc-gen-go-grpc v1.2.0
|
||||
// - protoc v3.19.4
|
||||
// source: hpcAC.proto
|
||||
|
||||
|
@ -18,44 +18,6 @@ import (
|
|||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
HpcAC_ListJob_FullMethodName = "/hpcAC.hpcAC/ListJob"
|
||||
HpcAC_ListHistoryJob_FullMethodName = "/hpcAC.hpcAC/ListHistoryJob"
|
||||
HpcAC_SubmitJob_FullMethodName = "/hpcAC.hpcAC/SubmitJob"
|
||||
HpcAC_ListJobManager_FullMethodName = "/hpcAC.hpcAC/ListJobManager"
|
||||
HpcAC_GetJobDetail_FullMethodName = "/hpcAC.hpcAC/GetJobDetail"
|
||||
HpcAC_DeleteJob_FullMethodName = "/hpcAC.hpcAC/DeleteJob"
|
||||
HpcAC_FileContent_FullMethodName = "/hpcAC.hpcAC/FileContent"
|
||||
HpcAC_SelectQueueByUser_FullMethodName = "/hpcAC.hpcAC/SelectQueueByUser"
|
||||
HpcAC_QueryQueueDetails_FullMethodName = "/hpcAC.hpcAC/QueryQueueDetails"
|
||||
HpcAC_QueryUserQuotasLimit_FullMethodName = "/hpcAC.hpcAC/QueryUserQuotasLimit"
|
||||
HpcAC_ParaStorQuota_FullMethodName = "/hpcAC.hpcAC/ParaStorQuota"
|
||||
HpcAC_WallTime_FullMethodName = "/hpcAC.hpcAC/WallTime"
|
||||
HpcAC_QueueJobs_FullMethodName = "/hpcAC.hpcAC/QueueJobs"
|
||||
HpcAC_CpuCore_FullMethodName = "/hpcAC.hpcAC/CpuCore"
|
||||
HpcAC_Jobs_FullMethodName = "/hpcAC.hpcAC/jobs"
|
||||
HpcAC_HistoryJobDetail_FullMethodName = "/hpcAC.hpcAC/HistoryJobDetail"
|
||||
HpcAC_GetACToken_FullMethodName = "/hpcAC.hpcAC/GetACToken"
|
||||
HpcAC_GetACClusterId_FullMethodName = "/hpcAC.hpcAC/GetACClusterId"
|
||||
HpcAC_GetComputingPower_FullMethodName = "/hpcAC.hpcAC/GetComputingPower"
|
||||
HpcAC_GetGeneralInfo_FullMethodName = "/hpcAC.hpcAC/GetGeneralInfo"
|
||||
HpcAC_SubmitPytorchTask_FullMethodName = "/hpcAC.hpcAC/SubmitPytorchTask"
|
||||
HpcAC_SubmitTensorflowTask_FullMethodName = "/hpcAC.hpcAC/SubmitTensorflowTask"
|
||||
HpcAC_GetImageListAi_FullMethodName = "/hpcAC.hpcAC/GetImageListAi"
|
||||
HpcAC_GetImageAiById_FullMethodName = "/hpcAC.hpcAC/GetImageAiById"
|
||||
HpcAC_GetPytorchTask_FullMethodName = "/hpcAC.hpcAC/GetPytorchTask"
|
||||
HpcAC_GetTensorflowTask_FullMethodName = "/hpcAC.hpcAC/GetTensorflowTask"
|
||||
HpcAC_DeleteTaskAi_FullMethodName = "/hpcAC.hpcAC/DeleteTaskAi"
|
||||
HpcAC_GetResourceSpec_FullMethodName = "/hpcAC.hpcAC/GetResourceSpec"
|
||||
HpcAC_GetInstanceLog_FullMethodName = "/hpcAC.hpcAC/GetInstanceLog"
|
||||
HpcAC_GetFileList_FullMethodName = "/hpcAC.hpcAC/GetFileList"
|
||||
HpcAC_GetFile_FullMethodName = "/hpcAC.hpcAC/GetFile"
|
||||
HpcAC_UploadFile_FullMethodName = "/hpcAC.hpcAC/UploadFile"
|
||||
HpcAC_GetUserInfo_FullMethodName = "/hpcAC.hpcAC/GetUserInfo"
|
||||
HpcAC_GetMemberJobs_FullMethodName = "/hpcAC.hpcAC/GetMemberJobs"
|
||||
HpcAC_GetNodeResources_FullMethodName = "/hpcAC.hpcAC/GetNodeResources"
|
||||
)
|
||||
|
||||
// HpcACClient is the client API for HpcAC service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
|
@ -107,6 +69,8 @@ type HpcACClient interface {
|
|||
DeleteTaskAi(ctx context.Context, in *DeleteTaskAiReq, opts ...grpc.CallOption) (*DeleteTaskAiResp, error)
|
||||
GetResourceSpec(ctx context.Context, in *GetResourceSpecReq, opts ...grpc.CallOption) (*GetResourceSpecResp, error)
|
||||
GetInstanceLog(ctx context.Context, in *GetInstanceLogReq, opts ...grpc.CallOption) (*GetInstanceLogResp, error)
|
||||
GetInstanceListAi(ctx context.Context, in *GetInstanceListReq, opts ...grpc.CallOption) (*GetInstanceListResp, error)
|
||||
SubmitImageInferTask(ctx context.Context, in *SubmitImageInferTaskReq, opts ...grpc.CallOption) (*SubmitImageInferTaskResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error)
|
||||
GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error)
|
||||
|
@ -128,7 +92,7 @@ func NewHpcACClient(cc grpc.ClientConnInterface) HpcACClient {
|
|||
|
||||
func (c *hpcACClient) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.CallOption) (*ListJobResp, error) {
|
||||
out := new(ListJobResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_ListJob_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/ListJob", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -137,7 +101,7 @@ func (c *hpcACClient) ListJob(ctx context.Context, in *ListJobReq, opts ...grpc.
|
|||
|
||||
func (c *hpcACClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq, opts ...grpc.CallOption) (*ListHistoryJobResp, error) {
|
||||
out := new(ListHistoryJobResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_ListHistoryJob_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/ListHistoryJob", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -146,7 +110,7 @@ func (c *hpcACClient) ListHistoryJob(ctx context.Context, in *ListHistoryJobReq,
|
|||
|
||||
func (c *hpcACClient) SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...grpc.CallOption) (*SubmitJobResp, error) {
|
||||
out := new(SubmitJobResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_SubmitJob_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SubmitJob", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -155,7 +119,7 @@ func (c *hpcACClient) SubmitJob(ctx context.Context, in *SubmitJobReq, opts ...g
|
|||
|
||||
func (c *hpcACClient) ListJobManager(ctx context.Context, in *JobManagerReq, opts ...grpc.CallOption) (*ListJobManagerResp, error) {
|
||||
out := new(ListJobManagerResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_ListJobManager_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/ListJobManager", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -164,7 +128,7 @@ func (c *hpcACClient) ListJobManager(ctx context.Context, in *JobManagerReq, opt
|
|||
|
||||
func (c *hpcACClient) GetJobDetail(ctx context.Context, in *JobDetailReq, opts ...grpc.CallOption) (*GetJobDetailResp, error) {
|
||||
out := new(GetJobDetailResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetJobDetail_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetJobDetail", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -173,7 +137,7 @@ func (c *hpcACClient) GetJobDetail(ctx context.Context, in *JobDetailReq, opts .
|
|||
|
||||
func (c *hpcACClient) DeleteJob(ctx context.Context, in *DeleteJobReq, opts ...grpc.CallOption) (*DeleteJobResp, error) {
|
||||
out := new(DeleteJobResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_DeleteJob_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/DeleteJob", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -182,7 +146,7 @@ func (c *hpcACClient) DeleteJob(ctx context.Context, in *DeleteJobReq, opts ...g
|
|||
|
||||
func (c *hpcACClient) FileContent(ctx context.Context, in *FileDataReq, opts ...grpc.CallOption) (*FileContentResp, error) {
|
||||
out := new(FileContentResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_FileContent_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/FileContent", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -191,7 +155,7 @@ func (c *hpcACClient) FileContent(ctx context.Context, in *FileDataReq, opts ...
|
|||
|
||||
func (c *hpcACClient) SelectQueueByUser(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueResp, error) {
|
||||
out := new(QueueResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_SelectQueueByUser_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SelectQueueByUser", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -200,7 +164,7 @@ func (c *hpcACClient) SelectQueueByUser(ctx context.Context, in *QueueReq, opts
|
|||
|
||||
func (c *hpcACClient) QueryQueueDetails(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*QueueDetailsResp, error) {
|
||||
out := new(QueueDetailsResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_QueryQueueDetails_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/QueryQueueDetails", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -209,7 +173,7 @@ func (c *hpcACClient) QueryQueueDetails(ctx context.Context, in *QueueReq, opts
|
|||
|
||||
func (c *hpcACClient) QueryUserQuotasLimit(ctx context.Context, in *QueueReq, opts ...grpc.CallOption) (*UserQuotasLimitResp, error) {
|
||||
out := new(UserQuotasLimitResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_QueryUserQuotasLimit_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/QueryUserQuotasLimit", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -218,7 +182,7 @@ func (c *hpcACClient) QueryUserQuotasLimit(ctx context.Context, in *QueueReq, op
|
|||
|
||||
func (c *hpcACClient) ParaStorQuota(ctx context.Context, in *ParaStorQuotaReq, opts ...grpc.CallOption) (*ParaStorQuotaResp, error) {
|
||||
out := new(ParaStorQuotaResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_ParaStorQuota_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/ParaStorQuota", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -227,7 +191,7 @@ func (c *hpcACClient) ParaStorQuota(ctx context.Context, in *ParaStorQuotaReq, o
|
|||
|
||||
func (c *hpcACClient) WallTime(ctx context.Context, in *WallTimeReq, opts ...grpc.CallOption) (*WallTimeResp, error) {
|
||||
out := new(WallTimeResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_WallTime_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/WallTime", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -236,7 +200,7 @@ func (c *hpcACClient) WallTime(ctx context.Context, in *WallTimeReq, opts ...grp
|
|||
|
||||
func (c *hpcACClient) QueueJobs(ctx context.Context, in *QueueJobsReq, opts ...grpc.CallOption) (*QueueJobsResp, error) {
|
||||
out := new(QueueJobsResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_QueueJobs_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/QueueJobs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -245,7 +209,7 @@ func (c *hpcACClient) QueueJobs(ctx context.Context, in *QueueJobsReq, opts ...g
|
|||
|
||||
func (c *hpcACClient) CpuCore(ctx context.Context, in *CpuCoreReq, opts ...grpc.CallOption) (*CpuCoreResp, error) {
|
||||
out := new(CpuCoreResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_CpuCore_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/CpuCore", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -254,7 +218,7 @@ func (c *hpcACClient) CpuCore(ctx context.Context, in *CpuCoreReq, opts ...grpc.
|
|||
|
||||
func (c *hpcACClient) Jobs(ctx context.Context, in *JobsReq, opts ...grpc.CallOption) (*JobsResp, error) {
|
||||
out := new(JobsResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_Jobs_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/jobs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -263,7 +227,7 @@ func (c *hpcACClient) Jobs(ctx context.Context, in *JobsReq, opts ...grpc.CallOp
|
|||
|
||||
func (c *hpcACClient) HistoryJobDetail(ctx context.Context, in *HistoryJobDetailReq, opts ...grpc.CallOption) (*HistoryJobDetailResp, error) {
|
||||
out := new(HistoryJobDetailResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_HistoryJobDetail_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/HistoryJobDetail", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -272,7 +236,7 @@ func (c *hpcACClient) HistoryJobDetail(ctx context.Context, in *HistoryJobDetail
|
|||
|
||||
func (c *hpcACClient) GetACToken(ctx context.Context, in *ACTokenReq, opts ...grpc.CallOption) (*TokenResp, error) {
|
||||
out := new(TokenResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetACToken_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetACToken", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -281,7 +245,7 @@ func (c *hpcACClient) GetACToken(ctx context.Context, in *ACTokenReq, opts ...gr
|
|||
|
||||
func (c *hpcACClient) GetACClusterId(ctx context.Context, in *ACClusterReq, opts ...grpc.CallOption) (*ClusterResp, error) {
|
||||
out := new(ClusterResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetACClusterId_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetACClusterId", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -290,7 +254,7 @@ func (c *hpcACClient) GetACClusterId(ctx context.Context, in *ACClusterReq, opts
|
|||
|
||||
func (c *hpcACClient) GetComputingPower(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*CpResp, error) {
|
||||
out := new(CpResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetComputingPower_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetComputingPower", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -299,7 +263,7 @@ func (c *hpcACClient) GetComputingPower(ctx context.Context, in *ResourceReq, op
|
|||
|
||||
func (c *hpcACClient) GetGeneralInfo(ctx context.Context, in *ResourceReq, opts ...grpc.CallOption) (*GiResp, error) {
|
||||
out := new(GiResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetGeneralInfo_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetGeneralInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -308,7 +272,7 @@ func (c *hpcACClient) GetGeneralInfo(ctx context.Context, in *ResourceReq, opts
|
|||
|
||||
func (c *hpcACClient) SubmitPytorchTask(ctx context.Context, in *SubmitPytorchTaskReq, opts ...grpc.CallOption) (*SubmitTaskAiResp, error) {
|
||||
out := new(SubmitTaskAiResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_SubmitPytorchTask_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SubmitPytorchTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -317,7 +281,7 @@ func (c *hpcACClient) SubmitPytorchTask(ctx context.Context, in *SubmitPytorchTa
|
|||
|
||||
func (c *hpcACClient) SubmitTensorflowTask(ctx context.Context, in *SubmitTensorflowTaskReq, opts ...grpc.CallOption) (*SubmitTaskAiResp, error) {
|
||||
out := new(SubmitTaskAiResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_SubmitTensorflowTask_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SubmitTensorflowTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -326,7 +290,7 @@ func (c *hpcACClient) SubmitTensorflowTask(ctx context.Context, in *SubmitTensor
|
|||
|
||||
func (c *hpcACClient) GetImageListAi(ctx context.Context, in *GetImageListAiReq, opts ...grpc.CallOption) (*GetImageListAiResp, error) {
|
||||
out := new(GetImageListAiResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetImageListAi_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetImageListAi", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -335,7 +299,7 @@ func (c *hpcACClient) GetImageListAi(ctx context.Context, in *GetImageListAiReq,
|
|||
|
||||
func (c *hpcACClient) GetImageAiById(ctx context.Context, in *GetImageAiByIdReq, opts ...grpc.CallOption) (*GetImageAiByIdResp, error) {
|
||||
out := new(GetImageAiByIdResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetImageAiById_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetImageAiById", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -344,7 +308,7 @@ func (c *hpcACClient) GetImageAiById(ctx context.Context, in *GetImageAiByIdReq,
|
|||
|
||||
func (c *hpcACClient) GetPytorchTask(ctx context.Context, in *GetPytorchTaskReq, opts ...grpc.CallOption) (*GetPytorchTaskResp, error) {
|
||||
out := new(GetPytorchTaskResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetPytorchTask_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetPytorchTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -353,7 +317,7 @@ func (c *hpcACClient) GetPytorchTask(ctx context.Context, in *GetPytorchTaskReq,
|
|||
|
||||
func (c *hpcACClient) GetTensorflowTask(ctx context.Context, in *GetTensorflowTaskReq, opts ...grpc.CallOption) (*GetTensorflowTaskResp, error) {
|
||||
out := new(GetTensorflowTaskResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetTensorflowTask_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetTensorflowTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -362,7 +326,7 @@ func (c *hpcACClient) GetTensorflowTask(ctx context.Context, in *GetTensorflowTa
|
|||
|
||||
func (c *hpcACClient) DeleteTaskAi(ctx context.Context, in *DeleteTaskAiReq, opts ...grpc.CallOption) (*DeleteTaskAiResp, error) {
|
||||
out := new(DeleteTaskAiResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_DeleteTaskAi_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/DeleteTaskAi", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -371,7 +335,7 @@ func (c *hpcACClient) DeleteTaskAi(ctx context.Context, in *DeleteTaskAiReq, opt
|
|||
|
||||
func (c *hpcACClient) GetResourceSpec(ctx context.Context, in *GetResourceSpecReq, opts ...grpc.CallOption) (*GetResourceSpecResp, error) {
|
||||
out := new(GetResourceSpecResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetResourceSpec_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetResourceSpec", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -380,7 +344,25 @@ func (c *hpcACClient) GetResourceSpec(ctx context.Context, in *GetResourceSpecRe
|
|||
|
||||
func (c *hpcACClient) GetInstanceLog(ctx context.Context, in *GetInstanceLogReq, opts ...grpc.CallOption) (*GetInstanceLogResp, error) {
|
||||
out := new(GetInstanceLogResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetInstanceLog_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetInstanceLog", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hpcACClient) GetInstanceListAi(ctx context.Context, in *GetInstanceListReq, opts ...grpc.CallOption) (*GetInstanceListResp, error) {
|
||||
out := new(GetInstanceListResp)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetInstanceListAi", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *hpcACClient) SubmitImageInferTask(ctx context.Context, in *SubmitImageInferTaskReq, opts ...grpc.CallOption) (*SubmitImageInferTaskResp, error) {
|
||||
out := new(SubmitImageInferTaskResp)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/SubmitImageInferTask", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -389,7 +371,7 @@ func (c *hpcACClient) GetInstanceLog(ctx context.Context, in *GetInstanceLogReq,
|
|||
|
||||
func (c *hpcACClient) GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error) {
|
||||
out := new(GetFileListResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetFileList_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetFileList", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -398,7 +380,7 @@ func (c *hpcACClient) GetFileList(ctx context.Context, in *GetFileListReq, opts
|
|||
|
||||
func (c *hpcACClient) GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error) {
|
||||
out := new(GetFileResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetFile_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetFile", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -407,7 +389,7 @@ func (c *hpcACClient) GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.
|
|||
|
||||
func (c *hpcACClient) UploadFile(ctx context.Context, in *UploadFileReq, opts ...grpc.CallOption) (*UploadFileResp, error) {
|
||||
out := new(UploadFileResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_UploadFile_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/UploadFile", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -416,7 +398,7 @@ func (c *hpcACClient) UploadFile(ctx context.Context, in *UploadFileReq, opts ..
|
|||
|
||||
func (c *hpcACClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts ...grpc.CallOption) (*GetUserInfoResp, error) {
|
||||
out := new(GetUserInfoResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetUserInfo_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetUserInfo", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -425,7 +407,7 @@ func (c *hpcACClient) GetUserInfo(ctx context.Context, in *GetUserInfoReq, opts
|
|||
|
||||
func (c *hpcACClient) GetMemberJobs(ctx context.Context, in *GetMemberJobsReq, opts ...grpc.CallOption) (*GetMemberJobsResp, error) {
|
||||
out := new(GetMemberJobsResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetMemberJobs_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetMemberJobs", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -434,7 +416,7 @@ func (c *hpcACClient) GetMemberJobs(ctx context.Context, in *GetMemberJobsReq, o
|
|||
|
||||
func (c *hpcACClient) GetNodeResources(ctx context.Context, in *GetNodeResourcesReq, opts ...grpc.CallOption) (*GetNodeResourcesResp, error) {
|
||||
out := new(GetNodeResourcesResp)
|
||||
err := c.cc.Invoke(ctx, HpcAC_GetNodeResources_FullMethodName, in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/hpcAC.hpcAC/GetNodeResources", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -492,6 +474,8 @@ type HpcACServer interface {
|
|||
DeleteTaskAi(context.Context, *DeleteTaskAiReq) (*DeleteTaskAiResp, error)
|
||||
GetResourceSpec(context.Context, *GetResourceSpecReq) (*GetResourceSpecResp, error)
|
||||
GetInstanceLog(context.Context, *GetInstanceLogReq) (*GetInstanceLogResp, error)
|
||||
GetInstanceListAi(context.Context, *GetInstanceListReq) (*GetInstanceListResp, error)
|
||||
SubmitImageInferTask(context.Context, *SubmitImageInferTaskReq) (*SubmitImageInferTaskResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(context.Context, *GetFileListReq) (*GetFileListResp, error)
|
||||
GetFile(context.Context, *GetFileReq) (*GetFileResp, error)
|
||||
|
@ -595,6 +579,12 @@ func (UnimplementedHpcACServer) GetResourceSpec(context.Context, *GetResourceSpe
|
|||
func (UnimplementedHpcACServer) GetInstanceLog(context.Context, *GetInstanceLogReq) (*GetInstanceLogResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInstanceLog not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) GetInstanceListAi(context.Context, *GetInstanceListReq) (*GetInstanceListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetInstanceListAi not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) SubmitImageInferTask(context.Context, *SubmitImageInferTaskReq) (*SubmitImageInferTaskResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method SubmitImageInferTask not implemented")
|
||||
}
|
||||
func (UnimplementedHpcACServer) GetFileList(context.Context, *GetFileListReq) (*GetFileListResp, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetFileList not implemented")
|
||||
}
|
||||
|
@ -636,7 +626,7 @@ func _HpcAC_ListJob_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_ListJob_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/ListJob",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).ListJob(ctx, req.(*ListJobReq))
|
||||
|
@ -654,7 +644,7 @@ func _HpcAC_ListHistoryJob_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_ListHistoryJob_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/ListHistoryJob",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).ListHistoryJob(ctx, req.(*ListHistoryJobReq))
|
||||
|
@ -672,7 +662,7 @@ func _HpcAC_SubmitJob_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_SubmitJob_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/SubmitJob",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).SubmitJob(ctx, req.(*SubmitJobReq))
|
||||
|
@ -690,7 +680,7 @@ func _HpcAC_ListJobManager_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_ListJobManager_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/ListJobManager",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).ListJobManager(ctx, req.(*JobManagerReq))
|
||||
|
@ -708,7 +698,7 @@ func _HpcAC_GetJobDetail_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetJobDetail_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetJobDetail",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetJobDetail(ctx, req.(*JobDetailReq))
|
||||
|
@ -726,7 +716,7 @@ func _HpcAC_DeleteJob_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_DeleteJob_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/DeleteJob",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).DeleteJob(ctx, req.(*DeleteJobReq))
|
||||
|
@ -744,7 +734,7 @@ func _HpcAC_FileContent_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_FileContent_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/FileContent",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).FileContent(ctx, req.(*FileDataReq))
|
||||
|
@ -762,7 +752,7 @@ func _HpcAC_SelectQueueByUser_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_SelectQueueByUser_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/SelectQueueByUser",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).SelectQueueByUser(ctx, req.(*QueueReq))
|
||||
|
@ -780,7 +770,7 @@ func _HpcAC_QueryQueueDetails_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_QueryQueueDetails_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/QueryQueueDetails",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).QueryQueueDetails(ctx, req.(*QueueReq))
|
||||
|
@ -798,7 +788,7 @@ func _HpcAC_QueryUserQuotasLimit_Handler(srv interface{}, ctx context.Context, d
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_QueryUserQuotasLimit_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/QueryUserQuotasLimit",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).QueryUserQuotasLimit(ctx, req.(*QueueReq))
|
||||
|
@ -816,7 +806,7 @@ func _HpcAC_ParaStorQuota_Handler(srv interface{}, ctx context.Context, dec func
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_ParaStorQuota_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/ParaStorQuota",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).ParaStorQuota(ctx, req.(*ParaStorQuotaReq))
|
||||
|
@ -834,7 +824,7 @@ func _HpcAC_WallTime_Handler(srv interface{}, ctx context.Context, dec func(inte
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_WallTime_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/WallTime",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).WallTime(ctx, req.(*WallTimeReq))
|
||||
|
@ -852,7 +842,7 @@ func _HpcAC_QueueJobs_Handler(srv interface{}, ctx context.Context, dec func(int
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_QueueJobs_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/QueueJobs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).QueueJobs(ctx, req.(*QueueJobsReq))
|
||||
|
@ -870,7 +860,7 @@ func _HpcAC_CpuCore_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_CpuCore_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/CpuCore",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).CpuCore(ctx, req.(*CpuCoreReq))
|
||||
|
@ -888,7 +878,7 @@ func _HpcAC_Jobs_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_Jobs_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/jobs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).Jobs(ctx, req.(*JobsReq))
|
||||
|
@ -906,7 +896,7 @@ func _HpcAC_HistoryJobDetail_Handler(srv interface{}, ctx context.Context, dec f
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_HistoryJobDetail_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/HistoryJobDetail",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).HistoryJobDetail(ctx, req.(*HistoryJobDetailReq))
|
||||
|
@ -924,7 +914,7 @@ func _HpcAC_GetACToken_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetACToken_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetACToken",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetACToken(ctx, req.(*ACTokenReq))
|
||||
|
@ -942,7 +932,7 @@ func _HpcAC_GetACClusterId_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetACClusterId_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetACClusterId",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetACClusterId(ctx, req.(*ACClusterReq))
|
||||
|
@ -960,7 +950,7 @@ func _HpcAC_GetComputingPower_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetComputingPower_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetComputingPower",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetComputingPower(ctx, req.(*ResourceReq))
|
||||
|
@ -978,7 +968,7 @@ func _HpcAC_GetGeneralInfo_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetGeneralInfo_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetGeneralInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetGeneralInfo(ctx, req.(*ResourceReq))
|
||||
|
@ -996,7 +986,7 @@ func _HpcAC_SubmitPytorchTask_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_SubmitPytorchTask_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/SubmitPytorchTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).SubmitPytorchTask(ctx, req.(*SubmitPytorchTaskReq))
|
||||
|
@ -1014,7 +1004,7 @@ func _HpcAC_SubmitTensorflowTask_Handler(srv interface{}, ctx context.Context, d
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_SubmitTensorflowTask_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/SubmitTensorflowTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).SubmitTensorflowTask(ctx, req.(*SubmitTensorflowTaskReq))
|
||||
|
@ -1032,7 +1022,7 @@ func _HpcAC_GetImageListAi_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetImageListAi_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetImageListAi",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetImageListAi(ctx, req.(*GetImageListAiReq))
|
||||
|
@ -1050,7 +1040,7 @@ func _HpcAC_GetImageAiById_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetImageAiById_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetImageAiById",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetImageAiById(ctx, req.(*GetImageAiByIdReq))
|
||||
|
@ -1068,7 +1058,7 @@ func _HpcAC_GetPytorchTask_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetPytorchTask_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetPytorchTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetPytorchTask(ctx, req.(*GetPytorchTaskReq))
|
||||
|
@ -1086,7 +1076,7 @@ func _HpcAC_GetTensorflowTask_Handler(srv interface{}, ctx context.Context, dec
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetTensorflowTask_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetTensorflowTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetTensorflowTask(ctx, req.(*GetTensorflowTaskReq))
|
||||
|
@ -1104,7 +1094,7 @@ func _HpcAC_DeleteTaskAi_Handler(srv interface{}, ctx context.Context, dec func(
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_DeleteTaskAi_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/DeleteTaskAi",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).DeleteTaskAi(ctx, req.(*DeleteTaskAiReq))
|
||||
|
@ -1122,7 +1112,7 @@ func _HpcAC_GetResourceSpec_Handler(srv interface{}, ctx context.Context, dec fu
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetResourceSpec_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetResourceSpec",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetResourceSpec(ctx, req.(*GetResourceSpecReq))
|
||||
|
@ -1140,7 +1130,7 @@ func _HpcAC_GetInstanceLog_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetInstanceLog_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetInstanceLog",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetInstanceLog(ctx, req.(*GetInstanceLogReq))
|
||||
|
@ -1148,6 +1138,42 @@ func _HpcAC_GetInstanceLog_Handler(srv interface{}, ctx context.Context, dec fun
|
|||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_GetInstanceListAi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetInstanceListReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HpcACServer).GetInstanceListAi(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/hpcAC.hpcAC/GetInstanceListAi",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetInstanceListAi(ctx, req.(*GetInstanceListReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_SubmitImageInferTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(SubmitImageInferTaskReq)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(HpcACServer).SubmitImageInferTask(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/hpcAC.hpcAC/SubmitImageInferTask",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).SubmitImageInferTask(ctx, req.(*SubmitImageInferTaskReq))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _HpcAC_GetFileList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetFileListReq)
|
||||
if err := dec(in); err != nil {
|
||||
|
@ -1158,7 +1184,7 @@ func _HpcAC_GetFileList_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetFileList_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetFileList",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetFileList(ctx, req.(*GetFileListReq))
|
||||
|
@ -1176,7 +1202,7 @@ func _HpcAC_GetFile_Handler(srv interface{}, ctx context.Context, dec func(inter
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetFile_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetFile",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetFile(ctx, req.(*GetFileReq))
|
||||
|
@ -1194,7 +1220,7 @@ func _HpcAC_UploadFile_Handler(srv interface{}, ctx context.Context, dec func(in
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_UploadFile_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/UploadFile",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).UploadFile(ctx, req.(*UploadFileReq))
|
||||
|
@ -1212,7 +1238,7 @@ func _HpcAC_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetUserInfo_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetUserInfo",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetUserInfo(ctx, req.(*GetUserInfoReq))
|
||||
|
@ -1230,7 +1256,7 @@ func _HpcAC_GetMemberJobs_Handler(srv interface{}, ctx context.Context, dec func
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetMemberJobs_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetMemberJobs",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetMemberJobs(ctx, req.(*GetMemberJobsReq))
|
||||
|
@ -1248,7 +1274,7 @@ func _HpcAC_GetNodeResources_Handler(srv interface{}, ctx context.Context, dec f
|
|||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: HpcAC_GetNodeResources_FullMethodName,
|
||||
FullMethod: "/hpcAC.hpcAC/GetNodeResources",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(HpcACServer).GetNodeResources(ctx, req.(*GetNodeResourcesReq))
|
||||
|
@ -1379,6 +1405,14 @@ var HpcAC_ServiceDesc = grpc.ServiceDesc{
|
|||
MethodName: "GetInstanceLog",
|
||||
Handler: _HpcAC_GetInstanceLog_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetInstanceListAi",
|
||||
Handler: _HpcAC_GetInstanceListAi_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "SubmitImageInferTask",
|
||||
Handler: _HpcAC_SubmitImageInferTask_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetFileList",
|
||||
Handler: _HpcAC_GetFileList_Handler,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Code generated by goctl. DO NOT EDIT.
|
||||
// Source: hpcAC.proto
|
||||
|
||||
package hpcacclient
|
||||
package hpcACClient
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
@ -22,6 +22,7 @@ type (
|
|||
ACTokenState = hpcAC.ACTokenState
|
||||
Children = hpcAC.Children
|
||||
ClusterResp = hpcAC.ClusterResp
|
||||
ContainerPortInfo = hpcAC.ContainerPortInfo
|
||||
CpResp = hpcAC.CpResp
|
||||
CpuCore = hpcAC.CpuCore
|
||||
CpuCoreReq = hpcAC.CpuCoreReq
|
||||
|
@ -43,6 +44,11 @@ type (
|
|||
GetImageAiByIdResp = hpcAC.GetImageAiByIdResp
|
||||
GetImageListAiReq = hpcAC.GetImageListAiReq
|
||||
GetImageListAiResp = hpcAC.GetImageListAiResp
|
||||
GetInstanceDetailParams = hpcAC.GetInstanceDetailParams
|
||||
GetInstanceDetailResp = hpcAC.GetInstanceDetailResp
|
||||
GetInstanceListParams = hpcAC.GetInstanceListParams
|
||||
GetInstanceListReq = hpcAC.GetInstanceListReq
|
||||
GetInstanceListResp = hpcAC.GetInstanceListResp
|
||||
GetInstanceLogReq = hpcAC.GetInstanceLogReq
|
||||
GetInstanceLogResp = hpcAC.GetInstanceLogResp
|
||||
GetJobDetailResp = hpcAC.GetJobDetailResp
|
||||
|
@ -102,6 +108,8 @@ type (
|
|||
QuotaData = hpcAC.QuotaData
|
||||
ResourceReq = hpcAC.ResourceReq
|
||||
ResourceSpec = hpcAC.ResourceSpec
|
||||
SubmitImageInferTaskReq = hpcAC.SubmitImageInferTaskReq
|
||||
SubmitImageInferTaskResp = hpcAC.SubmitImageInferTaskResp
|
||||
SubmitJobReq = hpcAC.SubmitJobReq
|
||||
SubmitJobResp = hpcAC.SubmitJobResp
|
||||
SubmitPytorchTaskParams = hpcAC.SubmitPytorchTaskParams
|
||||
|
@ -166,6 +174,8 @@ type (
|
|||
DeleteTaskAi(ctx context.Context, in *DeleteTaskAiReq, opts ...grpc.CallOption) (*DeleteTaskAiResp, error)
|
||||
GetResourceSpec(ctx context.Context, in *GetResourceSpecReq, opts ...grpc.CallOption) (*GetResourceSpecResp, error)
|
||||
GetInstanceLog(ctx context.Context, in *GetInstanceLogReq, opts ...grpc.CallOption) (*GetInstanceLogResp, error)
|
||||
GetInstanceListAi(ctx context.Context, in *GetInstanceListReq, opts ...grpc.CallOption) (*GetInstanceListResp, error)
|
||||
SubmitImageInferTask(ctx context.Context, in *SubmitImageInferTaskReq, opts ...grpc.CallOption) (*SubmitImageInferTaskResp, error)
|
||||
// 曙光文件接口
|
||||
GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error)
|
||||
GetFile(ctx context.Context, in *GetFileReq, opts ...grpc.CallOption) (*GetFileResp, error)
|
||||
|
@ -351,6 +361,16 @@ func (m *defaultHpcAC) GetInstanceLog(ctx context.Context, in *GetInstanceLogReq
|
|||
return client.GetInstanceLog(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultHpcAC) GetInstanceListAi(ctx context.Context, in *GetInstanceListReq, opts ...grpc.CallOption) (*GetInstanceListResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
return client.GetInstanceListAi(ctx, in, opts...)
|
||||
}
|
||||
|
||||
func (m *defaultHpcAC) SubmitImageInferTask(ctx context.Context, in *SubmitImageInferTaskReq, opts ...grpc.CallOption) (*SubmitImageInferTaskResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
return client.SubmitImageInferTask(ctx, in, opts...)
|
||||
}
|
||||
|
||||
// 曙光文件接口
|
||||
func (m *defaultHpcAC) GetFileList(ctx context.Context, in *GetFileListReq, opts ...grpc.CallOption) (*GetFileListResp, error) {
|
||||
client := hpcAC.NewHpcACClient(m.cli.Conn())
|
||||
|
|
|
@ -34,6 +34,7 @@ type CPConf struct {
|
|||
type AiConf struct {
|
||||
BaseUrlAi string
|
||||
GetImageListAi string
|
||||
GetInstanceAi string
|
||||
GetTaskAi string
|
||||
SubmitTaskAi string
|
||||
DeleteTaskAi string
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/common"
|
||||
"log"
|
||||
"strconv"
|
||||
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcAC"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type GetInstanceListAiLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewGetInstanceListAiLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetInstanceListAiLogic {
|
||||
return &GetInstanceListAiLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *GetInstanceListAiLogic) GetInstanceListAi(in *hpcAC.GetInstanceListReq) (*hpcAC.GetInstanceListResp, error) {
|
||||
resp := &hpcAC.GetInstanceListResp{}
|
||||
var reqUrl = common.AiCenterUrlPrefix() + l.svcCtx.Config.AiConf.GetInstanceAi + "/task"
|
||||
|
||||
token := common.GetToken()
|
||||
if token == "" {
|
||||
log.Println("获取token失败")
|
||||
return nil, errors.New("获取token失败")
|
||||
}
|
||||
|
||||
req := common.GetRestyRequest(3)
|
||||
_, err := req.
|
||||
SetHeader("token", token).
|
||||
SetQueryString("start" + EQUAL + strconv.Itoa(int(in.Start))).
|
||||
SetQueryString("limit" + EQUAL + strconv.Itoa(int(in.Limit))).
|
||||
SetQueryString("sort" + EQUAL + in.Sort).
|
||||
SetQueryString("instanceServiceName" + EQUAL + in.InstanceServiceName).
|
||||
SetQueryString("taskType" + EQUAL + in.TaskType).
|
||||
SetQueryString("status" + EQUAL + in.Status).
|
||||
SetQueryString("userName" + EQUAL + in.UserName).
|
||||
SetQueryString("taskClassification" + EQUAL + in.TaskClassification).
|
||||
SetResult(resp).
|
||||
Get(reqUrl)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
package logic
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"errors"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcAC"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/common"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/svc"
|
||||
"log"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type SubmitImageInferTaskLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewSubmitImageInferTaskLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SubmitImageInferTaskLogic {
|
||||
return &SubmitImageInferTaskLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *SubmitImageInferTaskLogic) SubmitImageInferTask(in *hpcAC.SubmitImageInferTaskReq) (*hpcAC.SubmitImageInferTaskResp, error) {
|
||||
resp := &hpcAC.SubmitImageInferTaskResp{}
|
||||
detailResp := &hpcAC.GetInstanceDetailResp{}
|
||||
var detailUrl = common.AiCenterUrlPrefix() + l.svcCtx.Config.AiConf.GetInstanceAi + "/" + in.Id + "/detail"
|
||||
token := common.GetToken()
|
||||
if token == "" {
|
||||
log.Println("获取token失败")
|
||||
return nil, errors.New("获取token失败")
|
||||
}
|
||||
//调用详情接口获取accessUrl
|
||||
reqDetail := common.GetRestyRequest(3)
|
||||
_, err := reqDetail.SetHeader("token", token).
|
||||
SetResult(detailResp).
|
||||
Get(detailUrl)
|
||||
|
||||
req := common.GetRestyRequest(3)
|
||||
_, err = req.
|
||||
SetFileReader("file", "train.py", bytes.NewReader([]byte(in.File))).
|
||||
SetFormData(map[string]string{
|
||||
"path": in.Path,
|
||||
"cover": in.Cover,
|
||||
}).
|
||||
SetResult(resp).
|
||||
Post(detailResp.Data.ContainerPortInfoList[0].AccessUrl + "/image")
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
|
||||
}
|
|
@ -4,7 +4,6 @@ import (
|
|||
"context"
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcAC"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/hpcacclient"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/logic"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/pkg/utils"
|
||||
"gitlink.org.cn/JointCloud/pcm-ac/internal/svc"
|
||||
|
@ -74,7 +73,7 @@ func SyncTask(svc *svc.ServiceContext) {
|
|||
}
|
||||
} else if infoList.HpcInfoList[index].Status == "Pending" || infoList.HpcInfoList[index].Status == "Running" {
|
||||
// 查询P端实际的任务列表
|
||||
listReq := hpcacclient.ListJobReq{}
|
||||
listReq := hpcAC.ListJobReq{}
|
||||
resp, _ := listLogic.ListJob(&listReq)
|
||||
for _, job := range resp.Jobs {
|
||||
if job.JobId == infoList.HpcInfoList[index].JobId {
|
||||
|
|
|
@ -185,6 +185,16 @@ func (s *HpcACServer) GetInstanceLog(ctx context.Context, in *hpcAC.GetInstanceL
|
|||
return l.GetInstanceLog(in)
|
||||
}
|
||||
|
||||
func (s *HpcACServer) GetInstanceListAi(ctx context.Context, in *hpcAC.GetInstanceListReq) (*hpcAC.GetInstanceListResp, error) {
|
||||
l := logic.NewGetInstanceListAiLogic(ctx, s.svcCtx)
|
||||
return l.GetInstanceListAi(in)
|
||||
}
|
||||
|
||||
func (s *HpcACServer) SubmitImageInferTask(ctx context.Context, in *hpcAC.SubmitImageInferTaskReq) (*hpcAC.SubmitImageInferTaskResp, error) {
|
||||
l := logic.NewSubmitImageInferTaskLogic(ctx, s.svcCtx)
|
||||
return l.SubmitImageInferTask(in)
|
||||
}
|
||||
|
||||
// 曙光文件接口
|
||||
func (s *HpcACServer) GetFileList(ctx context.Context, in *hpcAC.GetFileListReq) (*hpcAC.GetFileListResp, error) {
|
||||
l := logic.NewGetFileListLogic(ctx, s.svcCtx)
|
||||
|
|
1739
pb/hpcAC.proto
1739
pb/hpcAC.proto
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue