syntax = "v1"

import (
	"core/pcm-core.api"
	"hpc/pcm-hpc.api"
	"ai/pcm-ai.api"
	"storage/pcm-storage.api"
	"vm/pcm-vm.api"
	"cloud/pcm-cloud.api"
	"storelink/pcm-storelink.api"
	"schedule/pcm-schedule.api"
	"monitoring/pcm-monitoring.api"
)

info(
	title: "pcm api service"
	desc: "type desc here"
	author: "type author here"
	email: "type email here"
	version: "type version here"
)

//core端接口
@server(
	prefix: pcm/v1
	group: core
)
service pcm {
	@doc "查询P端服务列表"
	@handler participantListHandler
	get /core/participantList returns (participantListResp)

	@doc "yaml提交任务"
	@handler scheduleTaskByYamlHandler
	post /core/scheduleTaskByYaml (scheduleTaskByYamlReq)

	@doc "提交任务"
	@handler commitTaskHandler
	post /core/commitTask (commitTaskReq)

	@doc "提交虚拟机任务"
	@handler commitVmTaskHandler
	post /core/commitVmTask (commitVmTaskReq) returns (commitVmTaskResp)

	@doc "删除任务"
	@handler deleteTaskHandler
	delete /core/deleteTask/:id (deleteTaskReq)

	@doc "查询任务列表"
	@handler TaskListHandler
	get /core/taskList (taskListReq) returns (taskListResp)

	@doc "查询任务详情"
	@handler TaskDetailHandler
	get /core/taskDetail/:taskId (taskDetailReq) returns (taskDetailResp)

	@doc "任务概览"
	@handler JobTotalHandler
	get /core/jobTotal returns (jobTotalResp)

	@doc "数据中心概览"
	@handler listCenterHandler
	get /core/listCenter returns (listCenterResp)

	@doc "查询集群列表"
	@handler listClusterHandler
	get /core/listCluster/:centerId (listClusterReq) returns (listClusterResp)

	@doc "获取region"
	@handler getRegionHandler
	get /core/getRegion returns (getRegionResp)

	@doc "获取region列表"
	@handler listRegionHandler
	get /core/listRegion returns (listRegionResp)

	@doc "查询算力"
	@handler getComputingPowerHandler
	get /core/getComputingPower returns (cpResp)

	@doc "查询通用信息"
	@handler getGeneralInfoHandler
	get /core/getGeneralInfo returns (GiResp)

	@doc "查询控制面板配置信息"
	@handler getResourcePanelConfigHandler
	get /core/getResourcePanelConfigHandler returns (ResourcePanelConfigResp)

	@doc "设置控制面板配置信息"
	@handler putResourcePanelConfigHandler
	put /core/resourcePanelConfigHandler (ResourcePanelConfigReq)

	@doc "获取算力统计信息"
	@handler getComputilityStatisticsHandler
	get /core/getComputilityStatistics returns (ComputilityStatisticsResp)

	@doc "获取节点资产"
	@handler nodeAssetsHandler
	get /core/assets returns (NodeAssetsResp)

	@doc "Center Resources top3"
	@handler centerResourcesHandler
	get /core/centerResources returns (centerResourcesResp)

	@doc "Synchronize Cluster Load Information"
	@handler syncClusterLoadHandler
	post /core/syncClusterLoad (syncClusterLoadReq)

	@doc "metrics"
	@handler metricsHandler
	get /core/metrics

	@doc "provide for adapter to pull task info from core"
	@handler pullTaskInfoHandler
	get /core/pullTaskInfo (PullTaskInfoReq) returns (PullTaskInfoResp)

	@doc "provide for adapter to push task info to core"
	@handler pushTaskInfoHandler
	post /core/pushTaskInfo (PushTaskInfoReq) returns (PushTaskInfoResp)

	@doc "provide for adapter to push resource info to core"
	@handler pushResourceInfoHandler
	post /core/pushResourceInfo (PushResourceInfoReq) returns (PushResourceInfoResp)

	@doc "provide for adapter to push notice info to core"
	@handler pushNoticeHandler
	post /core/pushNotice (PushNoticeReq) returns (PushNoticeResp)

	@doc "list notice"
	@handler listNoticeHandler
	get /core/listNotice (ListNoticeReq) returns (ListNoticeResp)

	@doc "paging queries the task list"
	@handler pageListTaskHandler
	get /core/task/list (pageTaskReq) returns (PageResult)

	@doc "Statistical task status"
	@handler countTaskStatus
	get /core/task/countTaskStatus () returns (TaskStatusResp)

	@doc "Home Page Overview"
	@handler homeOverviewHandler
	get /core/homeOverview (HomeOverviewReq) returns (HomeOverviewResp)

	@doc "task details"
	@handler taskDetails
	get /core/task/details (FId) returns(TaskDetailsResp)

	@doc "Get Public Image"
	@handler getPublicImageHandler
	get /core/getPublicImage (PublicImageReq) returns (PublicImageResp)

	@doc "Get Public Flavor"
	@handler getPublicFlavorHandler
	get /core/getPublicFlavor (PublicFlavorReq) returns (PublicFlavorResp)

	@doc "Get Public Network"
	@handler getPublicNetworkHandler
	get /core/getPublicNetwork (PublicNetworkReq) returns (PublicNetworkResp)
}

//hpc二级接口
@server(
	prefix: pcm/v1
	group: hpc
)
service pcm {
	@doc "提交超算任务"
	@handler commitHpcTaskHandler
	post /hpc/commitHpcTask (commitHpcTaskReq) returns (commitHpcTaskResp)

	@doc "超算总览"
	@handler overViewHandler
	get /hpc/overview (hpcOverViewReq) returns (hpcOverViewResp)

	@doc "超算适配器列表"
	@handler adapterSummaryHandler
	get /hpc/adapterSummary (hpcAdapterSummaryReq) returns (hpcAdapterSummaryResp)

	@doc "超算查询任务列表"
	@handler jobHandler
	get /hpc/job (hpcJobReq) returns (hpcJobResp)

	@doc "超算资源总览"
	@handler resourceHandler
	get /hpc/resource (hpcResourceReq) returns (hpcResourceResp)

	@doc "超算查询资产列表"
	@handler queueAssetsHandler
	get /hpc/queueAssets returns (QueueAssetsResp)
}

//cloud二级接口
@server(
	prefix: pcm/v1
	group: cloud
)
service pcm {
	@doc "云算任务列表"
	@handler cloudListHandler
	get /task/list returns (cloudListResp)

	@doc "yaml删除"
	@handler deleteYamlHandler
	get /cloud/DeleteYaml (ApplyReq) returns (DeleteResp)

	@doc "控制器监控"
	@handler controllerMetricsHandler
	get /cloud/controller/Metrics (ControllerMetricsReq) returns (ControllerMetricsResp)

	@doc "数算集群注册"
	@handler registerClusterHandler
	post /cloud/registerCluster (RegisterClusterReq) returns (CloudResp)

	@doc "数算集群删除"
	@handler deleteClusterHandler
	post /cloud/deleteCluster (deleteClusterReq) returns (CloudResp)

	@doc "触发租户更新"
	@handler noticeTenantHandler
	get /cloud/noticeTenant returns (CloudResp)

	@doc "租户更新"
	@handler updateTenantHandler
	post /cloud/updateTenant (UpdateTenantReq) returns (CloudResp)

	@doc "Obtain cluster list information according to adapterId"
	@handler getClusterListHandler
	get /core/clusterList (getClusterListReq) returns (getClusterListResp)

	@doc "Create cloud computing common tasks"
	@handler commitGeneralTask
	post /cloud/task/create (GeneralTaskReq) returns ()

	@handler podLogs
	post /cloud/pod/logs (PodLogsReq) returns (string)
}

//智算二级接口
@server(
	prefix: pcm/v1
	group: ai
)
service pcm {
	@doc "智算中心概览"
	@handler getCenterOverviewHandler
	get /ai/getCenterOverview returns (CenterOverviewResp)

	@doc "智算中心排队状况"
	@handler getCenterQueueingHandler
	get /ai/getCenterQueueing returns (CenterQueueingResp)

	@doc "智算中心列表"
	@handler getCenterListHandler
	get /ai/getCenterList returns (CenterListResp)

	@doc "智算中心任务列表"
	@handler getCenterTaskListHandler
	get /ai/getCenterTaskList returns (CenterTaskListResp)

	@doc "查询数据集列表"
	@handler listDataSetHandler
	get /ai/listDataSet/:projectId (DataSetReq) returns (DataSetResp)

	@doc "创建数据集"
	@handler CreateDataSetHandler
	post /ai/createDataSet/:projectId (CreateDataSetReq) returns (CreateDataSetResp)

	@doc "删除数据集"
	@handler DeleteDataSetHandler
	delete /ai/deleteDataSet/:projectId/:datasetId (DeleteDataSetReq) returns (DeleteDataSetResp)

	@doc "创建导入任务"
	@handler CreateTaskHandler
	post /ai/CreateTask/:projectId/:datasetId (ImportTaskDataReq) returns (ImportTaskDataResp)

	@doc "查询数据集导入任务列表"
	@handler ListImportHandler
	get /ai/ListImport/:projectId/:datasetId (ListImportTasksReq) returns (ListImportTasksResp)

	@doc "查询训练作业列表"
	@handler GetListTrainingJobsHandler
	get /ai/GetListTrainingJobs/:projectId (ListTrainingJobsreq) returns (ListTrainingJobsresp)

	@doc "删除训练作业"
	@handler DeleteTrainingJobHandler
	delete /ai/DeleteTrainingJob/:projectId/:trainingJobId (DeleteTrainingJobReq) returns (DeleteTrainingJobResp)

	@doc "创建算法"
	@handler CreateAlgorithmHandler
	post /ai/CreateAlgorithm/:projectId (CreateAlgorithmReq) returns (CreateAlgorithmResp)

	@doc "查询创建算法列表"
	@handler ListAlgorithms
	get /ai/ListAlgorithms/:projectId (ListAlgorithmsReq) returns (ListAlgorithmsResp)

	@doc "删除算法"
	@handler DeleteAlgorithm
	delete /ai/DeleteAlgorithm/:projectId/:algorithmId (DeleteAlgorithmReq) returns (DeleteAlgorithmResp)

	@doc "创建训练作业"
	@handler CreateTrainingJobHandler
	post /ai/CreateTrainingJob/:projectId (CreateTrainingJobReq) returns (CreateTrainingJobResp)

	@doc "展示算法详情"
	@handler ShowAlgorithmByUuid
	get /ai/ShowAlgorithmByUuid/:projectId/:algorithmId (ShowAlgorithmByUuidReq) returns (ShowAlgorithmByUuidResp)

	@doc "创建导出任务"
	@handler CreateExportTaskHandler
	post /ai/CreateExportTask/:projectId/:datasetId (CreateExportTaskReq) returns (ExportTaskDataResp)

	@doc "获取导出任务数据集"
	@handler GetExportTasksOfDatasetHandler
	get /ai/GetExportTasksOfDataset/:projectId/:datasetId (GetExportTasksOfDatasetReq) returns (GetExportTasksOfDatasetResp)

	@doc "获取导出任务数据集状态"
	@handler GetExportTaskStatusOfDatasetHandler
	get /ai/GetExportTaskStatusOfDataset/:projectId/:resourceId/:taskId (GetExportTaskStatusOfDatasetReq) returns (GetExportTaskStatusOfDatasetResp)

	@doc "创建处理任务"
	@handler CreateProcessorTaskHandler
	post /ai/CreateProcessorTask (CreateProcessorTaskReq) returns (CreateProcessorTaskResp)

	@doc "创建服务"
	@handler CreateServiceHandler
	post /ai/CreateService/:projectId (CreateServiceReq) returns (CreateServiceResp)

	@doc "展示服务"
	@handler ListServicesHandler
	get /ai/ListServices/:projectId (ListServicesReq) returns (ListServicesResp)

	@doc "展示服务详情"
	@handler ShowServiceHandler
	get /ai/ShowService/:projectId/:serviceId (ShowServiceReq) returns (ShowServiceResp)

	@doc "删除服务"
	@handler DeleteServiceHandler
	delete /ai/DeleteService/:projectId/:serviceId (DeleteServiceReq) returns (DeleteServiceResp)

	@doc "查询专属资源池列表"
	@handler ListClustersHandler
	get /ai/ListClusters (ListClustersReq) returns (ListClustersResp)

	/******************Notebook Method start*************************/
	@doc "查询notebook列表"
	@handler listNotebookHandler
	get /ai/listNotebook (ListNotebookReq) returns (ListNotebookResp)

	@doc "创建notebook"
	@handler createNotebookHandler
	post /ai/createNotebook (CreateNotebookReq) returns (CreateNotebookResp)

	@doc "启动notebook"
	@handler startNotebookHandler
	post /ai/startNotebook (StartNotebookReq) returns (StartNotebookResp)

	@doc "停止notebook"
	@handler stopNotebookHandler
	post /ai/stopNotebook (StopNotebookReq) returns (StopNotebookResp)

	@doc "查询notebook存储"
	@handler getNotebookStorageHandler
	get /ai/getNotebookStorage (GetNotebookStorageReq) returns (GetNotebookStorageResp)

	@doc "挂载notebook存储"
	@handler mountNotebookStorageHandler
	post /ai/mountNotebookStorage (MountNotebookStorageReq) returns (MountNotebookStorageResp)

	/******************Notebook Method end*************************/
	/******************Visualization Job Method start*************************/
	@doc "获取虚拟化任务"
	@handler getVisualizationJobHandler
	get /ai/getVisualizationJob (GetVisualizationJobReq) returns (GetVisualizationJobResp)

	@doc "创建虚拟化任务"
	@handler createVisualizationJobHandler
	post /ai/CreateVisualizationJob (CreateVisualizationJobReq) returns (CreateVisualizationJobResp)
	/******************Visualization Job Method start*************************/
}

//screen接口
@server(
	prefix: pcm/v1
	group: storage
)
service pcm {
	@doc "存储概览"
	@handler screenStorageHandler
	get /storage/screenStorage (StorageScreenReq) returns (StorageScreenResp)

	@doc "日常算力查询"
	@handler dailyPowerScreenHandler
	get /storage/dailyPowerScreen (DailyPowerScreenReq) returns (DailyPowerScreenResp)

	@doc "算力中心算力情况"
	@handler perCenterComputerPowersHandler
	get /storage/perCenterComputerPowers (PerCenterComputerPowersReq) returns (PerCenterComputerPowersResp)
}

//镜像接口
@server(
	prefix: pcm/v1
	group: image
)
service pcm {
	@doc "镜像上传"
	@handler uploadHandler
	post /upload

	@doc "镜像分块"
	@handler chunkHandler
	post /chunk

	@doc "查询镜像列表"
	@handler imageListHandler
	get /image/list returns (imageListResp)

	@doc "数据集检查"
	@handler dataSetCheckHandler
	get /dataSet/check/:fileMd5 (checkReq) returns (checkResp)

	@doc "上传数据集"
	@handler uploadDataSetHandler
	post /dataSet/upload
}

//openstack 接口
@server(
	prefix: pcm/v1
	group: vm
)
service pcm {
	@doc "openstack计算中心概览"
	@handler GetComputeLimitsHandler
	get /vm/getComputeLimits (GetComputeLimitsReq) returns (GetComputeLimitsResp)

	@doc "查询卷列表"
	@handler GetVolumeLimitsHandler
	get /vm/getVolumeLimits (GetVolumeLimitsReq) returns (GetVolumeLimitsResp)

	@doc "查询网络数量"
	@handler GetNetworkNumHandler
	get /vm/getNetworkNum (ListNetworksReq) returns (NetworkNum)

	@doc "查询镜像数量"
	@handler getImageNumHandler
	get /vm/getImageNum (ListImagesReq) returns (ImageNum)

	@doc "查询虚拟机概览数据"
	@handler getOpenstackOverviewHandler
	get /vm/getOpenstackOverview (OpenstackOverviewReq) returns (OpenstackOverviewResp)

	@doc "查询虚拟机列表"
	@handler ListServerHandler
	get /vm/listServer (ListServersReq) returns (ListServersResp)

	@doc "查询虚拟机详情列表"
	@handler ListServersDetailedHandler
	get /vm/listServersDetailed (ListServersDetailedReq) returns (ListServersDetailedResp)

	@doc "删除虚拟机"
	@handler DeleteServerHandler
	delete /vm/deleteServer (DeleteServerReq) returns (DeleteServerResp)

	@doc "创建虚拟机"
	@handler CreateServerHandler
	post /vm/createServer (CreateServerReq) returns (CreateServerResp)

	@doc "跨域创建虚拟机"
	@handler CreateMulServerHandler
	post /vm/createMulServer (CreateMulServerReq) returns (CreateMulServerResp)

	@doc "根据ID查询虚拟机详情"
	@handler GetServersDetailedByIdHandler
	get /vm/getServersDetailedById (GetServersDetailedByIdReq) returns (GetServersDetailedByIdResp)

	@doc "更新虚拟机"
	@handler UpdateServerHandler
	put /vm/updateServer (UpdateServerReq) returns (UpdateServerResp)

	@doc "启动虚拟机"
	@handler StartServerHandler
	post /vm/startServer (StartServerReq) returns (StartServerResp)

	@doc "停止虚拟机"
	@handler StopServerHandler
	post /vm/stopServer (StopServerReq) returns (StopServerResp)

	@doc "重启虚拟机"
	@handler RebootServerHandler
	post /vm/rebootServer (RebootServerReq) returns (RebootServerResp)

	@doc "暂停虚拟机"
	@handler PauseServerHandler
	post /vm/pauseServer (PauseServerReq) returns (PauseServerResp)

	@doc "取消暂停虚拟机"
	@handler UnpauseServerHandler
	post /vm/unpauseServer (UnpauseServerReq) returns (UnpauseServerResp)

	@doc "调整大小"
	@handler ResizeServerHandler
	post /vm/resizeServer (ResizeServerReq) returns (ResizeServerResp)

	@doc "迁移"
	@handler MigrateServerHandler
	post /vm/migrateServer (MigrateServerReq) returns (MigrateServerResp)

	@doc "搁置"
	@handler ShelveServerHandler
	post /vm/shelveServer (ShelveServerReq) returns (ShelveServerResp)

	@doc "设置密码"
	@handler ChangeAdministrativePasswordHandler
	post /vm/changeAdministrativePassword (ChangeAdministrativePasswordReq) returns (ChangeAdministrativePasswordResp)

	@doc "救援"
	@handler RescueServerHandler
	post /vm/rescueServer (RescueServerReq) returns (RescueServerResp)

	@doc "取消救援"
	@handler UnRescueHandler
	post /vm/unRescueServer (UnRescueServerReq) returns (UnRescueServerResp)

	@doc "中止"
	@handler SuspendServerHandler
	post /vm/suspendServer (SuspendServerReq) returns (SuspendServerResp)

	@doc "将安全组添加到服务器"
	@handler AddSecurityGroupToServerHandler
	post /vm/addSecurityGroupToServer (AddSecurityGroupToServerReq) returns (AddSecurityGroupToServerResp)

	@doc "从服务器中删除安全"
	@handler removeSecurityGroupHandler
	post /vm/removeSecurityGroup (removeSecurityGroupReq) returns (removeSecurityGroupResp)

	@doc "创建规格"
	@handler CreateFlavorHandler
	post /vm/createFlavor (CreateFlavorReq) returns (CreateFlavorResp)

	@doc "创建规格"
	@handler DeleteFlavorHandler
	post /vm/deleteFlavor (DeleteFlavorReq) returns (DeleteFlavorResp)

	@doc "查询镜像列表"
	@handler ListImagesHandler
	get /vm/listImages (ListImagesReq) returns (ListImagesResp)

	@doc "删除镜像"
	@handler DeleteImageHandler
	delete /vm/deleteImage (DeleteImageReq) returns (DeleteImageResp)

	@doc "创建镜像"
	@handler CreateImageHandler
	post /vm/createImage (CreateImageReq) returns (CreateImageResp)

	@doc "上传镜像"
	@handler UploadImageHandler
	put /vm/uploadImage (UploadOsImageReq) returns (UploadOsImageResp)

	@doc "查询网络列表"
	@handler ListNetworksHandler
	get /vm/listNetworks (ListNetworksReq) returns (ListNetworksResp)

	@doc "删除网络"
	@handler DeleteNetworkHandler
	delete /vm/deleteNetwork (DeleteNetworkReq) returns (DeleteNetworkResp)

	@doc "创建网络"
	@handler CreateNetworkHandler
	post /vm/createNetwork (CreateNetworkReq) returns (CreateNetworkResp)

	@doc "创建子网"
	@handler CreateSubnetHandler
	post /vm/createSubnet (CreateSubnetReq) returns (CreateSubnetResp)

	@doc "查询网络详情"
	@handler ShowNetworkDetailsHandler
	get /vm/showNetworkDetails (ShowNetworkDetailsReq) returns (ShowNetworkDetailsResp)

	@doc "更新网络"
	@handler UpdateNetworkHandler
	put /vm/updateNetwork (UpdateNetworkReq) returns (UpdateNetworkResp)

	@doc "批量创建网络"
	@handler BulkCreateNetworksHandler
	post /vm/bulkCreateNetworks (BulkCreateNetworksReq) returns (BulkCreateNetworksResp)

	@doc "查询子网列表"
	@handler ListSubnetsHandler
	get /vm/listSubnets (ListSubnetsReq) returns (ListSubnetsResp)

	@doc "删除子网"
	@handler DeleteSubnetHandler
	delete /vm/deleteSubnet (DeleteSubnetReq) returns (DeleteSubnetResp)

	@doc "修改子网"
	@handler UpdateSubnetHandler
	put /vm/updateSubnet (UpdateSubnetReq) returns (UpdateSubnetResp)

	@doc "查询网络列表"
	@handler ListNetworkSegmentRangesRangeHandler
	get /vm/listNetworkSegmentRanges (ListNetworkSegmentRangesReq) returns (ListNetworkSegmentRangesResp)

	@doc "创建网段"
	@handler CreateNetworkSegmentRangeHandler
	post /vm/createNetworkSegmentRange (CreateNetworkSegmentRangeReq) returns (CreateNetworkSegmentRangeResp)

	@doc "删除网段"
	@handler DeleteNetworkSegmentRangesHandler
	delete /vm/deleteNetworkSegmentRanges (DeleteNetworkSegmentRangesReq) returns (DeleteNetworkSegmentRangesResp)

	@doc "修改网段"
	@handler UpdateNetworkSegmentRangesHandler
	put /vm/updateNetworkSegmentRanges (UpdateNetworkSegmentRangesReq) returns (UpdateNetworkSegmentRangesResp)

	@doc "显示网段详情"
	@handler ShowNetworkSegmentRangeDetailsHandler
	get /vm/showNetworkSegmentRangeDetails (ShowNetworkSegmentRangeDetailsReq) returns (ShowNetworkSegmentRangeDetailsResp)

	@doc "创建端口"
	@handler CreatePortHandler
	post /vm/createPort (CreatePortReq) returns (CreatePortResp)

	@doc "查询端口列表"
	@handler ListPortsHandler
	get /vm/listPortsReq (ListPortsReq) returns (ListPortsResp)

	@doc "删除端口"
	@handler DeletePortHandler
	delete /vm/deletePort (DeletePortReq) returns (DeletePortResp)

	@doc "修改端口"
	@handler UpdatePortHandler
	put /vm/updatePort (UpdatePortReq) returns (UpdatePortResp)

	@doc "查询端口详情"
	@handler ShowPortDetailsHandler
	get /vm/showPortDetails (ShowPortDetailsReq) returns (ShowPortDetailsResp)

	@doc "创建路由"
	@handler CreateRouterHandler
	post /vm/createRouter (CreateRouterReq) returns (CreateRouterResp)

	@doc "查询路由列表"
	@handler ListRoutersHandler
	get /vm/listRouters (ListRoutersReq) returns (ListRoutersResp)

	@doc "删除路由"
	@handler DeleteRouterHandler
	delete /vm/deleteRouter (DeleteRouterReq) returns (DeleteRouterResp)

	@doc "修改路由"
	@handler UpdateRouterHandler
	put /vm/updateRouter (UpdateRouterReq) returns (UpdateRouterResp)

	@doc "查询路由详情"
	@handler ShowRouterDetailsHandler
	get /vm/showRouterDetails (ShowRouterDetailsReq) returns (ShowRouterDetailsResp)

	@doc "创建浮动ip"
	@handler CreateFloatingIPHandler
	post /vm/createFloatingIP (CreateFloatingIPReq) returns (CreateFloatingIPResp)

	@doc "查询浮动ip列表"
	@handler ListFloatingIPsHandler
	get /vm/listFloatingIPs (ListFloatingIPsReq) returns (ListFloatingIPsResp)

	@doc "删除浮动ip"
	@handler DeleteFloatingIPHandler
	delete /vm/deleteFloatingIP (DeleteFloatingIPReq) returns (DeleteFloatingIPResp)

	@doc "修改浮动ip"
	@handler UpdateFloatingIPHandler
	put /vm/updateFloatingIP (UpdateFloatingIPReq) returns (UpdateFloatingIPResp)

	@doc "查询浮动ip详情"
	@handler ShowFloatingIPDetailsHandler
	get /vm/showFloatingIPDetails (ShowFloatingIPDetailsReq) returns (ShowFloatingIPDetailsResp)

	@doc "创建防火墙"
	@handler CreateFirewallGroupHandler
	post /vm/createFirewallGroup (CreateFirewallGroupReq) returns (CreateFirewallGroupResp)

	@doc "查询防火墙列表"
	@handler ListFirewallGroupsHandler
	get /vm/listFirewallGroups (ListFirewallGroupsReq) returns (ListFirewallGroupsResp)

	@doc "删除防火墙"
	@handler DeleteFirewallGroupHandler
	delete /vm/deleteFirewallGroup (DeleteFirewallGroupReq) returns (DeleteFirewallGroupResp)

	@doc "修改防火墙"
	@handler UpdateFirewallGroupHandler
	put /vm/updateFirewallGroup (UpdateFirewallGroupReq) returns (UpdateFirewallGroupResp)

	@doc "查询防火墙详情"
	@handler ShowFirewallGroupDetailsHandler
	get /vm/showFirewallGroupDetails (ShowFirewallGroupDetailsReq) returns (ShowFirewallGroupDetailsResp)

	@doc "创建防火墙策略"
	@handler CreateFirewallPolicyHandler
	post /vm/createFirewallPolicy (CreateFirewallPolicyReq) returns (CreateFirewallPolicyResp)

	@doc "查询防火墙策略列表"
	@handler ListFirewallPoliciesHandler
	get /vm/listFirewallPolicies (ListFirewallPoliciesReq) returns (ListFirewallPoliciesResp)

	@doc "删除防火墙策略"
	@handler DeleteFirewallPolicyHandler
	delete /vm/deleteFirewallPolicy (DeleteFirewallPolicyReq) returns (DeleteFirewallPolicyResp)

	@doc "查询防火墙策略详情"
	@handler ShowFirewallRuleDetailsHandler
	get /vm/showFirewallRuleDetails (ShowFirewallRuleDetailsReq) returns (ShowFirewallRuleDetailsResp)

	@doc "查询防火墙策略详情"
	@handler ShowFirewallPolicyDetailsHandler
	get /vm/showFirewallPolicyDetails (ShowFirewallPolicyDetailsReq) returns (ShowFirewallPolicyDetailsResp)

	@doc "创建防火墙策略"
	@handler CreateFirewallRuleHandler
	post /vm/createFirewallRule (CreateFirewallRuleReq) returns (CreateFirewallRuleResp)

	@doc "查询防火墙策略列表"
	@handler ListFirewallRulesHandler
	get /vm/listFirewallRules (ListFirewallRulesReq) returns (ListFirewallRulesResp)

	@doc "删除防火墙策略"
	@handler DeleteFirewallRuleHandler
	delete /vm/deleteFirewallRule (DeleteFirewallRuleReq) returns (DeleteFirewallRuleResp)

	@doc "创建安全组"
	@handler CreateSecurityGroupHandler
	post /vm/createSecurityGroup (CreateSecurityGroupReq) returns (CreateSecurityGroupResp)

	@doc "查询安全组列表"
	@handler ListSecurityGroupsHandler
	get /vm/listSecurityGroups (ListSecurityGroupsReq) returns (ListSecurityGroupsResp)

	@doc "删除安全组"
	@handler DeleteSecurityGroupHandler
	delete /vm/deleteSecurityGroup (DeleteSecurityGroupReq) returns (DeleteSecurityGroupResp)

	@doc "修改安全组"
	@handler UpdateSecurityGroupHandler
	put /vm/updateSecurityGroup (UpdateSecurityGroupReq) returns (UpdateSecurityGroupResp)

	@doc "查询安全组详情"
	@handler ShowSecurityGroupHandler
	get /vm/showSecurityGroup (ShowSecurityGroupReq) returns (ShowSecurityGroupResp)

	@doc "创建安全组规则"
	@handler CreateSecurityGroupRuleHandler
	post /vm/createSecurityGroupRule (CreateSecurityGroupRuleReq) returns (CreateSecurityGroupRuleResp)

	@doc "查询安全组规则列表"
	@handler ListSecurityGroupRulesHandler
	get /vm/listSecurityGroupRules (ListSecurityGroupRulesReq) returns (ListSecurityGroupRulesResp)

	@doc "删除安全组规则"
	@handler DeleteSecurityGroupRuleHandler
	delete /vm/deleteSecurityGroupRule (DeleteSecurityGroupRuleReq) returns (DeleteSecurityGroupRuleResp)

	@doc "查询安全组规则详情"
	@handler ShowSecurityGroupRuleHandler
	get /vm/showSecurityGroupRule (ShowSecurityGroupRuleReq) returns (ShowSecurityGroupRuleResp)

	@doc "查询卷详情列表"
	@handler ListVolumesDetailHandler
	get /vm/listVolumesDetail (ListVolumesDetailReq) returns (ListVolumesDetailResp)

	@doc "删除卷"
	@handler DeleteVolumeHandler
	delete /vm/deleteVolume (DeleteVolumeReq) returns (DeleteVolumeResp)

	@doc "创建卷"
	@handler CreateVolumeHandler
	post /vm/createVolume (CreateVolumeReq) returns (CreateVolumeResp)

	@doc "查询规格详情列表"
	@handler ListFlavorsDetailHandler
	get /vm/listFlavorsDetail (ListFlavorsDetailReq) returns (ListFlavorsDetailResp)

	@doc "查询规格类型列表"
	@handler ListVolumeTypesHandler
	get /vm/listVolumeTypes (ListVolumeTypesReq) returns (ListVolumeTypesResp)

	@doc "更新卷"
	@handler UpdateVolumeHandler
	put /vm/updateVolume (UpdateVolumeReq) returns (UpdateVolumeResp)

	@doc "创建卷类型"
	@handler CreateVolumeTypesHandler
	post /vm/createVolumeTypes (CreateVolumeTypeReq) returns (CreateVolumeTypeResp)

	@doc "删除卷类型"
	@handler DeleteVolumeTypeHandler
	delete /vm/deleteVolumeType (DeleteVolumeTypeReq) returns (DeleteVolumeTypeResp)

	@doc "查询卷列表"
	@handler ListVolumesHandler
	get /vm/listVolumes (ListVolumesReq) returns (ListVolumesResp)

	@doc "根据ID获取卷详情"
	@handler GetVolumeDetailedByIdHandler
	get /vm/getVolumeDetailedById (GetVolumeDetailedByIdReq) returns (GetVolumeDetailedByIdResp)

	@doc "查询节点列表"
	@handler ListNodesHandler
	get /vm/listNodes (ListNodesReq) returns (ListNodesResp)

	@doc "创建节点"
	@handler CreateNodeHandler
	post /vm/createNode (CreateNodeReq) returns (CreateNodeResp)

	@doc "删除节点"
	@handler DeleteNodeHandler
	delete /vm/deleteNode (DeleteNodeReq) returns (DeleteNodeResp)

	@doc "查询节点详情"
	@handler ShowNodeDetailsHandler
	get /vm/showNodeDetails (ShowNodeDetailsReq) returns (ShowNodeDetailsResp)
}

//存算联动 接口
@server(
	prefix: pcm/v1
	group: storelink
)
service pcm {
	@handler UploadLinkImageHandler
	post /storelink/uploadImage (UploadLinkImageReq) returns (UploadLinkImageResp)

	@handler GetLinkImageListHandler
	get /storelink/getImageList (GetLinkImageListReq) returns (GetLinkImageListResp)

	@handler DeleteLinkImageHandler
	delete /storelink/deleteImage (DeleteLinkImageReq) returns (DeleteLinkImageResp)

	@handler SubmitLinkTaskHandler
	post /storelink/submitTask (SubmitLinkTaskReq) returns (SubmitLinkTaskResp)

	@handler GetLinkTaskHandler
	get /storelink/getTask (GetLinkTaskReq) returns (GetLinkTaskResp)

	@handler DeleteLinkTaskHandler
	delete /storelink/deleteTask (DeleteLinkTaskReq) returns (DeleteLinkTaskResp)

	@handler GetParticipantsHandler
	get /storelink/getParticipants (GetParticipantsReq) returns (GetParticipantsResp)

	@handler GetAISpecsHandler
	get /storelink/getResourceSpecs (GetResourceSpecsReq) returns (GetResourceSpecsResp)
}

// 接口
@server(
	prefix: pcm/v1
	group: apps
)
service pcm {
	@doc "应用列表"
	@handler AppListHandler
	get /apps/list (AppListReq) returns (AppListResp)

	@doc "获取应用分发详情"
	@handler AppDetailHandler
	get /apps/distribute/:appName (AppDetailReq) returns (AppDetailResp)

	@doc "应用pods列表"
	@handler AppPodsHandler
	get /apps/pods/:appName (AppDetailReq) returns (AppDetailResp)

	@doc "获取应用详情"
	@handler GetAppByAppName
	get /apps/getAppByAppName/:appName (AppDetailReq) returns (AppTaskResp)

	@doc "删除应用"
	@handler DeleteAppByAppName
	delete /apps/deleteApp (DeleteAppReq) returns (DeleteAppResp)

	@doc "更新应用"
	@handler UpdateAppByAppName
	put /apps/updateApp (DeleteAppReq) returns (AppTaskResp)

	@doc "重启应用"
	@handler RestartAppByAppName
	put /apps/restartApp (DeleteAppReq) returns (AppResp)

	@doc "暂停应用"
	@handler PauseAppByAppName
	put /apps/pauseApp (DeleteAppReq) returns (AppResp)

	@doc "启动应用"
	@handler StartAppByAppName
	put /apps/startApp (DeleteAppReq) returns (AppResp)
}

// 接口
@server(
	prefix: pcm/v1
	group: adapters
)
service pcm {
	@handler AdaptersListHandler
	get /adapter/list (AdapterQueryReq) returns (PageResult)

	@handler CreateAdapterHandler
	post /adapter/create (AdapterCreateReq) returns (AdapterResp)

	@handler UpdateAdapterHandler
	put /adapter/update (AdapterReq) returns (AdapterResp)

	@handler DeleteAdapterHandler
	delete /adapter/delete (AdapterDelReq) returns (AdapterResp)

	@handler GetAdapterHandler
	get /adapter/get (AdapterDelReq) returns (AdapterInfo)

	@handler ClusterListHandler
	get /adapter/cluster/list (ClusterReq) returns (PageResult)

	@handler CreateClusterHandler
	post /adapter/cluster/create (ClusterCreateReq) returns (ClusterResp)

	@handler UpdateClusterHandler
	put /adapter/cluster/update (ClusterCreateReq) returns (ClusterResp)

	@handler DeleteClusterHandler
	delete /adapter/cluster/delete (FId) returns (ClusterResp)

	@handler GetClusterHandler
	get /adapter/cluster/get (FId) returns (ClusterResp)

	@handler GetAdapterRelationHandler
	get /adapter/relation (AdapterRelationQueryReq) returns (PageResult)

	@handler GetClusterSumHandler
	get /adapter/clusterSum (clusterSumReq) returns (clusterSumReqResp)
}

@server(
	prefix: pcm/v1
	group: schedule
)
service pcm {
	@handler ScheduleGetAiResourceTypesHandler
	get /schedule/ai/getResourceTypes returns (AiResourceTypesResp)

	@handler ScheduleGetAiTaskTypesHandler
	get /schedule/ai/getTaskTypes returns (AiTaskTypesResp)

	@handler ScheduleGetDatasetsHandler
	get /schedule/ai/getDatasets/:adapterId (AiDatasetsReq) returns (AiDatasetsResp)

	@handler ScheduleGetStrategyHandler
	get /schedule/ai/getStrategies returns (AiStrategyResp)

	@handler ScheduleGetAlgorithmsHandler
	get /schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset (AiAlgorithmsReq) returns (AiAlgorithmsResp)

	@handler ScheduleGetAiJobLogLogHandler
	get /schedule/ai/getJobLog/:adapterId/:clusterId/:taskId/:instanceNum (AiJobLogReq) returns (AiJobLogResp)

	@handler ScheduleSubmitHandler
	post /schedule/submit (ScheduleReq) returns (ScheduleResp)

	@handler ScheduleGetOverviewHandler
	post /schedule/getOverview returns (ScheduleOverviewResp)

	@handler DownloadAlgothmCodeHandler
	get /schedule/downloadAlgorithmCode (DownloadAlgorithmCodeReq) returns (DownloadAlgorithmCodeResp)

	@handler UploadAlgothmCodeHandler
	post /schedule/uploadAlgorithmCode (UploadAlgorithmCodeReq) returns (UploadAlgorithmCodeResp)

	@handler GetComputeCardsByClusterHandler
	get /schedule/getComputeCardsByCluster/:adapterId/:clusterId (GetComputeCardsByClusterReq) returns (GetComputeCardsByClusterResp)

	@handler GetClusterBalanceByIdHandler
	get /schedule/getClusterBalanceById/:adapterId/:clusterId (GetClusterBalanceByIdReq) returns (GetClusterBalanceByIdResp)
}

@server(
	prefix: pcm/v1
	group: dictionary
)
service pcm {
	@handler GetDict
	get /dict/:id (CId) returns (DictResp)

	@handler ListDict
	get /dicts (DictReq) returns (PageResult)

	@handler AddDict
	post /dict (DictEditReq) returns (DictResp)

	@handler EditDict
	put /dict (DictEditReq) returns (DictResp)

	@handler DeleteDict
	delete /dict/:id (CId) returns (DictResp)

	@handler GetDictItem
	get /dictItem/:id (CId) returns (DictItemResp)

	@handler ListDictItem
	get /dictItems (DictItemReq) returns (PageResult)

	@handler AddDictItem
	post /dictItem (DictItemEditReq) returns (DictItemResp)

	@handler EditDictItem
	put /dictItem (DictItemEditReq) returns (DictItemResp)

	@handler DeleteDictItem
	delete /dictItem/:id (CId) returns (DictItemResp)

	@handler ListDictItemByCode
	get /dictItem/code/:dictCode (DictCodeReq) returns (PageResult)
}

@server(
	prefix: pcm/v1
	group: monitoring
)
service pcm {
	@handler CreateAlertRuleHandler
	post /monitoring/alert/rule (CreateAlertRuleReq)

	@doc "alert rules"
	@handler alertRulesHandler
	get /monitoring/alert/rule (AlertRulesReq) returns (AlertRulesResp)

	@handler DeleteAlertRuleHandler
	delete /monitoring/alert/rule (DeleteAlertRuleReq)

	@doc "cluster resource load"
	@handler clustersLoadHandler
	get /monitoring/cluster/load (clustersLoadReq) returns (clustersLoadResp)

	@doc "node resource load"
	@handler nodesLoadTopHandler
	get /monitoring/node/top (nodesLoadTopReq) returns (nodesLoadTopResp)

	@doc "alert list"
	@handler alertListHandler
	get /monitoring/alert/list (alertListReq) returns (alertListResp)

	@doc "Synchronize Cluster alert Information"
	@handler syncClusterAlertHandler
	post /monitoring/syncClusterAlert (SyncClusterAlertReq)

	@handler taskNumHandler
	get /monitoring/task/num (taskNumReq) returns (taskNumResp)

	@handler adapterInfoHandler
	get /monitoring/adapter/info (adapterInfoReq) returns (adapterInfoResp)

	@handler scheduleSituationHandler
	get /monitoring/schedule/situation  returns (scheduleSituationResp)
}