forked from JointCloud/pcm-ac
205 lines
7.2 KiB
Go
205 lines
7.2 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// Source: hpcAC.proto
|
|
|
|
package server
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitlink.org.cn/jcce-pcm/pcm-ac/hpcAC"
|
|
"gitlink.org.cn/jcce-pcm/pcm-ac/internal/logic"
|
|
"gitlink.org.cn/jcce-pcm/pcm-ac/internal/svc"
|
|
)
|
|
|
|
type HpcACServer struct {
|
|
svcCtx *svc.ServiceContext
|
|
hpcAC.UnimplementedHpcACServer
|
|
}
|
|
|
|
func NewHpcACServer(svcCtx *svc.ServiceContext) *HpcACServer {
|
|
return &HpcACServer{
|
|
svcCtx: svcCtx,
|
|
}
|
|
}
|
|
|
|
// ListJob list all jobs
|
|
func (s *HpcACServer) ListJob(ctx context.Context, in *hpcAC.ListJobReq) (*hpcAC.ListJobResp, error) {
|
|
l := logic.NewListJobLogic(ctx, s.svcCtx)
|
|
return l.ListJob(in)
|
|
}
|
|
|
|
// ListHistoryJob list all history jobs
|
|
func (s *HpcACServer) ListHistoryJob(ctx context.Context, in *hpcAC.ListHistoryJobReq) (*hpcAC.ListHistoryJobResp, error) {
|
|
l := logic.NewListHistoryJobLogic(ctx, s.svcCtx)
|
|
return l.ListHistoryJob(in)
|
|
}
|
|
|
|
// Submit job
|
|
func (s *HpcACServer) SubmitJob(ctx context.Context, in *hpcAC.SubmitJobReq) (*hpcAC.SubmitJobResp, error) {
|
|
l := logic.NewSubmitJobLogic(ctx, s.svcCtx)
|
|
return l.SubmitJob(in)
|
|
}
|
|
|
|
// ListJobManager list all job managers
|
|
func (s *HpcACServer) ListJobManager(ctx context.Context, in *hpcAC.JobManagerReq) (*hpcAC.ListJobManagerResp, error) {
|
|
l := logic.NewListJobManagerLogic(ctx, s.svcCtx)
|
|
return l.ListJobManager(in)
|
|
}
|
|
|
|
// GetJobDetail get job detail
|
|
func (s *HpcACServer) GetJobDetail(ctx context.Context, in *hpcAC.JobDetailReq) (*hpcAC.GetJobDetailResp, error) {
|
|
l := logic.NewGetJobDetailLogic(ctx, s.svcCtx)
|
|
return l.GetJobDetail(in)
|
|
}
|
|
|
|
// DeleteJob delete job
|
|
func (s *HpcACServer) DeleteJob(ctx context.Context, in *hpcAC.DeleteJobReq) (*hpcAC.DeleteJobResp, error) {
|
|
l := logic.NewDeleteJobLogic(ctx, s.svcCtx)
|
|
return l.DeleteJob(in)
|
|
}
|
|
|
|
// FileContent 查看文件内容
|
|
func (s *HpcACServer) FileContent(ctx context.Context, in *hpcAC.FileDataReq) (*hpcAC.FileContentResp, error) {
|
|
l := logic.NewFileContentLogic(ctx, s.svcCtx)
|
|
return l.FileContent(in)
|
|
}
|
|
|
|
// SelectQueueByUser 查询用户可访问队列列表
|
|
func (s *HpcACServer) SelectQueueByUser(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.QueueResp, error) {
|
|
l := logic.NewSelectQueueByUserLogic(ctx, s.svcCtx)
|
|
return l.SelectQueueByUser(in)
|
|
}
|
|
|
|
// QueryQueueDetails 查询队列资源详细信息
|
|
func (s *HpcACServer) QueryQueueDetails(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.QueueDetailsResp, error) {
|
|
l := logic.NewQueryQueueDetailsLogic(ctx, s.svcCtx)
|
|
return l.QueryQueueDetails(in)
|
|
}
|
|
|
|
// QueryUserQuotasLimit 查询用户资源限制信息
|
|
func (s *HpcACServer) QueryUserQuotasLimit(ctx context.Context, in *hpcAC.QueueReq) (*hpcAC.UserQuotasLimitResp, error) {
|
|
l := logic.NewQueryUserQuotasLimitLogic(ctx, s.svcCtx)
|
|
return l.QueryUserQuotasLimit(in)
|
|
}
|
|
|
|
// ParaStor Quota
|
|
func (s *HpcACServer) ParaStorQuota(ctx context.Context, in *hpcAC.ParaStorQuotaReq) (*hpcAC.ParaStorQuotaResp, error) {
|
|
l := logic.NewParaStorQuotaLogic(ctx, s.svcCtx)
|
|
return l.ParaStorQuota(in)
|
|
}
|
|
|
|
// WallTime
|
|
func (s *HpcACServer) WallTime(ctx context.Context, in *hpcAC.WallTimeReq) (*hpcAC.WallTimeResp, error) {
|
|
l := logic.NewWallTimeLogic(ctx, s.svcCtx)
|
|
return l.WallTime(in)
|
|
}
|
|
|
|
// QueueJobs
|
|
func (s *HpcACServer) QueueJobs(ctx context.Context, in *hpcAC.QueueJobsReq) (*hpcAC.QueueJobsResp, error) {
|
|
l := logic.NewQueueJobsLogic(ctx, s.svcCtx)
|
|
return l.QueueJobs(in)
|
|
}
|
|
|
|
func (s *HpcACServer) CpuCore(ctx context.Context, in *hpcAC.CpuCoreReq) (*hpcAC.CpuCoreResp, error) {
|
|
l := logic.NewCpuCoreLogic(ctx, s.svcCtx)
|
|
return l.CpuCore(in)
|
|
}
|
|
|
|
func (s *HpcACServer) Jobs(ctx context.Context, in *hpcAC.JobsReq) (*hpcAC.JobsResp, error) {
|
|
l := logic.NewJobsLogic(ctx, s.svcCtx)
|
|
return l.Jobs(in)
|
|
}
|
|
|
|
func (s *HpcACServer) HistoryJobDetail(ctx context.Context, in *hpcAC.HistoryJobDetailReq) (*hpcAC.HistoryJobDetailResp, error) {
|
|
l := logic.NewHistoryJobDetailLogic(ctx, s.svcCtx)
|
|
return l.HistoryJobDetail(in)
|
|
}
|
|
|
|
// 曙光ac获取token
|
|
func (s *HpcACServer) GetACToken(ctx context.Context, in *hpcAC.ACTokenReq) (*hpcAC.TokenResp, error) {
|
|
l := logic.NewGetACTokenLogic(ctx, s.svcCtx)
|
|
return l.GetACToken(in)
|
|
}
|
|
|
|
// 曙光ac获取clusterid
|
|
func (s *HpcACServer) GetACClusterId(ctx context.Context, in *hpcAC.ACClusterReq) (*hpcAC.ClusterResp, error) {
|
|
l := logic.NewGetACClusterIdLogic(ctx, s.svcCtx)
|
|
return l.GetACClusterId(in)
|
|
}
|
|
|
|
// 获取曙光账号算力
|
|
func (s *HpcACServer) GetComputingPower(ctx context.Context, in *hpcAC.ResourceReq) (*hpcAC.CpResp, error) {
|
|
l := logic.NewGetComputingPowerLogic(ctx, s.svcCtx)
|
|
return l.GetComputingPower(in)
|
|
}
|
|
|
|
// 获取曙光账号cpu,内存,存储信息
|
|
func (s *HpcACServer) GetGeneralInfo(ctx context.Context, in *hpcAC.ResourceReq) (*hpcAC.GiResp, error) {
|
|
l := logic.NewGetGeneralInfoLogic(ctx, s.svcCtx)
|
|
return l.GetGeneralInfo(in)
|
|
}
|
|
|
|
// 曙光智算接口
|
|
func (s *HpcACServer) SubmitPytorchTask(ctx context.Context, in *hpcAC.SubmitPytorchTaskReq) (*hpcAC.SubmitTaskAiResp, error) {
|
|
l := logic.NewSubmitPytorchTaskLogic(ctx, s.svcCtx)
|
|
return l.SubmitPytorchTask(in)
|
|
}
|
|
|
|
func (s *HpcACServer) SubmitTensorflowTask(ctx context.Context, in *hpcAC.SubmitTensorflowTaskReq) (*hpcAC.SubmitTaskAiResp, error) {
|
|
l := logic.NewSubmitTensorflowTaskLogic(ctx, s.svcCtx)
|
|
return l.SubmitTensorflowTask(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetImageListAi(ctx context.Context, in *hpcAC.GetImageListAiReq) (*hpcAC.GetImageListAiResp, error) {
|
|
l := logic.NewGetImageListAiLogic(ctx, s.svcCtx)
|
|
return l.GetImageListAi(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetImageAiById(ctx context.Context, in *hpcAC.GetImageAiByIdReq) (*hpcAC.GetImageAiByIdResp, error) {
|
|
l := logic.NewGetImageAiByIdLogic(ctx, s.svcCtx)
|
|
return l.GetImageAiById(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetPytorchTask(ctx context.Context, in *hpcAC.GetPytorchTaskReq) (*hpcAC.GetPytorchTaskResp, error) {
|
|
l := logic.NewGetPytorchTaskLogic(ctx, s.svcCtx)
|
|
return l.GetPytorchTask(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetTensorflowTask(ctx context.Context, in *hpcAC.GetTensorflowTaskReq) (*hpcAC.GetTensorflowTaskResp, error) {
|
|
l := logic.NewGetTensorflowTaskLogic(ctx, s.svcCtx)
|
|
return l.GetTensorflowTask(in)
|
|
}
|
|
|
|
func (s *HpcACServer) DeleteTaskAi(ctx context.Context, in *hpcAC.DeleteTaskAiReq) (*hpcAC.DeleteTaskAiResp, error) {
|
|
l := logic.NewDeleteTaskAiLogic(ctx, s.svcCtx)
|
|
return l.DeleteTaskAi(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetResourceSpec(ctx context.Context, in *hpcAC.GetResourceSpecReq) (*hpcAC.GetResourceSpecResp, error) {
|
|
l := logic.NewGetResourceSpecLogic(ctx, s.svcCtx)
|
|
return l.GetResourceSpec(in)
|
|
}
|
|
|
|
// 曙光文件接口
|
|
func (s *HpcACServer) GetFileList(ctx context.Context, in *hpcAC.GetFileListReq) (*hpcAC.GetFileListResp, error) {
|
|
l := logic.NewGetFileListLogic(ctx, s.svcCtx)
|
|
return l.GetFileList(in)
|
|
}
|
|
|
|
// 用户资源
|
|
func (s *HpcACServer) GetUserInfo(ctx context.Context, in *hpcAC.GetUserInfoReq) (*hpcAC.GetUserInfoResp, error) {
|
|
l := logic.NewGetUserInfoLogic(ctx, s.svcCtx)
|
|
return l.GetUserInfo(in)
|
|
}
|
|
|
|
func (s *HpcACServer) GetMemberJobs(ctx context.Context, in *hpcAC.GetMemberJobsReq) (*hpcAC.GetMemberJobsResp, error) {
|
|
l := logic.NewGetMemberJobsLogic(ctx, s.svcCtx)
|
|
return l.GetMemberJobs(in)
|
|
}
|
|
|
|
// 获取节点资源限额
|
|
func (s *HpcACServer) GetNodeResources(ctx context.Context, in *hpcAC.GetNodeResourcesReq) (*hpcAC.GetNodeResourcesResp, error) {
|
|
l := logic.NewGetNodeResourcesLogic(ctx, s.svcCtx)
|
|
return l.GetNodeResources(in)
|
|
}
|