diff --git a/desc/hpc/pcm-hpc.api b/desc/hpc/pcm-hpc.api index cf0c9a59..6ddcb874 100644 --- a/desc/hpc/pcm-hpc.api +++ b/desc/hpc/pcm-hpc.api @@ -116,6 +116,17 @@ type cancelJobReq { 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"` } diff --git a/desc/pcm.api b/desc/pcm.api index 405a1785..c4e09186 100644 --- a/desc/pcm.api +++ b/desc/pcm.api @@ -209,6 +209,10 @@ service pcm { @doc "删除超算任务" @handler cancelJobHandler delete /hpc/cancelJob (cancelJobReq) + + @doc "查看job状态" + @handler jobInfoHandler + get /hpc/jobInfo (jobInfoReq) returns (jobInfoResp) } //cloud二级接口 diff --git a/go.mod b/go.mod index aeb5ec1d..6d42b6a9 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/robfig/cron/v3 v3.0.1 github.com/zeromicro/go-zero v1.7.3 gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185 - gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241026041404-af824802cfc8 + gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631 gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877 gitlink.org.cn/JointCloud/pcm-octopus v0.0.0-20240817071412-44397870b110 gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240403033338-e7edabad4203 diff --git a/go.sum b/go.sum index fe15a54d..b61a887f 100644 --- a/go.sum +++ b/go.sum @@ -467,8 +467,8 @@ github.com/zeromicro/go-zero v1.7.3 h1:yDUQF2DXDhUHc77/NZF6mzsoRPMBfldjPmG2O/ZSz github.com/zeromicro/go-zero v1.7.3/go.mod h1:9JIW3gHBGuc9LzvjZnNwINIq9QdiKu3AigajLtkJamQ= gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185 h1:B+YBB5xHlIAS6ILuaCGQwbOpr/L6LOHAlj9PeFUCetM= gitlink.org.cn/JointCloud/pcm-ac v0.0.0-20240920093406-601f283f0185/go.mod h1:3eECiw9O2bIFkkePlloKyLNXiqBAhOxNrDoGaaGseGY= -gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241026041404-af824802cfc8 h1:74Sgm3izTWGiENLQQKf/DUCHUds9vU4OigXvYi4d9Pc= -gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241026041404-af824802cfc8/go.mod h1:0tMb2cfE73vdFC3AZmPdfH7NwQYhpwsjdFyh2ZdOfY0= +gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631 h1:udsOCXqZslipOlDEaxaVaG8gRZzieiRhTfSSnJYSc+E= +gitlink.org.cn/JointCloud/pcm-hpc v0.0.0-20241104040331-d3a6eb951631/go.mod h1:2/lG00ZhmS8wURzNSCTLexeGDvqYmZgHbCRnNCSqZaY= gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877 h1:a+1FpxqLPRojlAkJlAeRhKRbxajymXYgrM+s9bfQx0E= gitlink.org.cn/JointCloud/pcm-modelarts v0.0.0-20240918011543-482dcd609877/go.mod h1:/eOmBFZKWGoabG3sRVkVvIbLwsd2631k4jkUBR6x1AA= gitlink.org.cn/JointCloud/pcm-octopus v0.0.0-20240817071412-44397870b110 h1:GaXwr5sgDh0raHjUf9IewTvnRvajYea7zbLsaerYyXo= diff --git a/internal/handler/hpc/jobinfohandler.go b/internal/handler/hpc/jobinfohandler.go new file mode 100644 index 00000000..8c8bc4d5 --- /dev/null +++ b/internal/handler/hpc/jobinfohandler.go @@ -0,0 +1,25 @@ +package hpc + +import ( + "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/repository/result" + "net/http" + + "github.com/zeromicro/go-zero/rest/httpx" + "gitlink.org.cn/JointCloud/pcm-coordinator/internal/logic/hpc" + "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc" + "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types" +) + +func JobInfoHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + var req types.JobInfoReq + if err := httpx.Parse(r, &req); err != nil { + httpx.ErrorCtx(r.Context(), w, err) + return + } + + l := hpc.NewJobInfoLogic(r.Context(), svcCtx) + resp, err := l.JobInfo(&req) + result.HttpResult(r, w, resp, err) + } +} diff --git a/internal/handler/routes.go b/internal/handler/routes.go index bacf662d..2e4467bb 100644 --- a/internal/handler/routes.go +++ b/internal/handler/routes.go @@ -24,41 +24,1043 @@ import ( func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ + { + Method: http.MethodGet, + Path: "/core/participantList", + Handler: core.ParticipantListHandler(serverCtx), + }, { Method: http.MethodPost, - Path: "/adapter/cluster/create", - Handler: adapters.CreateClusterHandler(serverCtx), + Path: "/core/scheduleTaskByYaml", + Handler: core.ScheduleTaskByYamlHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/commitTask", + Handler: core.CommitTaskHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/commitVmTask", + Handler: core.CommitVmTaskHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/asynCommitAiTask", + Handler: core.AsynCommitAiTaskHandler(serverCtx), }, { Method: http.MethodDelete, - Path: "/adapter/cluster/delete", - Handler: adapters.DeleteClusterHandler(serverCtx), + Path: "/core/deleteTask/:id", + Handler: core.DeleteTaskHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/adapter/cluster/get", - Handler: adapters.GetClusterHandler(serverCtx), + Path: "/core/taskList", + Handler: core.TaskListHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/adapter/cluster/list", - Handler: adapters.ClusterListHandler(serverCtx), + Path: "/core/jobTotal", + Handler: core.JobTotalHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/listCenter", + Handler: core.ListCenterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/listCluster/:centerId", + Handler: core.ListClusterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getRegion", + Handler: core.GetRegionHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/listRegion", + Handler: core.ListRegionHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getComputingPower", + Handler: core.GetComputingPowerHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getGeneralInfo", + Handler: core.GetGeneralInfoHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getResourcePanelConfigHandler", + Handler: core.GetResourcePanelConfigHandler(serverCtx), }, { Method: http.MethodPut, - Path: "/adapter/cluster/update", - Handler: adapters.UpdateClusterHandler(serverCtx), + Path: "/core/resourcePanelConfigHandler", + Handler: core.PutResourcePanelConfigHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/adapter/clusterSum", - Handler: adapters.GetClusterSumHandler(serverCtx), + Path: "/core/getComputilityStatistics", + Handler: core.GetComputilityStatisticsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/assets", + Handler: core.NodeAssetsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/centerResources", + Handler: core.CenterResourcesHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/syncClusterLoad", + Handler: core.SyncClusterLoadHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/metrics", + Handler: core.MetricsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/pullTaskInfo", + Handler: core.PullTaskInfoHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/pushTaskInfo", + Handler: core.PushTaskInfoHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/pushResourceInfo", + Handler: core.PushResourceInfoHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/core/pushNotice", + Handler: core.PushNoticeHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/listNotice", + Handler: core.ListNoticeHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/task/list", + Handler: core.PageListTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/task/countTaskStatus", + Handler: core.CountTaskStatusHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/homeOverview", + Handler: core.HomeOverviewHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/task/details", + Handler: core.TaskDetailsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getPublicImage", + Handler: core.GetPublicImageHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getPublicFlavor", + Handler: core.GetPublicFlavorHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getPublicNetwork", + Handler: core.GetPublicNetworkHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getDomainResource", + Handler: core.GetDomainResourceHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getScreenInfo", + Handler: core.GetScreenInfoHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getScreenChart", + Handler: core.GetScreenChartHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getClusterById", + Handler: core.GetClusterByIdHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodPost, + Path: "/hpc/commitHpcTask", + Handler: hpc.CommitHpcTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/overview", + Handler: hpc.OverViewHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/adapterSummary", + Handler: hpc.AdapterSummaryHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/job", + Handler: hpc.JobHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/resource", + Handler: hpc.ResourceHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/queueAssets", + Handler: hpc.QueueAssetsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/hpc/cancelJob", + Handler: hpc.CancelJobHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/hpc/jobInfo", + Handler: hpc.JobInfoHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/task/list", + Handler: cloud.CloudListHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/cloud/DeleteYaml", + Handler: cloud.DeleteYamlHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/cloud/controller/Metrics", + Handler: cloud.ControllerMetricsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/registerCluster", + Handler: cloud.RegisterClusterHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/deleteCluster", + Handler: cloud.DeleteClusterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/clusterList", + Handler: cloud.GetClusterListHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/task/create", + Handler: cloud.CommitGeneralTaskHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/pod/logs", + Handler: cloud.PodLogsHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/ai/trainingTaskStat", + Handler: ai.TrainingTaskStatHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getCenterOverview", + Handler: ai.GetCenterOverviewHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getCenterQueueing", + Handler: ai.GetCenterQueueingHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getCenterList", + Handler: ai.GetCenterListHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getCenterTaskList", + Handler: ai.GetCenterTaskListHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/listDataSet/:projectId", + Handler: ai.ListDataSetHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/createDataSet/:projectId", + Handler: ai.CreateDataSetHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/ai/deleteDataSet/:projectId/:datasetId", + Handler: ai.DeleteDataSetHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateTask/:projectId/:datasetId", + Handler: ai.CreateTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListImport/:projectId/:datasetId", + Handler: ai.ListImportHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/GetListTrainingJobs/:projectId", + Handler: ai.GetListTrainingJobsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/ai/DeleteTrainingJob/:projectId/:trainingJobId", + Handler: ai.DeleteTrainingJobHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateAlgorithm/:projectId", + Handler: ai.CreateAlgorithmHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListAlgorithms/:projectId", + Handler: ai.ListAlgorithmsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/ai/DeleteAlgorithm/:projectId/:algorithmId", + Handler: ai.DeleteAlgorithmHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateTrainingJob/:projectId", + Handler: ai.CreateTrainingJobHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ShowAlgorithmByUuid/:projectId/:algorithmId", + Handler: ai.ShowAlgorithmByUuidHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateExportTask/:projectId/:datasetId", + Handler: ai.CreateExportTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/GetExportTasksOfDataset/:projectId/:datasetId", + Handler: ai.GetExportTasksOfDatasetHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/GetExportTaskStatusOfDataset/:projectId/:resourceId/:taskId", + Handler: ai.GetExportTaskStatusOfDatasetHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateProcessorTask", + Handler: ai.CreateProcessorTaskHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateService/:projectId", + Handler: ai.CreateServiceHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListServices/:projectId", + Handler: ai.ListServicesHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ShowService/:projectId/:serviceId", + Handler: ai.ShowServiceHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/ai/DeleteService/:projectId/:serviceId", + Handler: ai.DeleteServiceHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListClusters", + Handler: ai.ListClustersHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/listNotebook", + Handler: ai.ListNotebookHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/createNotebook", + Handler: ai.CreateNotebookHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/startNotebook", + Handler: ai.StartNotebookHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/stopNotebook", + Handler: ai.StopNotebookHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getNotebookStorage", + Handler: ai.GetNotebookStorageHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/mountNotebookStorage", + Handler: ai.MountNotebookStorageHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/getVisualizationJob", + Handler: ai.GetVisualizationJobHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/CreateVisualizationJob", + Handler: ai.CreateVisualizationJobHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/chat", + Handler: ai.ChatHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/storage/dailyPowerScreen", + Handler: storage.DailyPowerScreenHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/storage/perCenterComputerPowers", + Handler: storage.PerCenterComputerPowersHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/vm/getComputeLimits", + Handler: vm.GetComputeLimitsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getVolumeLimits", + Handler: vm.GetVolumeLimitsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getNetworkNum", + Handler: vm.GetNetworkNumHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getImageNum", + Handler: vm.GetImageNumHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getOpenstackOverview", + Handler: vm.GetOpenstackOverviewHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listServer", + Handler: vm.ListServerHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listServersDetailed", + Handler: vm.ListServersDetailedHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteServer", + Handler: vm.DeleteServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createServer", + Handler: vm.CreateServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createMulServer", + Handler: vm.CreateMulServerHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getServersDetailedById", + Handler: vm.GetServersDetailedByIdHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateServer", + Handler: vm.UpdateServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/startServer", + Handler: vm.StartServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/stopServer", + Handler: vm.StopServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/rebootServer", + Handler: vm.RebootServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/pauseServer", + Handler: vm.PauseServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/unpauseServer", + Handler: vm.UnpauseServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/resizeServer", + Handler: vm.ResizeServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/migrateServer", + Handler: vm.MigrateServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/shelveServer", + Handler: vm.ShelveServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/changeAdministrativePassword", + Handler: vm.ChangeAdministrativePasswordHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/rescueServer", + Handler: vm.RescueServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/unRescueServer", + Handler: vm.UnRescueHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/suspendServer", + Handler: vm.SuspendServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/addSecurityGroupToServer", + Handler: vm.AddSecurityGroupToServerHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/removeSecurityGroup", + Handler: vm.RemoveSecurityGroupHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createFlavor", + Handler: vm.CreateFlavorHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/deleteFlavor", + Handler: vm.DeleteFlavorHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listImages", + Handler: vm.ListImagesHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteImage", + Handler: vm.DeleteImageHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createImage", + Handler: vm.CreateImageHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/uploadImage", + Handler: vm.UploadImageHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listNetworks", + Handler: vm.ListNetworksHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteNetwork", + Handler: vm.DeleteNetworkHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createNetwork", + Handler: vm.CreateNetworkHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createSubnet", + Handler: vm.CreateSubnetHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showNetworkDetails", + Handler: vm.ShowNetworkDetailsHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateNetwork", + Handler: vm.UpdateNetworkHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/bulkCreateNetworks", + Handler: vm.BulkCreateNetworksHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listSubnets", + Handler: vm.ListSubnetsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteSubnet", + Handler: vm.DeleteSubnetHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateSubnet", + Handler: vm.UpdateSubnetHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listNetworkSegmentRanges", + Handler: vm.ListNetworkSegmentRangesRangeHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createNetworkSegmentRange", + Handler: vm.CreateNetworkSegmentRangeHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteNetworkSegmentRanges", + Handler: vm.DeleteNetworkSegmentRangesHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateNetworkSegmentRanges", + Handler: vm.UpdateNetworkSegmentRangesHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showNetworkSegmentRangeDetails", + Handler: vm.ShowNetworkSegmentRangeDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createPort", + Handler: vm.CreatePortHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listPortsReq", + Handler: vm.ListPortsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deletePort", + Handler: vm.DeletePortHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updatePort", + Handler: vm.UpdatePortHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showPortDetails", + Handler: vm.ShowPortDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createRouter", + Handler: vm.CreateRouterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listRouters", + Handler: vm.ListRoutersHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteRouter", + Handler: vm.DeleteRouterHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateRouter", + Handler: vm.UpdateRouterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showRouterDetails", + Handler: vm.ShowRouterDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createFloatingIP", + Handler: vm.CreateFloatingIPHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listFloatingIPs", + Handler: vm.ListFloatingIPsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteFloatingIP", + Handler: vm.DeleteFloatingIPHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateFloatingIP", + Handler: vm.UpdateFloatingIPHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showFloatingIPDetails", + Handler: vm.ShowFloatingIPDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createFirewallGroup", + Handler: vm.CreateFirewallGroupHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listFirewallGroups", + Handler: vm.ListFirewallGroupsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteFirewallGroup", + Handler: vm.DeleteFirewallGroupHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateFirewallGroup", + Handler: vm.UpdateFirewallGroupHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showFirewallGroupDetails", + Handler: vm.ShowFirewallGroupDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createFirewallPolicy", + Handler: vm.CreateFirewallPolicyHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listFirewallPolicies", + Handler: vm.ListFirewallPoliciesHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteFirewallPolicy", + Handler: vm.DeleteFirewallPolicyHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showFirewallRuleDetails", + Handler: vm.ShowFirewallRuleDetailsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showFirewallPolicyDetails", + Handler: vm.ShowFirewallPolicyDetailsHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createFirewallRule", + Handler: vm.CreateFirewallRuleHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listFirewallRules", + Handler: vm.ListFirewallRulesHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteFirewallRule", + Handler: vm.DeleteFirewallRuleHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createSecurityGroup", + Handler: vm.CreateSecurityGroupHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listSecurityGroups", + Handler: vm.ListSecurityGroupsHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteSecurityGroup", + Handler: vm.DeleteSecurityGroupHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateSecurityGroup", + Handler: vm.UpdateSecurityGroupHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showSecurityGroup", + Handler: vm.ShowSecurityGroupHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createSecurityGroupRule", + Handler: vm.CreateSecurityGroupRuleHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listSecurityGroupRules", + Handler: vm.ListSecurityGroupRulesHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteSecurityGroupRule", + Handler: vm.DeleteSecurityGroupRuleHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showSecurityGroupRule", + Handler: vm.ShowSecurityGroupRuleHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listVolumesDetail", + Handler: vm.ListVolumesDetailHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteVolume", + Handler: vm.DeleteVolumeHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createVolume", + Handler: vm.CreateVolumeHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listFlavorsDetail", + Handler: vm.ListFlavorsDetailHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listVolumeTypes", + Handler: vm.ListVolumeTypesHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/vm/updateVolume", + Handler: vm.UpdateVolumeHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createVolumeTypes", + Handler: vm.CreateVolumeTypesHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteVolumeType", + Handler: vm.DeleteVolumeTypeHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listVolumes", + Handler: vm.ListVolumesHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/getVolumeDetailedById", + Handler: vm.GetVolumeDetailedByIdHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/listNodes", + Handler: vm.ListNodesHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/vm/createNode", + Handler: vm.CreateNodeHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/vm/deleteNode", + Handler: vm.DeleteNodeHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/vm/showNodeDetails", + Handler: vm.ShowNodeDetailsHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodPost, + Path: "/storelink/uploadImage", + Handler: storelink.UploadLinkImageHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/storelink/getImageList", + Handler: storelink.GetLinkImageListHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/storelink/deleteImage", + Handler: storelink.DeleteLinkImageHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/storelink/submitTask", + Handler: storelink.SubmitLinkTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/storelink/getTask", + Handler: storelink.GetLinkTaskHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/storelink/deleteTask", + Handler: storelink.DeleteLinkTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/storelink/getParticipants", + Handler: storelink.GetParticipantsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/storelink/getResourceSpecs", + Handler: storelink.GetAISpecsHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/adapter/list", + Handler: adapters.AdaptersListHandler(serverCtx), }, { Method: http.MethodPost, Path: "/adapter/create", Handler: adapters.CreateAdapterHandler(serverCtx), }, + { + Method: http.MethodPut, + Path: "/adapter/update", + Handler: adapters.UpdateAdapterHandler(serverCtx), + }, { Method: http.MethodDelete, Path: "/adapter/delete", @@ -71,13 +1073,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/adapter/getAdapterInfo", - Handler: adapters.GetAdapterInfoHandler(serverCtx), + Path: "/adapter/cluster/list", + Handler: adapters.ClusterListHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/adapter/cluster/create", + Handler: adapters.CreateClusterHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/adapter/cluster/update", + Handler: adapters.UpdateClusterHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/adapter/cluster/delete", + Handler: adapters.DeleteClusterHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/adapter/list", - Handler: adapters.AdaptersListHandler(serverCtx), + Path: "/adapter/cluster/get", + Handler: adapters.GetClusterHandler(serverCtx), }, { Method: http.MethodGet, @@ -85,9 +1102,14 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: adapters.GetAdapterRelationHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/adapter/update", - Handler: adapters.UpdateAdapterHandler(serverCtx), + Method: http.MethodGet, + Path: "/adapter/clusterSum", + Handler: adapters.GetClusterSumHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/getAdapterInfo", + Handler: adapters.GetAdapterInfoHandler(serverCtx), }, }, rest.WithPrefix("/pcm/v1"), @@ -96,495 +1118,64 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ { - // 创建算法 - Method: http.MethodPost, - Path: "/ai/CreateAlgorithm/:projectId", - Handler: ai.CreateAlgorithmHandler(serverCtx), - }, - { - // 创建导出任务 - Method: http.MethodPost, - Path: "/ai/CreateExportTask/:projectId/:datasetId", - Handler: ai.CreateExportTaskHandler(serverCtx), - }, - { - // 创建处理任务 - Method: http.MethodPost, - Path: "/ai/CreateProcessorTask", - Handler: ai.CreateProcessorTaskHandler(serverCtx), - }, - { - // 创建服务 - Method: http.MethodPost, - Path: "/ai/CreateService/:projectId", - Handler: ai.CreateServiceHandler(serverCtx), - }, - { - // 创建导入任务 - Method: http.MethodPost, - Path: "/ai/CreateTask/:projectId/:datasetId", - Handler: ai.CreateTaskHandler(serverCtx), - }, - { - // 创建训练作业 - Method: http.MethodPost, - Path: "/ai/CreateTrainingJob/:projectId", - Handler: ai.CreateTrainingJobHandler(serverCtx), - }, - { - // 创建虚拟化任务 - Method: http.MethodPost, - Path: "/ai/CreateVisualizationJob", - Handler: ai.CreateVisualizationJobHandler(serverCtx), - }, - { - // 删除算法 - Method: http.MethodDelete, - Path: "/ai/DeleteAlgorithm/:projectId/:algorithmId", - Handler: ai.DeleteAlgorithmHandler(serverCtx), - }, - { - // 删除服务 - Method: http.MethodDelete, - Path: "/ai/DeleteService/:projectId/:serviceId", - Handler: ai.DeleteServiceHandler(serverCtx), - }, - { - // 删除训练作业 - Method: http.MethodDelete, - Path: "/ai/DeleteTrainingJob/:projectId/:trainingJobId", - Handler: ai.DeleteTrainingJobHandler(serverCtx), - }, - { - // 获取导出任务数据集状态 Method: http.MethodGet, - Path: "/ai/GetExportTaskStatusOfDataset/:projectId/:resourceId/:taskId", - Handler: ai.GetExportTaskStatusOfDatasetHandler(serverCtx), + Path: "/schedule/ai/getResourceTypes", + Handler: schedule.ScheduleGetAiResourceTypesHandler(serverCtx), }, { - // 获取导出任务数据集 Method: http.MethodGet, - Path: "/ai/GetExportTasksOfDataset/:projectId/:datasetId", - Handler: ai.GetExportTasksOfDatasetHandler(serverCtx), + Path: "/schedule/ai/getTaskTypes", + Handler: schedule.ScheduleGetAiTaskTypesHandler(serverCtx), }, { - // 查询训练作业列表 Method: http.MethodGet, - Path: "/ai/GetListTrainingJobs/:projectId", - Handler: ai.GetListTrainingJobsHandler(serverCtx), + Path: "/schedule/ai/getDatasets/:adapterId", + Handler: schedule.ScheduleGetDatasetsHandler(serverCtx), }, { - // 查询创建算法列表 Method: http.MethodGet, - Path: "/ai/ListAlgorithms/:projectId", - Handler: ai.ListAlgorithmsHandler(serverCtx), + Path: "/schedule/ai/getStrategies", + Handler: schedule.ScheduleGetStrategyHandler(serverCtx), }, { - // 查询专属资源池列表 Method: http.MethodGet, - Path: "/ai/ListClusters", - Handler: ai.ListClustersHandler(serverCtx), + Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset", + Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx), }, { - // 查询数据集导入任务列表 Method: http.MethodGet, - Path: "/ai/ListImport/:projectId/:datasetId", - Handler: ai.ListImportHandler(serverCtx), - }, - { - // 展示服务 - Method: http.MethodGet, - Path: "/ai/ListServices/:projectId", - Handler: ai.ListServicesHandler(serverCtx), - }, - { - // 展示算法详情 - Method: http.MethodGet, - Path: "/ai/ShowAlgorithmByUuid/:projectId/:algorithmId", - Handler: ai.ShowAlgorithmByUuidHandler(serverCtx), - }, - { - // 展示服务详情 - Method: http.MethodGet, - Path: "/ai/ShowService/:projectId/:serviceId", - Handler: ai.ShowServiceHandler(serverCtx), - }, - { - // 文本识别 - Method: http.MethodPost, - Path: "/ai/chat", - Handler: ai.ChatHandler(serverCtx), - }, - { - // 创建数据集 - Method: http.MethodPost, - Path: "/ai/createDataSet/:projectId", - Handler: ai.CreateDataSetHandler(serverCtx), - }, - { - // 创建notebook - Method: http.MethodPost, - Path: "/ai/createNotebook", - Handler: ai.CreateNotebookHandler(serverCtx), - }, - { - // 删除数据集 - Method: http.MethodDelete, - Path: "/ai/deleteDataSet/:projectId/:datasetId", - Handler: ai.DeleteDataSetHandler(serverCtx), - }, - { - // 智算中心列表 - Method: http.MethodGet, - Path: "/ai/getCenterList", - Handler: ai.GetCenterListHandler(serverCtx), - }, - { - // 智算中心概览 - Method: http.MethodGet, - Path: "/ai/getCenterOverview", - Handler: ai.GetCenterOverviewHandler(serverCtx), - }, - { - // 智算中心排队状况 - Method: http.MethodGet, - Path: "/ai/getCenterQueueing", - Handler: ai.GetCenterQueueingHandler(serverCtx), - }, - { - // 智算中心任务列表 - Method: http.MethodGet, - Path: "/ai/getCenterTaskList", - Handler: ai.GetCenterTaskListHandler(serverCtx), - }, - { - // 查询notebook存储 - Method: http.MethodGet, - Path: "/ai/getNotebookStorage", - Handler: ai.GetNotebookStorageHandler(serverCtx), - }, - { - // 获取虚拟化任务 - Method: http.MethodGet, - Path: "/ai/getVisualizationJob", - Handler: ai.GetVisualizationJobHandler(serverCtx), - }, - { - // 查询数据集列表 - Method: http.MethodGet, - Path: "/ai/listDataSet/:projectId", - Handler: ai.ListDataSetHandler(serverCtx), - }, - { - // 查询notebook列表 - Method: http.MethodGet, - Path: "/ai/listNotebook", - Handler: ai.ListNotebookHandler(serverCtx), - }, - { - // 挂载notebook存储 - Method: http.MethodPost, - Path: "/ai/mountNotebookStorage", - Handler: ai.MountNotebookStorageHandler(serverCtx), - }, - { - // 启动notebook - Method: http.MethodPost, - Path: "/ai/startNotebook", - Handler: ai.StartNotebookHandler(serverCtx), - }, - { - // 停止notebook - Method: http.MethodPost, - Path: "/ai/stopNotebook", - Handler: ai.StopNotebookHandler(serverCtx), - }, - { - // 训练任务统计 - Method: http.MethodGet, - Path: "/ai/trainingTaskStat", - Handler: ai.TrainingTaskStatHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - // yaml删除 - Method: http.MethodGet, - Path: "/cloud/DeleteYaml", - Handler: cloud.DeleteYamlHandler(serverCtx), - }, - { - // 控制器监控 - Method: http.MethodGet, - Path: "/cloud/controller/Metrics", - Handler: cloud.ControllerMetricsHandler(serverCtx), - }, - { - // 数算集群删除 - Method: http.MethodPost, - Path: "/cloud/deleteCluster", - Handler: cloud.DeleteClusterHandler(serverCtx), + Path: "/schedule/ai/getJobLog/:adapterId/:clusterId/:taskId/:instanceNum", + Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx), }, { Method: http.MethodPost, - Path: "/cloud/pod/logs", - Handler: cloud.PodLogsHandler(serverCtx), + Path: "/schedule/submit", + Handler: schedule.ScheduleSubmitHandler(serverCtx), }, { - // 数算集群注册 Method: http.MethodPost, - Path: "/cloud/registerCluster", - Handler: cloud.RegisterClusterHandler(serverCtx), + Path: "/schedule/getOverview", + Handler: schedule.ScheduleGetOverviewHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/schedule/downloadAlgorithmCode", + Handler: schedule.DownloadAlgothmCodeHandler(serverCtx), }, { - // Create cloud computing common tasks Method: http.MethodPost, - Path: "/cloud/task/create", - Handler: cloud.CommitGeneralTaskHandler(serverCtx), + Path: "/schedule/uploadAlgorithmCode", + Handler: schedule.UploadAlgothmCodeHandler(serverCtx), }, { - // Obtain cluster list information according to adapterId Method: http.MethodGet, - Path: "/core/clusterList", - Handler: cloud.GetClusterListHandler(serverCtx), + Path: "/schedule/getComputeCardsByCluster/:adapterId/:clusterId", + Handler: schedule.GetComputeCardsByClusterHandler(serverCtx), }, { - // 云算任务列表 Method: http.MethodGet, - Path: "/task/list", - Handler: cloud.CloudListHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - // 获取节点资产 - Method: http.MethodGet, - Path: "/core/assets", - Handler: core.NodeAssetsHandler(serverCtx), - }, - { - // 异步提交智算任务 - Method: http.MethodPost, - Path: "/core/asynCommitAiTask", - Handler: core.AsynCommitAiTaskHandler(serverCtx), - }, - { - // Center Resources top3 - Method: http.MethodGet, - Path: "/core/centerResources", - Handler: core.CenterResourcesHandler(serverCtx), - }, - { - // 提交任务 - Method: http.MethodPost, - Path: "/core/commitTask", - Handler: core.CommitTaskHandler(serverCtx), - }, - { - // 提交虚拟机任务 - Method: http.MethodPost, - Path: "/core/commitVmTask", - Handler: core.CommitVmTaskHandler(serverCtx), - }, - { - // 删除任务 - Method: http.MethodDelete, - Path: "/core/deleteTask/:id", - Handler: core.DeleteTaskHandler(serverCtx), - }, - { - // 根据集群id获取集群信息 - Method: http.MethodGet, - Path: "/core/getClusterById", - Handler: core.GetClusterByIdHandler(serverCtx), - }, - { - // 获取算力统计信息 - Method: http.MethodGet, - Path: "/core/getComputilityStatistics", - Handler: core.GetComputilityStatisticsHandler(serverCtx), - }, - { - // 查询算力 - Method: http.MethodGet, - Path: "/core/getComputingPower", - Handler: core.GetComputingPowerHandler(serverCtx), - }, - { - // screen - Method: http.MethodGet, - Path: "/core/getDomainResource", - Handler: core.GetDomainResourceHandler(serverCtx), - }, - { - // 查询通用信息 - Method: http.MethodGet, - Path: "/core/getGeneralInfo", - Handler: core.GetGeneralInfoHandler(serverCtx), - }, - { - // Get Public Flavor - Method: http.MethodGet, - Path: "/core/getPublicFlavor", - Handler: core.GetPublicFlavorHandler(serverCtx), - }, - { - // Get Public Image - Method: http.MethodGet, - Path: "/core/getPublicImage", - Handler: core.GetPublicImageHandler(serverCtx), - }, - { - // Get Public Network - Method: http.MethodGet, - Path: "/core/getPublicNetwork", - Handler: core.GetPublicNetworkHandler(serverCtx), - }, - { - // 获取region - Method: http.MethodGet, - Path: "/core/getRegion", - Handler: core.GetRegionHandler(serverCtx), - }, - { - // 查询控制面板配置信息 - Method: http.MethodGet, - Path: "/core/getResourcePanelConfigHandler", - Handler: core.GetResourcePanelConfigHandler(serverCtx), - }, - { - // screen - Method: http.MethodGet, - Path: "/core/getScreenChart", - Handler: core.GetScreenChartHandler(serverCtx), - }, - { - // screen - Method: http.MethodGet, - Path: "/core/getScreenInfo", - Handler: core.GetScreenInfoHandler(serverCtx), - }, - { - // Home Page Overview - Method: http.MethodGet, - Path: "/core/homeOverview", - Handler: core.HomeOverviewHandler(serverCtx), - }, - { - // 任务概览 - Method: http.MethodGet, - Path: "/core/jobTotal", - Handler: core.JobTotalHandler(serverCtx), - }, - { - // 数据中心概览 - Method: http.MethodGet, - Path: "/core/listCenter", - Handler: core.ListCenterHandler(serverCtx), - }, - { - // 查询集群列表 - Method: http.MethodGet, - Path: "/core/listCluster/:centerId", - Handler: core.ListClusterHandler(serverCtx), - }, - { - // list notice - Method: http.MethodGet, - Path: "/core/listNotice", - Handler: core.ListNoticeHandler(serverCtx), - }, - { - // 获取region列表 - Method: http.MethodGet, - Path: "/core/listRegion", - Handler: core.ListRegionHandler(serverCtx), - }, - { - // metrics - Method: http.MethodGet, - Path: "/core/metrics", - Handler: core.MetricsHandler(serverCtx), - }, - { - // 查询P端服务列表 - Method: http.MethodGet, - Path: "/core/participantList", - Handler: core.ParticipantListHandler(serverCtx), - }, - { - // provide for adapter to pull task info from core - Method: http.MethodGet, - Path: "/core/pullTaskInfo", - Handler: core.PullTaskInfoHandler(serverCtx), - }, - { - // provide for adapter to push notice info to core - Method: http.MethodPost, - Path: "/core/pushNotice", - Handler: core.PushNoticeHandler(serverCtx), - }, - { - // provide for adapter to push resource info to core - Method: http.MethodPost, - Path: "/core/pushResourceInfo", - Handler: core.PushResourceInfoHandler(serverCtx), - }, - { - // provide for adapter to push task info to core - Method: http.MethodPost, - Path: "/core/pushTaskInfo", - Handler: core.PushTaskInfoHandler(serverCtx), - }, - { - // 设置控制面板配置信息 - Method: http.MethodPut, - Path: "/core/resourcePanelConfigHandler", - Handler: core.PutResourcePanelConfigHandler(serverCtx), - }, - { - // yaml提交任务 - Method: http.MethodPost, - Path: "/core/scheduleTaskByYaml", - Handler: core.ScheduleTaskByYamlHandler(serverCtx), - }, - { - // Synchronize Cluster Load Information - Method: http.MethodPost, - Path: "/core/syncClusterLoad", - Handler: core.SyncClusterLoadHandler(serverCtx), - }, - { - // Statistical task status - Method: http.MethodGet, - Path: "/core/task/countTaskStatus", - Handler: core.CountTaskStatusHandler(serverCtx), - }, - { - // task details - Method: http.MethodGet, - Path: "/core/task/details", - Handler: core.TaskDetailsHandler(serverCtx), - }, - { - // paging queries the task list - Method: http.MethodGet, - Path: "/core/task/list", - Handler: core.PageListTaskHandler(serverCtx), - }, - { - // 查询任务列表 - Method: http.MethodGet, - Path: "/core/taskList", - Handler: core.TaskListHandler(serverCtx), + Path: "/schedule/getClusterBalanceById/:adapterId/:clusterId", + Handler: schedule.GetClusterBalanceByIdHandler(serverCtx), }, }, rest.WithPrefix("/pcm/v1"), @@ -594,148 +1185,19 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Route{ { Method: http.MethodPost, - Path: "/dict", - Handler: dictionary.AddDictHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/dict", - Handler: dictionary.EditDictHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/dict/:id", - Handler: dictionary.GetDictHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/dict/:id", - Handler: dictionary.DeleteDictHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/dictItem", - Handler: dictionary.AddDictItemHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/dictItem", - Handler: dictionary.EditDictItemHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/dictItem/:id", - Handler: dictionary.GetDictItemHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/dictItem/:id", - Handler: dictionary.DeleteDictItemHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/dictItem/code/:dictCode", - Handler: dictionary.ListDictItemByCodeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/dictItems", - Handler: dictionary.ListDictItemHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/dicts", - Handler: dictionary.ListDictHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - // 超算适配器列表 - Method: http.MethodGet, - Path: "/hpc/adapterSummary", - Handler: hpc.AdapterSummaryHandler(serverCtx), - }, - { - // 删除超算任务 - Method: http.MethodDelete, - Path: "/hpc/cancelJob", - Handler: hpc.CancelJobHandler(serverCtx), - }, - { - // 提交超算任务 - Method: http.MethodPost, - Path: "/hpc/commitHpcTask", - Handler: hpc.CommitHpcTaskHandler(serverCtx), - }, - { - // 超算查询任务列表 - Method: http.MethodGet, - Path: "/hpc/job", - Handler: hpc.JobHandler(serverCtx), - }, - { - // 超算总览 - Method: http.MethodGet, - Path: "/hpc/overview", - Handler: hpc.OverViewHandler(serverCtx), - }, - { - // 超算查询资产列表 - Method: http.MethodGet, - Path: "/hpc/queueAssets", - Handler: hpc.QueueAssetsHandler(serverCtx), - }, - { - // 超算资源总览 - Method: http.MethodGet, - Path: "/hpc/resource", - Handler: hpc.ResourceHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodPost, - Path: "/inference/createDeployTask", - Handler: inference.CreateDeployTaskHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/inference/deployInstanceList", - Handler: inference.DeployInstanceListHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/inference/deployInstanceStat", - Handler: inference.DeployInstanceStatHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/inference/getAdaptersByModel", - Handler: inference.GetAdaptersByModelHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/inference/getDeployTasksByType", - Handler: inference.GetDeployTasksByTypeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/inference/getRunningInstanceById", - Handler: inference.GetRunningInstanceByIdHandler(serverCtx), + Path: "/inference/text", + Handler: inference.TextToTextInferenceHandler(serverCtx), }, { Method: http.MethodPost, Path: "/inference/images", Handler: inference.ImageInferenceHandler(serverCtx), }, + { + Method: http.MethodGet, + Path: "/inference/modelTypes", + Handler: inference.ModelTypesHandler(serverCtx), + }, { Method: http.MethodGet, Path: "/inference/instanceCenter", @@ -748,24 +1210,19 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/inference/modelTypes", - Handler: inference.ModelTypesHandler(serverCtx), + Path: "/inference/taskDetail", + Handler: inference.InferenceTaskDetailHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/inference/startAll", - Handler: inference.StartAllByDeployTaskIdHandler(serverCtx), + Method: http.MethodGet, + Path: "/inference/deployInstanceList", + Handler: inference.DeployInstanceListHandler(serverCtx), }, { Method: http.MethodPost, Path: "/inference/startDeployInstance", Handler: inference.StartDeployInstanceListHandler(serverCtx), }, - { - Method: http.MethodPost, - Path: "/inference/stopAll", - Handler: inference.StopAllByDeployTaskIdHandler(serverCtx), - }, { Method: http.MethodPost, Path: "/inference/stopDeployInstance", @@ -773,8 +1230,8 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/inference/taskDetail", - Handler: inference.InferenceTaskDetailHandler(serverCtx), + Path: "/inference/deployInstanceStat", + Handler: inference.DeployInstanceStatHandler(serverCtx), }, { Method: http.MethodGet, @@ -783,8 +1240,33 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodPost, - Path: "/inference/text", - Handler: inference.TextToTextInferenceHandler(serverCtx), + Path: "/inference/startAll", + Handler: inference.StartAllByDeployTaskIdHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/inference/stopAll", + Handler: inference.StopAllByDeployTaskIdHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/inference/getRunningInstanceById", + Handler: inference.GetRunningInstanceByIdHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/inference/getDeployTasksByType", + Handler: inference.GetDeployTasksByTypeHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/inference/createDeployTask", + Handler: inference.CreateDeployTaskHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/inference/getAdaptersByModel", + Handler: inference.GetAdaptersByModelHandler(serverCtx), }, }, rest.WithPrefix("/pcm/v1"), @@ -794,22 +1276,71 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Route{ { Method: http.MethodGet, - Path: "/monitoring/adapter/info", - Handler: monitoring.AdapterInfoHandler(serverCtx), + Path: "/dict/:id", + Handler: dictionary.GetDictHandler(serverCtx), }, { - // alert list Method: http.MethodGet, - Path: "/monitoring/alert/list", - Handler: monitoring.AlertListHandler(serverCtx), + Path: "/dicts", + Handler: dictionary.ListDictHandler(serverCtx), }, + { + Method: http.MethodPost, + Path: "/dict", + Handler: dictionary.AddDictHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/dict", + Handler: dictionary.EditDictHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/dict/:id", + Handler: dictionary.DeleteDictHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/dictItem/:id", + Handler: dictionary.GetDictItemHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/dictItems", + Handler: dictionary.ListDictItemHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/dictItem", + Handler: dictionary.AddDictItemHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/dictItem", + Handler: dictionary.EditDictItemHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/dictItem/:id", + Handler: dictionary.DeleteDictItemHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/dictItem/code/:dictCode", + Handler: dictionary.ListDictItemByCodeHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ { Method: http.MethodPost, Path: "/monitoring/alert/rule", Handler: monitoring.CreateAlertRuleHandler(serverCtx), }, { - // alert rules Method: http.MethodGet, Path: "/monitoring/alert/rule", Handler: monitoring.AlertRulesHandler(serverCtx), @@ -820,24 +1351,21 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: monitoring.DeleteAlertRuleHandler(serverCtx), }, { - // cluster resource load Method: http.MethodGet, Path: "/monitoring/cluster/load", Handler: monitoring.ClustersLoadHandler(serverCtx), }, { - // node resource load Method: http.MethodGet, Path: "/monitoring/node/top", Handler: monitoring.NodesLoadTopHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/monitoring/schedule/situation", - Handler: monitoring.ScheduleSituationHandler(serverCtx), + Path: "/monitoring/alert/list", + Handler: monitoring.AlertListHandler(serverCtx), }, { - // Synchronize Cluster alert Information Method: http.MethodPost, Path: "/monitoring/syncClusterAlert", Handler: monitoring.SyncClusterAlertHandler(serverCtx), @@ -847,729 +1375,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/monitoring/task/num", Handler: monitoring.TaskNumHandler(serverCtx), }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ { Method: http.MethodGet, - Path: "/schedule/ai/getAlgorithms/:adapterId/:resourceType/:taskType/:dataset", - Handler: schedule.ScheduleGetAlgorithmsHandler(serverCtx), + Path: "/monitoring/adapter/info", + Handler: monitoring.AdapterInfoHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/schedule/ai/getDatasets/:adapterId", - Handler: schedule.ScheduleGetDatasetsHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/ai/getJobLog/:adapterId/:clusterId/:taskId/:instanceNum", - Handler: schedule.ScheduleGetAiJobLogLogHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/ai/getResourceTypes", - Handler: schedule.ScheduleGetAiResourceTypesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/ai/getStrategies", - Handler: schedule.ScheduleGetStrategyHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/ai/getTaskTypes", - Handler: schedule.ScheduleGetAiTaskTypesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/downloadAlgorithmCode", - Handler: schedule.DownloadAlgothmCodeHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/getClusterBalanceById/:adapterId/:clusterId", - Handler: schedule.GetClusterBalanceByIdHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/getComputeCardsByCluster/:adapterId/:clusterId", - Handler: schedule.GetComputeCardsByClusterHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/schedule/getOverview", - Handler: schedule.ScheduleGetOverviewHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/schedule/submit", - Handler: schedule.ScheduleSubmitHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/schedule/uploadAlgorithmCode", - Handler: schedule.UploadAlgothmCodeHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - // 日常算力查询 - Method: http.MethodGet, - Path: "/storage/dailyPowerScreen", - Handler: storage.DailyPowerScreenHandler(serverCtx), - }, - { - // 算力中心算力情况 - Method: http.MethodGet, - Path: "/storage/perCenterComputerPowers", - Handler: storage.PerCenterComputerPowersHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodDelete, - Path: "/storelink/deleteImage", - Handler: storelink.DeleteLinkImageHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/storelink/deleteTask", - Handler: storelink.DeleteLinkTaskHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/storelink/getImageList", - Handler: storelink.GetLinkImageListHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/storelink/getParticipants", - Handler: storelink.GetParticipantsHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/storelink/getResourceSpecs", - Handler: storelink.GetAISpecsHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/storelink/getTask", - Handler: storelink.GetLinkTaskHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/storelink/submitTask", - Handler: storelink.SubmitLinkTaskHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/storelink/uploadImage", - Handler: storelink.UploadLinkImageHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - // 将安全组添加到服务器 - Method: http.MethodPost, - Path: "/vm/addSecurityGroupToServer", - Handler: vm.AddSecurityGroupToServerHandler(serverCtx), - }, - { - // 批量创建网络 - Method: http.MethodPost, - Path: "/vm/bulkCreateNetworks", - Handler: vm.BulkCreateNetworksHandler(serverCtx), - }, - { - // 设置密码 - Method: http.MethodPost, - Path: "/vm/changeAdministrativePassword", - Handler: vm.ChangeAdministrativePasswordHandler(serverCtx), - }, - { - // 创建防火墙 - Method: http.MethodPost, - Path: "/vm/createFirewallGroup", - Handler: vm.CreateFirewallGroupHandler(serverCtx), - }, - { - // 创建防火墙策略 - Method: http.MethodPost, - Path: "/vm/createFirewallPolicy", - Handler: vm.CreateFirewallPolicyHandler(serverCtx), - }, - { - // 创建防火墙策略 - Method: http.MethodPost, - Path: "/vm/createFirewallRule", - Handler: vm.CreateFirewallRuleHandler(serverCtx), - }, - { - // 创建规格 - Method: http.MethodPost, - Path: "/vm/createFlavor", - Handler: vm.CreateFlavorHandler(serverCtx), - }, - { - // 创建浮动ip - Method: http.MethodPost, - Path: "/vm/createFloatingIP", - Handler: vm.CreateFloatingIPHandler(serverCtx), - }, - { - // 创建镜像 - Method: http.MethodPost, - Path: "/vm/createImage", - Handler: vm.CreateImageHandler(serverCtx), - }, - { - // 跨域创建虚拟机 - Method: http.MethodPost, - Path: "/vm/createMulServer", - Handler: vm.CreateMulServerHandler(serverCtx), - }, - { - // 创建网络 - Method: http.MethodPost, - Path: "/vm/createNetwork", - Handler: vm.CreateNetworkHandler(serverCtx), - }, - { - // 创建网段 - Method: http.MethodPost, - Path: "/vm/createNetworkSegmentRange", - Handler: vm.CreateNetworkSegmentRangeHandler(serverCtx), - }, - { - // 创建节点 - Method: http.MethodPost, - Path: "/vm/createNode", - Handler: vm.CreateNodeHandler(serverCtx), - }, - { - // 创建端口 - Method: http.MethodPost, - Path: "/vm/createPort", - Handler: vm.CreatePortHandler(serverCtx), - }, - { - // 创建路由 - Method: http.MethodPost, - Path: "/vm/createRouter", - Handler: vm.CreateRouterHandler(serverCtx), - }, - { - // 创建安全组 - Method: http.MethodPost, - Path: "/vm/createSecurityGroup", - Handler: vm.CreateSecurityGroupHandler(serverCtx), - }, - { - // 创建安全组规则 - Method: http.MethodPost, - Path: "/vm/createSecurityGroupRule", - Handler: vm.CreateSecurityGroupRuleHandler(serverCtx), - }, - { - // 创建虚拟机 - Method: http.MethodPost, - Path: "/vm/createServer", - Handler: vm.CreateServerHandler(serverCtx), - }, - { - // 创建子网 - Method: http.MethodPost, - Path: "/vm/createSubnet", - Handler: vm.CreateSubnetHandler(serverCtx), - }, - { - // 创建卷 - Method: http.MethodPost, - Path: "/vm/createVolume", - Handler: vm.CreateVolumeHandler(serverCtx), - }, - { - // 创建卷类型 - Method: http.MethodPost, - Path: "/vm/createVolumeTypes", - Handler: vm.CreateVolumeTypesHandler(serverCtx), - }, - { - // 删除防火墙 - Method: http.MethodDelete, - Path: "/vm/deleteFirewallGroup", - Handler: vm.DeleteFirewallGroupHandler(serverCtx), - }, - { - // 删除防火墙策略 - Method: http.MethodDelete, - Path: "/vm/deleteFirewallPolicy", - Handler: vm.DeleteFirewallPolicyHandler(serverCtx), - }, - { - // 删除防火墙策略 - Method: http.MethodDelete, - Path: "/vm/deleteFirewallRule", - Handler: vm.DeleteFirewallRuleHandler(serverCtx), - }, - { - // 创建规格 - Method: http.MethodPost, - Path: "/vm/deleteFlavor", - Handler: vm.DeleteFlavorHandler(serverCtx), - }, - { - // 删除浮动ip - Method: http.MethodDelete, - Path: "/vm/deleteFloatingIP", - Handler: vm.DeleteFloatingIPHandler(serverCtx), - }, - { - // 删除镜像 - Method: http.MethodDelete, - Path: "/vm/deleteImage", - Handler: vm.DeleteImageHandler(serverCtx), - }, - { - // 删除网络 - Method: http.MethodDelete, - Path: "/vm/deleteNetwork", - Handler: vm.DeleteNetworkHandler(serverCtx), - }, - { - // 删除网段 - Method: http.MethodDelete, - Path: "/vm/deleteNetworkSegmentRanges", - Handler: vm.DeleteNetworkSegmentRangesHandler(serverCtx), - }, - { - // 删除节点 - Method: http.MethodDelete, - Path: "/vm/deleteNode", - Handler: vm.DeleteNodeHandler(serverCtx), - }, - { - // 删除端口 - Method: http.MethodDelete, - Path: "/vm/deletePort", - Handler: vm.DeletePortHandler(serverCtx), - }, - { - // 删除路由 - Method: http.MethodDelete, - Path: "/vm/deleteRouter", - Handler: vm.DeleteRouterHandler(serverCtx), - }, - { - // 删除安全组 - Method: http.MethodDelete, - Path: "/vm/deleteSecurityGroup", - Handler: vm.DeleteSecurityGroupHandler(serverCtx), - }, - { - // 删除安全组规则 - Method: http.MethodDelete, - Path: "/vm/deleteSecurityGroupRule", - Handler: vm.DeleteSecurityGroupRuleHandler(serverCtx), - }, - { - // 删除虚拟机 - Method: http.MethodDelete, - Path: "/vm/deleteServer", - Handler: vm.DeleteServerHandler(serverCtx), - }, - { - // 删除子网 - Method: http.MethodDelete, - Path: "/vm/deleteSubnet", - Handler: vm.DeleteSubnetHandler(serverCtx), - }, - { - // 删除卷 - Method: http.MethodDelete, - Path: "/vm/deleteVolume", - Handler: vm.DeleteVolumeHandler(serverCtx), - }, - { - // 删除卷类型 - Method: http.MethodDelete, - Path: "/vm/deleteVolumeType", - Handler: vm.DeleteVolumeTypeHandler(serverCtx), - }, - { - // openstack计算中心概览 - Method: http.MethodGet, - Path: "/vm/getComputeLimits", - Handler: vm.GetComputeLimitsHandler(serverCtx), - }, - { - // 查询镜像数量 - Method: http.MethodGet, - Path: "/vm/getImageNum", - Handler: vm.GetImageNumHandler(serverCtx), - }, - { - // 查询网络数量 - Method: http.MethodGet, - Path: "/vm/getNetworkNum", - Handler: vm.GetNetworkNumHandler(serverCtx), - }, - { - // 查询虚拟机概览数据 - Method: http.MethodGet, - Path: "/vm/getOpenstackOverview", - Handler: vm.GetOpenstackOverviewHandler(serverCtx), - }, - { - // 根据ID查询虚拟机详情 - Method: http.MethodGet, - Path: "/vm/getServersDetailedById", - Handler: vm.GetServersDetailedByIdHandler(serverCtx), - }, - { - // 根据ID获取卷详情 - Method: http.MethodGet, - Path: "/vm/getVolumeDetailedById", - Handler: vm.GetVolumeDetailedByIdHandler(serverCtx), - }, - { - // 查询卷列表 - Method: http.MethodGet, - Path: "/vm/getVolumeLimits", - Handler: vm.GetVolumeLimitsHandler(serverCtx), - }, - { - // 查询防火墙列表 - Method: http.MethodGet, - Path: "/vm/listFirewallGroups", - Handler: vm.ListFirewallGroupsHandler(serverCtx), - }, - { - // 查询防火墙策略列表 - Method: http.MethodGet, - Path: "/vm/listFirewallPolicies", - Handler: vm.ListFirewallPoliciesHandler(serverCtx), - }, - { - // 查询防火墙策略列表 - Method: http.MethodGet, - Path: "/vm/listFirewallRules", - Handler: vm.ListFirewallRulesHandler(serverCtx), - }, - { - // 查询规格详情列表 - Method: http.MethodGet, - Path: "/vm/listFlavorsDetail", - Handler: vm.ListFlavorsDetailHandler(serverCtx), - }, - { - // 查询浮动ip列表 - Method: http.MethodGet, - Path: "/vm/listFloatingIPs", - Handler: vm.ListFloatingIPsHandler(serverCtx), - }, - { - // 查询镜像列表 - Method: http.MethodGet, - Path: "/vm/listImages", - Handler: vm.ListImagesHandler(serverCtx), - }, - { - // 查询网络列表 - Method: http.MethodGet, - Path: "/vm/listNetworkSegmentRanges", - Handler: vm.ListNetworkSegmentRangesRangeHandler(serverCtx), - }, - { - // 查询网络列表 - Method: http.MethodGet, - Path: "/vm/listNetworks", - Handler: vm.ListNetworksHandler(serverCtx), - }, - { - // 查询节点列表 - Method: http.MethodGet, - Path: "/vm/listNodes", - Handler: vm.ListNodesHandler(serverCtx), - }, - { - // 查询端口列表 - Method: http.MethodGet, - Path: "/vm/listPortsReq", - Handler: vm.ListPortsHandler(serverCtx), - }, - { - // 查询路由列表 - Method: http.MethodGet, - Path: "/vm/listRouters", - Handler: vm.ListRoutersHandler(serverCtx), - }, - { - // 查询安全组规则列表 - Method: http.MethodGet, - Path: "/vm/listSecurityGroupRules", - Handler: vm.ListSecurityGroupRulesHandler(serverCtx), - }, - { - // 查询安全组列表 - Method: http.MethodGet, - Path: "/vm/listSecurityGroups", - Handler: vm.ListSecurityGroupsHandler(serverCtx), - }, - { - // 查询虚拟机列表 - Method: http.MethodGet, - Path: "/vm/listServer", - Handler: vm.ListServerHandler(serverCtx), - }, - { - // 查询虚拟机详情列表 - Method: http.MethodGet, - Path: "/vm/listServersDetailed", - Handler: vm.ListServersDetailedHandler(serverCtx), - }, - { - // 查询子网列表 - Method: http.MethodGet, - Path: "/vm/listSubnets", - Handler: vm.ListSubnetsHandler(serverCtx), - }, - { - // 查询规格类型列表 - Method: http.MethodGet, - Path: "/vm/listVolumeTypes", - Handler: vm.ListVolumeTypesHandler(serverCtx), - }, - { - // 查询卷列表 - Method: http.MethodGet, - Path: "/vm/listVolumes", - Handler: vm.ListVolumesHandler(serverCtx), - }, - { - // 查询卷详情列表 - Method: http.MethodGet, - Path: "/vm/listVolumesDetail", - Handler: vm.ListVolumesDetailHandler(serverCtx), - }, - { - // 迁移 - Method: http.MethodPost, - Path: "/vm/migrateServer", - Handler: vm.MigrateServerHandler(serverCtx), - }, - { - // 暂停虚拟机 - Method: http.MethodPost, - Path: "/vm/pauseServer", - Handler: vm.PauseServerHandler(serverCtx), - }, - { - // 重启虚拟机 - Method: http.MethodPost, - Path: "/vm/rebootServer", - Handler: vm.RebootServerHandler(serverCtx), - }, - { - // 从服务器中删除安全 - Method: http.MethodPost, - Path: "/vm/removeSecurityGroup", - Handler: vm.RemoveSecurityGroupHandler(serverCtx), - }, - { - // 救援 - Method: http.MethodPost, - Path: "/vm/rescueServer", - Handler: vm.RescueServerHandler(serverCtx), - }, - { - // 调整大小 - Method: http.MethodPost, - Path: "/vm/resizeServer", - Handler: vm.ResizeServerHandler(serverCtx), - }, - { - // 搁置 - Method: http.MethodPost, - Path: "/vm/shelveServer", - Handler: vm.ShelveServerHandler(serverCtx), - }, - { - // 查询防火墙详情 - Method: http.MethodGet, - Path: "/vm/showFirewallGroupDetails", - Handler: vm.ShowFirewallGroupDetailsHandler(serverCtx), - }, - { - // 查询防火墙策略详情 - Method: http.MethodGet, - Path: "/vm/showFirewallPolicyDetails", - Handler: vm.ShowFirewallPolicyDetailsHandler(serverCtx), - }, - { - // 查询防火墙策略详情 - Method: http.MethodGet, - Path: "/vm/showFirewallRuleDetails", - Handler: vm.ShowFirewallRuleDetailsHandler(serverCtx), - }, - { - // 查询浮动ip详情 - Method: http.MethodGet, - Path: "/vm/showFloatingIPDetails", - Handler: vm.ShowFloatingIPDetailsHandler(serverCtx), - }, - { - // 查询网络详情 - Method: http.MethodGet, - Path: "/vm/showNetworkDetails", - Handler: vm.ShowNetworkDetailsHandler(serverCtx), - }, - { - // 显示网段详情 - Method: http.MethodGet, - Path: "/vm/showNetworkSegmentRangeDetails", - Handler: vm.ShowNetworkSegmentRangeDetailsHandler(serverCtx), - }, - { - // 查询节点详情 - Method: http.MethodGet, - Path: "/vm/showNodeDetails", - Handler: vm.ShowNodeDetailsHandler(serverCtx), - }, - { - // 查询端口详情 - Method: http.MethodGet, - Path: "/vm/showPortDetails", - Handler: vm.ShowPortDetailsHandler(serverCtx), - }, - { - // 查询路由详情 - Method: http.MethodGet, - Path: "/vm/showRouterDetails", - Handler: vm.ShowRouterDetailsHandler(serverCtx), - }, - { - // 查询安全组详情 - Method: http.MethodGet, - Path: "/vm/showSecurityGroup", - Handler: vm.ShowSecurityGroupHandler(serverCtx), - }, - { - // 查询安全组规则详情 - Method: http.MethodGet, - Path: "/vm/showSecurityGroupRule", - Handler: vm.ShowSecurityGroupRuleHandler(serverCtx), - }, - { - // 启动虚拟机 - Method: http.MethodPost, - Path: "/vm/startServer", - Handler: vm.StartServerHandler(serverCtx), - }, - { - // 停止虚拟机 - Method: http.MethodPost, - Path: "/vm/stopServer", - Handler: vm.StopServerHandler(serverCtx), - }, - { - // 中止 - Method: http.MethodPost, - Path: "/vm/suspendServer", - Handler: vm.SuspendServerHandler(serverCtx), - }, - { - // 取消救援 - Method: http.MethodPost, - Path: "/vm/unRescueServer", - Handler: vm.UnRescueHandler(serverCtx), - }, - { - // 取消暂停虚拟机 - Method: http.MethodPost, - Path: "/vm/unpauseServer", - Handler: vm.UnpauseServerHandler(serverCtx), - }, - { - // 修改防火墙 - Method: http.MethodPut, - Path: "/vm/updateFirewallGroup", - Handler: vm.UpdateFirewallGroupHandler(serverCtx), - }, - { - // 修改浮动ip - Method: http.MethodPut, - Path: "/vm/updateFloatingIP", - Handler: vm.UpdateFloatingIPHandler(serverCtx), - }, - { - // 更新网络 - Method: http.MethodPut, - Path: "/vm/updateNetwork", - Handler: vm.UpdateNetworkHandler(serverCtx), - }, - { - // 修改网段 - Method: http.MethodPut, - Path: "/vm/updateNetworkSegmentRanges", - Handler: vm.UpdateNetworkSegmentRangesHandler(serverCtx), - }, - { - // 修改端口 - Method: http.MethodPut, - Path: "/vm/updatePort", - Handler: vm.UpdatePortHandler(serverCtx), - }, - { - // 修改路由 - Method: http.MethodPut, - Path: "/vm/updateRouter", - Handler: vm.UpdateRouterHandler(serverCtx), - }, - { - // 修改安全组 - Method: http.MethodPut, - Path: "/vm/updateSecurityGroup", - Handler: vm.UpdateSecurityGroupHandler(serverCtx), - }, - { - // 更新虚拟机 - Method: http.MethodPut, - Path: "/vm/updateServer", - Handler: vm.UpdateServerHandler(serverCtx), - }, - { - // 修改子网 - Method: http.MethodPut, - Path: "/vm/updateSubnet", - Handler: vm.UpdateSubnetHandler(serverCtx), - }, - { - // 更新卷 - Method: http.MethodPut, - Path: "/vm/updateVolume", - Handler: vm.UpdateVolumeHandler(serverCtx), - }, - { - // 上传镜像 - Method: http.MethodPut, - Path: "/vm/uploadImage", - Handler: vm.UploadImageHandler(serverCtx), + Path: "/monitoring/schedule/situation", + Handler: monitoring.ScheduleSituationHandler(serverCtx), }, }, rest.WithPrefix("/pcm/v1"), diff --git a/internal/logic/hpc/jobinfologic.go b/internal/logic/hpc/jobinfologic.go new file mode 100644 index 00000000..e1afeb4e --- /dev/null +++ b/internal/logic/hpc/jobinfologic.go @@ -0,0 +1,56 @@ +package hpc + +import ( + "context" + "github.com/pkg/errors" + "gitlink.org.cn/JointCloud/pcm-hpc/slurm" + + "gitlink.org.cn/JointCloud/pcm-coordinator/internal/svc" + "gitlink.org.cn/JointCloud/pcm-coordinator/internal/types" + + "github.com/zeromicro/go-zero/core/logx" +) + +type JobInfoLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewJobInfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *JobInfoLogic { + return &JobInfoLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *JobInfoLogic) JobInfo(req *types.JobInfoReq) (resp *types.JobInfoResp, err error) { + resp = &types.JobInfoResp{} + var clusterInfo *types.ClusterInfo + tx := l.svcCtx.DbEngin.Raw("select * from t_cluster where id = ?", req.ClusterId).Scan(&clusterInfo) + if tx.Error != nil { + return nil, tx.Error + } + client, err := slurm.NewClient(slurm.ClientOptions{ + URL: clusterInfo.Server, + ClientVersion: clusterInfo.Version, + RestUserName: clusterInfo.Username, + Token: clusterInfo.Token}) + if err != nil { + return nil, err + } + job, err := client.Job(slurm.JobOptions{}) + if err != nil { + return nil, err + } + jobResp, _ := job.GetJob(slurm.GetJobReq{JobId: req.JobId}) + + if len(jobResp.Errors) != 0 { + return nil, errors.Errorf(jobResp.Errors[0].Description) + } + resp.JobId = jobResp.Jobs[0].JobId + resp.JobState = jobResp.Jobs[0].JobState + resp.CurrentWorkingDirectory = jobResp.Jobs[0].CurrentWorkingDirectory + return resp, nil +} diff --git a/internal/types/types.go b/internal/types/types.go index f611dd49..6d026f46 100644 --- a/internal/types/types.go +++ b/internal/types/types.go @@ -1,438 +1,382 @@ // Code generated by goctl. DO NOT EDIT. package types -type Absolute struct { - MaxServerMeta int64 `json:"max_server_meta,optional"` - MaxPersonality int64 `json:"max_personality,optional"` - TotalServerGroupsUsed int64 `json:"total_server_groups_used,optional"` - MaxImageMeta int64 `json:"max_image_meta,optional"` - MaxPersonalitySize int64 `json:"max_personality_size,optional"` - MaxTotalKeypairs int64 `json:"max_total_keypairs,optional"` - MaxSecurityGroupRules int64 `json:"max_security_group_rules,optional"` - MaxServerGroups int64 `json:"max_server_groups,optional"` - TotalCoresUsed int64 `json:"total_cores_used,optional"` - TotalRAMUsed int64 `json:"total_ram_used,optional"` - TotalInstancesUsed int64 `json:"total_instances_used,optional"` - MaxSecurityGroups int64 `json:"max_security_groups,optional"` - TotalFloatingIpsUsed int64 `json:"total_floating_ips_used,optional"` - MaxTotalCores int64 `json:"max_total_cores,optional"` - MaxServerGroupMembers int64 `json:"max_server_group_members,optional"` - MaxTotalFloatingIps int64 `json:"max_total_floating_ips,optional"` - TotalSecurityGroupsUsed int64 `json:"total_security_groups_used,optional"` - MaxTotalInstances int64 `json:"max_total_instances,optional"` - MaxTotalRAMSize int64 `json:"max_total_ram_size,optional"` +type GetRegionResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data RegionNum `json:"data"` } -type ActionProgress struct { - Step int32 `json:"step,omitempty" copier:"Step"` // * - Status string `json:"status,omitempty" copier:"Status"` // * - Description string `json:"description,omitempty" copier:"Description"` // * +type RegionNum struct { + RegionSum int64 `json:"regionSum"` + SoftStackSum int64 `json:"softStackSum"` } -type AdapterAvail struct { - AdapterId string `json:"adapterId"` - AdapterName string `json:"adapterName"` - Clusters []*ClusterAvail `json:"clusters"` +type CenterResourcesResp struct { + CentersIndex []CenterIndex `json:"centersIndex"` } -type AdapterCreateReq struct { - Id string `json:"id,optional" db:"id"` - Name string `json:"name"` - Type string `json:"type"` - ResourceType string `json:"resourceType"` - Nickname string `json:"nickname"` - Version string `json:"version"` - Server string `json:"server"` +type CenterIndex struct { + Id int64 `json:"id"` + Name string `json:"name"` + Cpu string `json:"cpu"` + Memory string `json:"memory"` + Storage string `json:"storage"` + CenterType string `json:"centerType"` } -type AdapterDelReq struct { - Id string `form:"id,optional" db:"id"` +type HomeOverviewReq struct { } -type AdapterInfo struct { - Id string `json:"id,omitempty" db:"id"` - Name string `json:"name,omitempty" db:"name"` - Type string `json:"type,omitempty" db:"type"` - ResourceType string `json:"resourceType,omitempty" db:"resource_type"` - Nickname string `json:"nickname,omitempty" db:"nickname"` - Version string `json:"version,omitempty" db:"version"` - Server string `json:"server,omitempty" db:"server"` - CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` +type HomeOverviewResp struct { + Code int `json:"code"` + Message string `json:"message"` + Data HomeOverviewData `json:"data"` } -type AdapterListResp struct { - List []AdapterInfo `json:"list,omitempty"` +type HomeOverviewData struct { + AdaptSum int64 `json:"adaptSum"` + ClusterSum int64 `json:"clusterSum"` + StorageSum float32 `json:"storageSum"` + TaskSum int64 `json:"taskSum"` } -type AdapterQueryReq struct { - Id string `form:"id,optional" db:"id"` - Name string `form:"name,optional"` - Type string `form:"type,optional"` - ResourceType string `form:"resourceType,optional"` - Nickname string `form:"nickname,optional"` - Version string `form:"version,optional"` - Server string `form:"server,optional"` - PageInfo +type PublicImageReq struct { } -type AdapterRelation struct { - Id string `json:"id,omitempty" db:"id"` - Name string `json:"name,omitempty" db:"name"` - Type string `json:"type,omitempty" db:"type"` - ResourceType string `json:"resourceType" db:"resource_type"` - Nickname string `json:"nickname,omitempty" db:"nickname"` - Version string `json:"version,omitempty" db:"version"` - Server string `json:"server,omitempty" db:"server"` - CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` - Clusters []*ClusterInfo `json:"clusters,omitempty"` +type PublicImageResp struct { + Code int `json:"code"` + Message string `json:"message"` + ImageDict []ImageDict `json:"imageRDict"` } -type AdapterRelationQueryReq struct { - Id string `form:"id,optional" db:"id"` - Name string `form:"name,optional"` - Type string `form:"type,optional"` - ResourceType string `form:"resourceType,optional"` - Nickname string `form:"nickname,optional"` - Version string `form:"version,optional"` - Server string `form:"server,optional"` +type ImageDict struct { + Id int `json:"id"` + PublicImageName string `json:"public_image_name"` } -type AdapterRelationResp struct { - List []*ClusterRelationInfo `json:"list,omitempty"` +type PublicFlavorReq struct { } -type AdapterReq struct { - Id string `json:"id,optional" db:"id"` - Name string `json:"name,optional"` - Type string `json:"type,optional"` - ResourceType string `json:"resourceType,optional"` - Nickname string `json:"nickname,optional"` - Version string `json:"version,optional"` - Server string `json:"server,optional"` +type PublicFlavorResp struct { + Code int `json:"code"` + Message string `json:"message"` + FlavorDict []FlavorDict `json:"flavorDict"` } -type AdapterResp struct { - Id string `json:"id,omitempty" db:"id"` - Name string `json:"name,omitempty" db:"name"` - Type string `json:"type,omitempty" db:"type"` - ResourceType string `json:"resourceType,omitempty" db:"resource_type"` - Nickname string `json:"nickname,omitempty" db:"nickname"` - Version string `json:"version,omitempty" db:"version"` - Server string `json:"server,omitempty" db:"server"` - CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` - InfoName string `json:"info_name,omitempty"` +type FlavorDict struct { + Id int `json:"id"` + PublicFlavorName string `json:"public_flavor_name"` } -type AddSecurityGroup struct { +type PublicNetworkReq struct { +} + +type PublicNetworkResp struct { + Code int `json:"code"` + Message string `json:"message"` + NetworkDict []NetworkDict `json:"networkDict"` +} + +type NetworkDict struct { + Id int `json:"id"` + PublicNetworkName string `json:"public_netWork_name"` +} + +type RemoteResp struct { + Code int `json:"code"` + Message string `json:"message"` + Data interface{} `json:"data"` +} + +type ClustersLoadReq struct { + ClusterName string `form:"clusterName"` +} + +type ClustersLoadResp struct { + Data interface{} `json:"data"` +} + +type SyncClusterLoadReq struct { + ClusterLoadRecords []ClusterLoadRecord `json:"clusterLoadRecords"` +} + +type ClusterLoadRecord struct { + AdapterId int64 `json:"adapterId,optional"` + ClusterName string `json:"clusterName,optional"` + CpuAvail float64 `json:"cpuAvail,optional"` + CpuTotal float64 `json:"cpuTotal,optional"` + CpuUtilisation float64 `json:"cpuUtilisation,optional"` + MemoryAvail float64 `json:"memoryAvail,optional"` + MemoryUtilisation float64 `json:"memoryUtilisation,optional"` + MemoryTotal float64 `json:"memoryTotal,optional"` + DiskAvail float64 `json:"diskAvail,optional"` + DiskTotal float64 `json:"diskTotal,optional"` + DiskUtilisation float64 `json:"diskUtilisation,optional"` + PodsUtilisation float64 `json:"podsUtilisation,optional"` + PodsCount int64 `json:"podsCount,optional"` + PodsTotal int64 `json:"podsTotal,optional"` +} + +type GetClusterListReq struct { + Id int64 `form:"id"` +} + +type GetClusterListResp struct { + Clusters []ClusterInfo `json:"clusters"` +} + +type ListRegionResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data []Region `json:"data"` +} + +type Region struct { + RegionName string `json:"RegionName"` // 域名 + SoftStack string `json:"SoftStack"` // 软件栈 + SlurmNum int64 `json:"SlurmNum"` // 超算域适配slurm数量 + AdaptorInterfaceSum int64 `json:"AdaptorInterfaceSum"` // 适配接口数量 + RunningJobs int64 `json:"runningJobs"` +} + +type GeneralTaskReq struct { + Name string `json:"name"` + AdapterIds []string `json:"adapterIds"` + ClusterIds []string `json:"clusterIds"` + Strategy string `json:"strategy"` + StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` + ReqBody []string `json:"reqBody"` + Replicas int64 `json:"replicas,string"` +} + +type PodLogsReq struct { + TaskId string `json:"taskId"` + TaskName string `json:"taskName"` + ClusterId string `json:"clusterId"` + ClusterName string `json:"clusterName"` + AdapterId string `json:"adapterId"` + AdapterName string `json:"adapterName"` + PodName string `json:"podName"` + Stream bool `json:"stream"` +} + +type DeleteTaskReq struct { + Id int64 `path:"id"` +} + +type CommitTaskReq struct { + Name string `json:"name"` + NsID string `json:"nsID"` + Replicas int64 `json:"replicas,optional"` + MatchLabels map[string]string `json:"matchLabels,optional"` + YamlList []string `json:"yamlList"` + ClusterName string `json:"clusterName"` +} + +type ScheduleTaskByYamlReq struct { + Name string `yaml:"name"` + Description string `yaml:"description"` + TenantId int64 `yaml:"tenantId"` + NsID string `yaml:"nsID"` + Tasks []TaskYaml `yaml:"tasks"` +} + +type TaskYaml struct { + Replicas int64 `yaml:"replicas"` + TaskId int64 `yaml:"taskId"` + NsID string `yaml:"nsID"` + TaskType string `yaml:"taskType"` + ParticipantId int64 `yaml:"participantId"` + MatchLabels map[string]string `yaml:"matchLabels"` + Metadata interface{} `yaml:"metadata"` +} + +type CommitVmTaskReq struct { + Name string `json:"name"` + AdapterIds []string `json:"adapterIds,optional"` + ClusterIds []string `json:"clusterIds"` + Strategy string `json:"strategy"` + StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` + MinCount int64 `json:"min_count,optional"` + ImageRef int64 `json:"imageRef,optional"` + FlavorRef int64 `json:"flavorRef,optional"` + Uuid int64 `json:"uuid,optional"` + Replicas int64 `json:"replicas,optional"` + VmName string `json:"vm_name,optional"` +} + +type TaskVm struct { + Image string `json:"image"` + Flavor string `json:"flavor"` + Uuid string `json:"uuid"` + Platform string `json:"platform"` +} + +type VmOption struct { + AdapterId string `json:"adapterId"` + VmClusterIds []string `json:"vmClusterIds"` + Replicas int64 `json:"replicas,optional"` + Name string `json:"name"` + Strategy string `json:"strategy"` + ClusterToStaticWeight map[string]int32 `json:"clusterToStaticWeight"` + MatchLabels map[string]string `json:"matchLabels,optional"` + StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` + CreateMulServer []CreateMulDomainServer `json:"createMulServer,optional"` +} + +type CreateMulDomainServer struct { + Platform string `json:"platform,optional"` + Name string `json:"name,optional"` + Min_count int64 `json:"min_count,optional"` + ImageRef string `json:"imageRef,optional"` + FlavorRef string `json:"flavorRef,optional"` + Uuid string `json:"uuid,optional"` + ClusterId string `json:"clusterId,optional"` +} + +type CommitVmTaskResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` +} + +type ScheduleVmResult struct { + ClusterId string `json:"clusterId"` + TaskId string `json:"taskId"` + Strategy string `json:"strategy"` + Replica int32 `json:"replica"` + Msg string `json:"msg"` +} + +type VmTask struct { + Id string `json:"id" copier:"Id"` + Links []VmLinks `json:"links" copier:"Links"` + OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` + SecurityGroups []VmSecurity_groups_server `json:"security_groups" copier:"SecurityGroups"` + AdminPass string `json:"adminPass" copier:"AdminPass"` +} + +type VmLinks struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` +} + +type VmSecurity_groups_server struct { Name string `json:"name" copier:"Name"` } -type AddSecurityGroupToServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Platform string `form:"platform,optional"` - UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` - AddSecurityGroup struct { - Name string `json:"name" copier:"Name"` - } `json:"addSecurityGroup" copier:"AddSecurityGroup"` -} - -type AddSecurityGroupToServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type Addresses struct { - Private struct { - Addr string `json:"addr" copier:"Addr"` - Version uint32 `json:"version" copier:"Version"` - } `json:"private" copier:"private"` -} - -type AdvancedConfigAl struct { - AutoSearch struct { - SkipSearchParams string `json:"skipSearchParams,optional"` - RewardAttrs []RewardAttrs `json:"rewardAttrs,optional"` - SearchParams []SearchParams `json:"searchParams,optional"` - AlgoConfigs []AlgoConfigs `json:"algoConfigs,optional"` - } `json:"autoSearch,optional"` -} - -type AiAlgorithmsReq struct { - AdapterId string `path:"adapterId"` - ResourceType string `path:"resourceType"` - TaskType string `path:"taskType"` - Dataset string `path:"dataset"` -} - -type AiAlgorithmsResp struct { - Algorithms []string `json:"algorithms"` -} - -type AiCenter struct { - Name string `json:"name,optional"` - StackName string `json:"stack,optional"` - Version string `json:"version,optional"` -} - -type AiCenterInfos struct { - Id string `json:"id" copier:"Id"` - Name string `json:"name" copier:"Name"` - Desc string `json:"desc" copier:"Desc"` - Resource string `json:"resource" copier:"Resource"` - TrainJob string `json:"trainJob" copier:"TrainJob"` - ComputeScale int32 `json:"computeScale" copier:"ComputeScale"` - StorageScale int32 `json:"storageScale" copier:"StorageScale"` - Province string `json:"path:province" copier:"Province"` - City string `json:"city" copier:"City"` - CoordinateX int32 `json:"coordinateX" copier:"CoordinateX"` - CoordinateY int32 `json:"coordinateY" copier:"CoordinateY"` - Type int32 `json:"type" copier:"Type"` - Weight int32 `json:"weight" copier:"Weight"` - ConnectionState int32 `json:"connectionState" copier:"ConnectionState"` - BusyState int32 `json:"busyState" copier:"BusyState"` - ImageUrl string `json:"imageUrl" copier:"ImageUrl"` - AccDevices string `json:"accDevices" copier:"AccDevices"` - MarketTime int64 `json:"marketTime" copier:"MarketTime"` - CreatedAt int64 `json:"createdAt" copier:"CreatedAt"` - AccessTime int32 `json:"accessTime" copier:"AccessTime"` - CardRunTime int32 `json:"cardRunTime" copier:"CardRunTime"` - JobCount int32 `json:"jobCount" copier:"JobCount"` -} - -type AiDatasetsReq struct { - AdapterId string `path:"adapterId"` -} - -type AiDatasetsResp struct { - Datasets []string `json:"datasets"` -} - -type AiInfo struct { - ParticipantId int64 `json:"participantId,omitempty"` - TaskId int64 `json:"taskId,omitempty"` - ProjectId string `json:"project_id,omitempty"` - Name string `json:"name,omitempty"` - Status string `json:"status,omitempty"` - StartTime string `json:"startTime,omitempty"` - RunningTime int64 `json:"runningTime,omitempty"` - Result string `json:"result,omitempty"` - JobId string `json:"jobId,omitempty"` - CreateTime string `json:"createTime,omitempty"` - ImageUrl string `json:"imageUrl,omitempty"` - Command string `json:"command,omitempty"` - FlavorId string `json:"flavorId,omitempty"` - SubscriptionId string `json:"subscriptionId,omitempty"` - ItemVersionId string `json:"itemVersionId,omitempty"` -} - -type AiJobLogReq struct { - AdapterId string `path:"adapterId"` - ClusterId string `path:"clusterId"` - TaskId string `path:"taskId"` - InstanceNum string `path:"instanceNum"` -} - -type AiJobLogResp struct { - Log string `json:"log"` -} - -type AiOption struct { - TaskName string `json:"taskName"` - AdapterId string `json:"adapterId"` - AiClusterIds []string `json:"aiClusterIds"` - ResourceType string `json:"resourceType"` - ComputeCard string `json:"card"` - Tops float64 `json:"Tops,optional"` - TaskType string `json:"taskType"` - Datasets string `json:"datasets"` - Algorithm string `json:"algorithm"` - Strategy string `json:"strategy"` +type AsynCommitAiTaskReq struct { + Name string `json:"name,optional"` + AdapterIds []string `json:"adapterIds,optional"` + ClusterIds []string `json:"clusterIds,optional"` + Strategy string `json:"strategy,optional"` StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` - Params []string `json:"params,optional"` - Envs []string `json:"envs,optional"` - Cmd string `json:"cmd,optional"` - Replica int32 `json:"replicas"` + Replicas int64 `json:"replicas,optional"` + ImageId string `json:"imageId,optional"` + Command string `json:"command,optional"` + FlavorId string `json:"flavorId,optional"` + Status string `json:"status,optional"` + ClusterId int64 `json:"clusterId,optional"` + AdapterId string `json:"adapterId,optional"` } -type AiResourceTypesResp struct { - ResourceTypes []string `json:"resourceTypes"` +type AsynCommitAiTaskResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + TaskId int64 `json:"taskId"` } -type AiStrategyResp struct { - Strategies []string `json:"strategies"` +type ScheduleTaskByYamlResp struct { + TaskId int64 `json:"taskId"` } -type AiTask struct { - Name string `json:"name,optional"` - Status string `json:"status,optional"` - Cluster string `json:"cluster,optional"` - Card string `json:"card,optional"` - TimeElapsed int32 `json:"elapsed,optional"` +type ScheduleTaskReq struct { + Name string `json:"name"` + Synergy string `json:"synergy"` + Description string `json:"description"` + Strategy string `json:"strategy"` + Tasks []TaskInfo `json:"tasks"` } -type AiTaskDb struct { - Id string `json:"id,omitempty" db:"id"` - TaskId string `json:"taskId,omitempty" db:"task_id"` - AdapterId string `json:"adapterId,omitempty" db:"adapter_id"` - ClusterId string `json:"clusterId,omitempty" db:"cluster_id"` - Name string `json:"name,omitempty" db:"name"` - Replica string `json:"replica,omitempty" db:"replica"` - ClusterTaskId string `json:"clusterTaskId,omitempty" db:"c_task_id"` - Strategy string `json:"strategy,omitempty" db:"strategy"` - Status string `json:"status,omitempty" db:"status"` - Msg string `json:"msg,omitempty" db:"msg"` - CommitTime string `json:"commitTime,omitempty" db:"commit_time"` - StartTime string `json:"startTime,omitempty" db:"start_time"` - EndTime string `json:"endTime,omitempty" db:"end_time"` +type TaskInfo struct { + TaskId int64 `json:"taskId,optional"` + TaskType string `json:"taskType,optional"` + MatchLabels map[string]string `json:"matchLabels"` + ParticipantId int64 `json:"participantId"` + Metadata interface{} `json:"metadata"` } -type AiTaskTypesResp struct { - TaskTypes []string `json:"taskTypes"` +type JobTotalResp struct { + AllCardRunTime float64 `json:"allCardRunTime"` + AllJobCount float64 `json:"allJobCount"` + AllJobRunTime float64 `json:"allJobRunTime"` + TrainJobs []TrainJob `json:"trainJobs"` } -type AlertRule struct { - Id int64 `json:"id"` - ClusterName string `json:"clusterName"` - Name string `json:"name"` - AlertType string `json:"alertType"` - PromQL string `json:"promQL"` - Duration string `json:"duration"` - Annotations string `json:"annotations"` - AlertLevel string `json:"alertLevel"` +type TrainJob struct { + Name string `json:"name"` + Status string `json:"status"` + ParticipantName string `json:"participantName"` + SynergyStatus string `json:"synergyStatus"` + Strategy int `json:"strategy"` } -type AlertRulesReq struct { - AlertType string `form:"alertType"` - AdapterId string `form:"adapterId,optional"` - ClusterId string `form:"clusterId,optional"` +type TaskListReq struct { + PageNum int `form:"pageNum"` + PageSize int `form:"pageSize"` } -type AlertRulesResp struct { - AlertRules []AlertRule `json:"alertRules"` +type TaskListResp struct { + TotalCount int64 `json:"totalCount"` // 任务总数 + NormalCount int64 `json:"normalCount"` // 正常任务数 + AlarmCount int64 `json:"alarmCount"` // 任务告警数 + Tasks []Task `json:"tasks"` } -type AlgoConfigs struct { - Name string `json:"name,optional"` - AutoSearchAlgoConfigParameterAlRp []AutoSearchAlgoConfigParameterAlRp `json:"params,optional"` +type Task struct { + Id int64 `json:"id"` + Name string `json:"name"` + Status string `json:"status"` + TaskType string `json:"taskType"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + ParticipantStatus string `json:"participantStatus"` + ParticipantId int64 `json:"participantId"` + ParticipantName string `json:"participantName"` } -type Algorithm struct { - ID string `json:"id"` - Name string `json:"name"` - V1Algorithm bool `json:"v1Algorithm"` - SubscriptionID string `json:"subscriptionId"` - ItemVersionID string `json:"itemVersionId"` - ContentID string `json:"contentId"` - Parameters []Parameters `json:"parameters"` - ParametersCustomization bool `json:"parametersCustomization"` - Inputs []Inputs `json:"inputs"` - Outputs []Outputs `json:"outputs"` - Engine struct { - EngineID string `json:"engineId"` - EngineName string `json:"engineName"` - EngineVersion string `json:"engineVersion"` - V1Compatible bool `json:"v1Compatible"` - RunUser string `json:"runUser"` - ImageSource bool `json:"imageSource"` - } `json:"engine"` - Policies Policies `json:"policies"` +type PageTaskReq struct { + Name string `form:"name,optional"` + PageInfo } -type AlgorithmResponse struct { - MetadataAlRp struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - Description string `json:"description,optional"` - CreateTime uint64 `json:"createTime,optional"` - WorkspaceId string `json:"workspaceId,optional"` - AiProject string `json:"aiProject,optional"` - UserName string `json:"userName,optional"` - DomainId string `json:"domainId,optional"` - Source string `json:"source,optional"` - ApiVersion string `json:"apiVersion,optional"` - IsValid bool `json:"isValid,optional"` - State string `son:"state,optional"` - Size int32 `json:"size,optional"` - Tags []*TagsAlRp `json:"tags,optional"` - AttrList []string `json:"attrList,optional"` - VersionNum int32 `json:"versionNum,optional"` - UpdateTime uint64 `json:"updateTime,optional"` - } `json:"metadata,optional"` - JobConfigAlRp struct { - CodeDir string `json:"codeDir,optional"` - BootFile string `json:"bootFile,optional"` - Command string `json:"command,optional"` - ParametersAlRq []ParametersAlRq `json:"parameters,optional"` - ParametersCustomization bool `json:"parametersCustomization,optional"` - InputsAlRq []InputsAlRq `json:"inputs,optional"` - OutputsAl []OutputsAl `json:"outputs,optional"` - EngineAlRq EngineAlRq `json:"engine,optional"` - } `json:"jobConfig,optional"` - ResourceRequirementsAlRp []ResourceRequirements `json:"resourceRequirements,optional"` - AdvancedConfigAlRp struct { - AutoSearch AutoSearch `json:"autoSearch,optional"` - } `json:"advancedConfig,optional"` +type TaskModel struct { + Id int64 `json:"id,omitempty,string" db:"id"` // id + Name string `json:"name,omitempty" db:"name"` // 作业名称 + Description string `json:"description,omitempty" db:"description"` // 作业描述 + Status string `json:"status,omitempty" db:"status"` // 作业状态 + Strategy int64 `json:"strategy" db:"strategy"` // 策略 + SynergyStatus int64 `json:"synergyStatus" db:"synergy_status"` // 协同状态(0-未协同、1-已协同) + CommitTime string `json:"commitTime,omitempty" db:"commit_time"` // 提交时间 + StartTime string `json:"startTime,omitempty" db:"start_time"` // 开始时间 + EndTime string `json:"endTime,omitempty" db:"end_time"` // 结束运行时间 + RunningTime int64 `json:"runningTime" db:"running_time"` // 已运行时间(单位秒) + YamlString string `json:"yamlString,omitempty" db:"yaml_string"` + Result string `json:"result,omitempty" db:"result"` // 作业结果 + DeletedAt string `json:"deletedAt,omitempty" gorm:"index" db:"deleted_at"` + NsID string `json:"nsId,omitempty" db:"ns_id"` + TenantId string `json:"tenantId,omitempty" db:"tenant_id"` + CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"` + UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"` + AdapterTypeDict string `json:"adapterTypeDict" db:"adapter_type_dict" gorm:"adapter_type_dict"` //适配器类型(对应字典表的值 + TaskTypeDict string `json:"taskTypeDict" db:"task_type_dict" gorm:"task_type_dict"` //任务类型(对应字典表的值 } -type AlgorithmsCtRq struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - CodeDir string `json:"codeDir,optional"` - BootFile string `json:"bootFile,optional"` - EngineCreateTraining struct { - EngineId string `json:"engineId,optional"` - EngineName string `json:"engineName,optional"` - EngineVersion string `json:"engineVersion,optional"` - ImageUrl string `json:"imageUrl,optional"` - } `json:"engine,optional"` - ParametersTrainJob []ParametersTrainJob `json:"parameters,optional"` - PoliciesCreateTraining PoliciesCreateTraining `json:"policies,optional"` - Command string `json:"command,optional"` - SubscriptionId string `json:"subscriptionId,optional"` - ItemVersionId string `json:"itemVersionId,optional"` - InputTra []InputTra `json:"inputs,optional"` - OutputTra []OutputTra `json:"outputs,optional"` - Environments Environments `json:"environments,optional"` +type TaskDetailReq struct { + TaskId int64 `path:"taskId"` } -type Allocation_pool struct { - Start string `json:"start,optional" copier:"start"` - End string `json:"end,optional" copier:"end"` -} - -type Allocation_pools struct { - Start string `json:"start" copier:"Start"` - End string `json:"end" copier:"End"` -} - -type Allowed_address_pairs struct { - Ip_address string `json:"ip_address,optional" copier:"ip_address"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` -} - -type Annotations struct { - JobTemplate string `json:"jobTemplate"` - KeyTask string `json:"keyTask"` -} - -type App struct { - Id int64 `json:"id,optional" db:"id"` - Name string `json:"name,optional"` - Status string `json:"status,optional"` - CreateTime string `json:"createTime,optional"` - MinReplicas string `json:"minReplicas,optional"` - MaxReplicas string `json:"maxReplicas,optional"` - AppLocations []AppLocation `json:"appLocations,optional"` -} - -type AppDetailReq struct { - Name string `path:"appName"` - NsID string `form:"nsID"` -} - -type AppDetailResp struct { +type TaskDetailResp struct { CpuCores float64 `json:"cpuCores"` CpuRate float64 `json:"cpuRate"` CpuLimit float64 `json:"cpuLimit"` @@ -444,119 +388,15 @@ type AppDetailResp struct { MemoryLimit float64 `json:"memoryLimit"` } -type AppListReq struct { - NsID string `form:"nsID"` +type ListCenterResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data CenterData `json:"data"` } -type AppListResp struct { - Apps []App `json:"apps"` //应用列表 -} - -type AppLocation struct { - ParticipantId string `json:"participantId,optional" db:"participant_id"` - ParticipantName string `json:"participantName,optional" db:"participant_name"` - Kind string `json:"kind,optional" db:"kind"` -} - -type AppResp struct { - Code int `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data interface{} `json:"data,omitempty"` -} - -type AppTaskResp struct { - Data interface{} `json:"data"` -} - -type ApplyReq struct { - YamlString string `json:"yamlString" copier:"yamlString"` -} - -type ApplyResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - DataSet []DataSet `json:"dataSet,omitempty"` -} - -type Attributes struct { - DataFormat []string `json:"dataFormat"` - DataSegmentation []string `json:"dataSegmentation"` - DatasetType []string `json:"datasetType"` - IsFree string `json:"isFree"` - MaxFreeJobCount string `json:"maxFreeJobCount"` -} - -type AutoSearch struct { - SkipSearchParams string `json:"skipSearchParams,optional"` - RewardAttrs []RewardAttrs `json:"rewardAttrs,optional"` - SearchParams []SearchParams `json:"searchParams,optional"` - AlgoConfigs []AlgoConfigs `json:"algoConfigs,optional"` -} - -type AutoSearchAlgoConfigParameterAlRp struct { - Key string `json:"key,optional"` - Value string `json:"value,optional"` - Type string `json:"type,optional"` -} - -type Availability_zone_hints struct { -} - -type Billing struct { - Code string `json:"code"` - UnitNum int32 `json:"unitNum"` -} - -type Block_device_mapping_v2 struct { - SourceType string `json:"source_type" copier:"SourceType"` - Uuid string `json:"uuid" copier:"Uuid"` - BootIndex string `json:"boot_index" copier:"BootIndex"` - DestinationType string `json:"destination_type" copier:"DestinationType"` - DeleteOnTermination bool `json:"delete_on_termination" copier:"DeleteOnTermination"` -} - -type BulkCreateNetworksReq struct { - Network []CreateNetwork `json:"network" copier:"Network"` - Platform string `json:"platform,optional"` -} - -type BulkCreateNetworksResp struct { - Network []Network `json:"network" copier:"Network"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CId struct { - Id string `path:"id":"id,omitempty" validate:"required"` -} - -type CIds struct { - Ids []string `json:"ids,omitempty" validate:"required"` -} - -type CPU struct { - Arch string `json:"arch"` - CoreNum int32 `json:"coreNum"` -} - -type CPUUsage struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` -} - -type Card struct { - Platform string `json:"platform"` - Type string `json:"type"` - Name string `json:"name"` - TOpsAtFp16 float64 `json:"TOpsAtFp16"` - CardHours float64 `json:"cardHours"` - CardNum int32 `json:"cardNum"` -} - -type Category struct { - Name string `json:"name"` +type CenterData struct { + TotalCount int `json:"totalCount"` + Centers []Center `json:"centers"` } type Center struct { @@ -602,138 +442,370 @@ type Center struct { HubCode int64 `json:"hubCode"` } -type CenterData struct { - TotalCount int `json:"totalCount"` - Centers []Center `json:"centers"` +type ListClusterReq struct { + CenterId int32 `path:"centerId"` } -type CenterIndex struct { +type ListClusterResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data ClusterData `json:"data"` +} + +type ClusterData struct { + TotalCount int `json:"totalCount"` + Clusters []ComputeCluster `json:"clusters"` +} + +type ComputeCluster struct { + Id int64 `json:"id"` + Name string `json:"name"` + Type string `json:"type"` + JcceDomainId int64 `json:"jcceDomainId"` + JcceDomainName string `json:"jcceDomainName"` + Longitude float64 `json:"longitude"` + Latitude float64 `json:"latitude"` + Description string `json:"description"` +} + +type ScreenChartResp struct { + ComputingPower []int `json:"computingPower"` + CpuAvg []int `json:"cpuAvg"` + CpuLoad []int `json:"cpuLoad"` + MemoryLoad []int `json:"memoryLoad"` + MemoryAvg []int `json:"memoryAvg"` + CenterName string `json:"centerName"` +} + +type GetClusterByIdReq struct { + ClusterId int32 `path:"clusterId"` +} + +type GetClusterByIdResp struct { + ClusterInfo ClusterInfo `json:"clusterInfo"` +} + +type ScreenInfoResp struct { + StorageUsed float32 `json:"storageUsed"` + StorageUsing float32 `json:"storageUsing"` + UsageRate float32 `json:"usageRate"` + UsingRate float32 `json:"usingRate"` + ApiDelay string `json:"apiDelay"` + SchedulerTimes int `json:"schedulerTimes"` + SchedulerErr int `json:"schedulerErr"` + ApiTimes string `json:"apiTimes"` + CenterCount int `json:"centerCount"` + ComputingPower float64 `json:"computingPower"` + ClusterCount int `json:"clusterCount"` + RunningCount int `json:"runningCount"` + CardCount int `json:"cardCount"` + RunningTime int `json:"runningTime"` +} + +type CpResp struct { + POpsAtFp16 float32 `json:"pOpsAtFp16"` +} + +type GiResp struct { + CpuNum int32 `json:"cpuNum,optional"` + MemoryInGib int32 `json:"memoryInGib,optional"` + StorageInGib int32 `json:"storageInGib,optional"` +} + +type DomainResourceResp struct { + TotalCount int `json:"totalCount"` + DomainResourceList []DomainResource `json:"domainResourceList"` +} + +type DomainResource struct { + Id int64 `json:"id"` // id + DomainId string `json:"domainId"` // 资源域id + DomainName string `json:"domainName"` // 资源域名称 + JobCount int64 `json:"jobCount"` // 资源域任务数量 + DomainSource int64 `json:"domainSource"` // 资源域数据来源:0-nudt,1-鹏城 + Stack string `json:"stack"` // 技术栈 + ResourceType string `json:"resourceType"` // 资源类型 + Cpu float64 `json:"cpu"` // cpu使用率 + Memory float64 `json:"memory"` // 内存使用率 + Disk float64 `json:"disk"` // 存储使用率 + NodeCount float64 `json:"nodeCount"` //节点使用率 + Description string `json:"description"` //集群描述 + ClusterName string `json:"clusterName"` //集群名称 + CpuTotal float64 `json:"cpuTotal"` //cpu总核数 + MemoryTotal float64 `json:"memoryTotal"` //内存总量Gi + DiskTotal float64 `json:"diskTotal"` //存储总量GB + NodeTotal float64 `json:"nodeTotal"` //容器节点数 + CpuUsage float64 `json:"cpuUsage"` //cpu已使用核数 + MemoryUsage float64 `json:"memoryUsage"` //内存已使用Gi + DiskUsage float64 `json:"diskUsage"` //存储已使用GB + NodeUsage float64 `json:"nodeUsage"` //容器节点已使用 +} + +type ResourcePanelConfigReq struct { + Id int64 `json:"id"` //id + Title string `json:"title"` //标题 + TitleColor string `json:"titleColor"` //标题色 + MainColor string `json:"mainColor"` //主色调 + MainColor2 string `json:"mainColor2"` //次主色调 + TextColor string `json:"textColor"` //文字颜色 + BackgroundColor string `json:"backgroundColor"` //背景底色 + Center string `json:"center"` //中心点 + CenterPosition string `json:"centerPosition"` //comment 中心点坐标 + ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色 + StatusIng string `json:"statusIng"` //接入中图标 + StatusUn string `json:"statusUn"` //未接入图标 + StatusEnd string `json:"statusEnd"` //已接入图标 + TitleIcon string `json:"titleIcon"` //标题底图 + SubTitleIcon string `json:"subTitleIcon"` //小标题底图 + NumberBg string `json:"numberBg"` //数字底图 + TaskBg string `json:"taskBg"` //任务底图 +} + +type ResourcePanelConfigResp struct { + Id int64 `json:"id"` //id + Title string `json:"title"` //标题, + TitleColor string `json:"titleColor"` //标题色, + MainColor string `json:"mainColor"` //主色调, + MainColor2 string `json:"mainColor2"` //次主色调, + TextColor string `json:"textColor"` //文字颜色, + BackgroundColor string `json:"backgroundColor"` //背景底色, + Center string `json:"center"` //中心点, + CenterPosition string `json:"centerPosition"` //comment 中心点坐标, + ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色, + StatusIng string `json:"statusIng"` //接入中图标, + StatusUn string `json:"statusUn"` //未接入图标, + StatusEnd string `json:"statusEnd"` //已接入图标, + TitleIcon string `json:"titleIcon"` //标题底图, + SubTitleIcon string `json:"subTitleIcon"` //小标题底图, + NumberBg string `json:"numberBg"` //数字底图, + TaskBg string `json:"taskBg"` //任务底图, + CreateTime string `json:"createTime"` //创建时间, + UpdateTime string `json:"updateTime"` //更新时间 +} + +type ComputilityStatisticsResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` + ComputilityStatistics ComputilityStatistics `json:"data"` //容器节点已使用 +} + +type ComputilityStatistics struct { + DomainSum int64 `json:"domainSum"` //域总数 + TotalComputility float64 `json:"totalComputility"` //算力总和 + ClusterNum int64 `json:"clusterNum"` //集群总数 +} + +type NodeAssetsResp struct { + NodeAssets []NodeAsset `json:"nodeAssets"` +} + +type NodeAsset struct { + Name string `json:"Name"` //租户名称 + NodeName string `json:"NodeName"` // 节点名称 + CpuTotal int64 `json:"CpuTotal"` // cpu核数 + CpuUsable float64 `json:"CpuUsable"` // cpu可用率 + DiskTotal int64 `json:"DiskTotal"` // 磁盘空间 + DiskAvail int64 `json:"DiskAvail"` // 磁盘可用空间 + MemTotal int64 `json:"MemTotal"` // 内存总数 + MemAvail int64 `json:"MemAvail"` // 内存可用数 + GpuTotal int64 `json:"GpuTotal"` // gpu总数 + GpuAvail int64 `json:"GpuAvail"` // gpu可用数 + ParticipantId int64 `json:"ParticipantId"` // 集群动态信息id +} + +type ParticipantListResp struct { + Participants []Participant `json:"participants"` +} + +type Participant struct { Id int64 `json:"id"` Name string `json:"name"` - Cpu string `json:"cpu"` - Memory string `json:"memory"` - Storage string `json:"storage"` - CenterType string `json:"centerType"` + Address string `json:"address"` + MetricsUrl string `json:"metricsUrl"` + TenantName string `json:"tenantName"` + TypeName string `json:"typeName"` } -type CenterListResp struct { - List []*AiCenter `json:"centerList,optional"` +type AppListReq struct { + NsID string `form:"nsID"` } -type CenterOverviewResp struct { - CenterNum int32 `json:"totalCenters,optional"` - TaskNum int32 `json:"totalTasks,optional"` - CardNum int32 `json:"totalCards,optional"` - PowerInTops float64 `json:"totalPower,optional"` +type AppListResp struct { + Apps []App `json:"apps"` //应用列表 } -type CenterQueue struct { - Name string `json:"name,optional"` - QueueingNum int32 `json:"num,optional"` -} - -type CenterQueueingResp struct { - Current []*CenterQueue `json:"current,optional"` - History []*CenterQueue `json:"history,optional"` -} - -type CenterTaskListResp struct { - List []*AiTask `json:"taskList,optional"` -} - -type ChangeAdministrativePasswordReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Changepassword string `json:"changePassword" copier:"Changepassword"` - Platform string `form:"platform,optional"` - ChangePassword struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` - } `json:"changepassword" copier:"ChangePassword"` -} - -type ChangeAdministrativePasswordResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type ChangePassword struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` -} - -type ChatReq struct { - Id uint `json:"id,string"` - Method string `json:"method,optional"` - ReqData map[string]interface{} `json:"reqData"` -} - -type ChatResult struct { - Resuluts string `json:"results,optional"` -} - -type CleanStep struct { -} - -type Cloud struct { - Id int64 `json:"id"` // id - TaskId int64 `json:"taskId"` // 任务id - ParticipantId int64 `json:"participantId"` // 集群静态信息id - ApiVersion string `json:"apiVersion"` - Name string `json:"name"` // 名称 - Namespace string `json:"namespace"` // 命名空间 - Kind string `json:"kind"` // 种类 - Status string `json:"status"` // 状态 - StartTime string `json:"startTime"` // 开始时间 - RunningTime int64 `json:"runningTime"` // 运行时长 - CreatedBy int64 `json:"createdBy"` // 创建人 - CreateTime string `json:"createdTime"` // 创建时间 - Result string `json:"result"` -} - -type CloudInfo struct { - Participant int64 `json:"participant,omitempty"` - Id int64 `json:"id,omitempty"` - TaskId int64 `json:"taskId,omitempty"` - ApiVersion string `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - Namespace string `json:"namespace,omitempty"` - Name string `json:"name,omitempty"` - Status string `json:"status,omitempty"` - StartTime string `json:"startTime,omitempty"` - RunningTime int64 `json:"runningTime,omitempty"` - Result string `json:"result,omitempty"` - YamlString string `json:"yamlString,omitempty"` -} - -type CloudResp struct { - Code string `json:"code"` - Msg string `json:"msg"` - Data string `json:"data"` -} - -type Cluster struct { - ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` - ClusterName string `json:"clusterName,omitempty" copier:"ClusterName"` - Description string `json:"description,omitempty" copier:"Description"` - Tenant string `json:"tenant,omitempty" copier:"Tenant"` - Project string `json:"project,omitempty" copier:"Project"` - Owner string `json:"owner,omitempty" copier:"Owner"` - CreatedAt int32 `json:"createdAt,omitempty" copier:"CreatedAt"` - Status string `json:"status,omitempty" copier:"Status"` - Nodes struct { - Specification string `json:"specification,omitempty" copier:"Specification"` - Count int32 `json:"count,omitempty" copier:"Count"` - AvailableCount int32 `json:"availableCount,omitempty" copier:"AvailableCount"` - } `json:"nodes,omitempty" copier:"Nodes"` - AllocatableCpuCores float64 `json:"allocatableCpuCores,omitempty" copier:"AllocatableCpuCores"` - AllocatableMemory int64 `json:"allocatableMemory,omitempty" copier:"AllocatableMemory"` - PeriodNum int32 `json:"periodNum,omitempty" copier:"PeriodNum"` - PeriodType string `json:"periodType,omitempty" copier:"PeriodType"` - OrderId string `json:"orderId,omitempty" copier:"OrderId"` -} - -type ClusterAvail struct { - ClusterId string `json:"clusterId"` +type Replica struct { ClusterName string `json:"clusterName"` + Replica int32 `json:"replica"` +} + +type App struct { + Id int64 `json:"id,optional" db:"id"` + Name string `json:"name,optional"` + Status string `json:"status,optional"` + CreateTime string `json:"createTime,optional"` + MinReplicas string `json:"minReplicas,optional"` + MaxReplicas string `json:"maxReplicas,optional"` + AppLocations []AppLocation `json:"appLocations,optional"` +} + +type AppLocation struct { + ParticipantId string `json:"participantId,optional" db:"participant_id"` + ParticipantName string `json:"participantName,optional" db:"participant_name"` + Kind string `json:"kind,optional" db:"kind"` +} + +type AppDetailReq struct { + Name string `path:"appName"` + NsID string `form:"nsID"` +} + +type AppDetailResp struct { + CpuCores float64 `json:"cpuCores"` + CpuRate float64 `json:"cpuRate"` + CpuLimit float64 `json:"cpuLimit"` + GpuCores float64 `json:"gpuCores"` + GpuRate float64 `json:"gpuRate"` + GpuLimit float64 `json:"gpuLimit"` + MemoryTotal float64 `json:"memoryTotal"` + MemoryRate float64 `json:"memoryRate"` + MemoryLimit float64 `json:"memoryLimit"` +} + +type AppTaskResp struct { + Data interface{} `json:"data"` +} + +type DeleteAppReq struct { + Name string `form:"name"` + NsID string `form:"nsID"` +} + +type DeleteAppResp struct { + Code int `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + Data interface{} `json:"data,omitempty"` +} + +type AppResp struct { + Code int `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + Data interface{} `json:"data,omitempty"` +} + +type AdapterQueryReq struct { + Id string `form:"id,optional" db:"id"` + Name string `form:"name,optional"` + Type string `form:"type,optional"` + ResourceType string `form:"resourceType,optional"` + Nickname string `form:"nickname,optional"` + Version string `form:"version,optional"` + Server string `form:"server,optional"` + PageInfo +} + +type AdapterRelationQueryReq struct { + Id string `form:"id,optional" db:"id"` + Name string `form:"name,optional"` + Type string `form:"type,optional"` + ResourceType string `form:"resourceType,optional"` + Nickname string `form:"nickname,optional"` + Version string `form:"version,optional"` + Server string `form:"server,optional"` +} + +type AdapterReq struct { + Id string `json:"id,optional" db:"id"` + Name string `json:"name,optional"` + Type string `json:"type,optional"` + ResourceType string `json:"resourceType,optional"` + Nickname string `json:"nickname,optional"` + Version string `json:"version,optional"` + Server string `json:"server,optional"` +} + +type AdapterCreateReq struct { + Id string `json:"id,optional" db:"id"` + Name string `json:"name"` + Type string `json:"type"` + ResourceType string `json:"resourceType"` + Nickname string `json:"nickname"` + Version string `json:"version"` + Server string `json:"server"` +} + +type AdapterDelReq struct { + Id string `form:"id,optional" db:"id"` +} + +type AdapterInfo struct { + Id string `json:"id,omitempty" db:"id"` + Name string `json:"name,omitempty" db:"name"` + Type string `json:"type,omitempty" db:"type"` + ResourceType string `json:"resourceType,omitempty" db:"resource_type"` + Nickname string `json:"nickname,omitempty" db:"nickname"` + Version string `json:"version,omitempty" db:"version"` + Server string `json:"server,omitempty" db:"server"` + CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` +} + +type AdapterResp struct { + Id string `json:"id,omitempty" db:"id"` + Name string `json:"name,omitempty" db:"name"` + Type string `json:"type,omitempty" db:"type"` + ResourceType string `json:"resourceType,omitempty" db:"resource_type"` + Nickname string `json:"nickname,omitempty" db:"nickname"` + Version string `json:"version,omitempty" db:"version"` + Server string `json:"server,omitempty" db:"server"` + CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` + InfoName string `json:"info_name,omitempty"` +} + +type AdapterListResp struct { + List []AdapterInfo `json:"list,omitempty"` +} + +type AdapterRelationResp struct { + List []*ClusterRelationInfo `json:"list,omitempty"` +} + +type AdapterRelation struct { + Id string `json:"id,omitempty" db:"id"` + Name string `json:"name,omitempty" db:"name"` + Type string `json:"type,omitempty" db:"type"` + ResourceType string `json:"resourceType" db:"resource_type"` + Nickname string `json:"nickname,omitempty" db:"nickname"` + Version string `json:"version,omitempty" db:"version"` + Server string `json:"server,omitempty" db:"server"` + CreateTime string `json:"createTime,omitempty" db:"create_time" gorm:"autoCreateTime"` + Clusters []*ClusterInfo `json:"clusters,omitempty"` +} + +type ClusterReq struct { + Id string `form:"id,optional"` + AdapterId string `form:"adapterId,optional"` + Name string `form:"name,optional"` + Nickname string `form:"nickname,optional"` + Description string `form:"description,optional"` + Server string `form:"server,optional"` + MonitorServer string `form:"monitorServer,optional"` + Username string `form:"username,optional"` + Password string `form:"password,optional"` + Token string `form:"token,optional"` + Ak string `form:"ak,optional"` + Sk string `form:"sk,optional"` + Region string `form:"region,optional"` + ProjectId string `form:"projectId,optional"` + Version string `form:"version,optional"` + Label string `form:"label,optional"` + OwnerId string `form:"ownerId,omitempty,optional"` + AuthType string `form:"authType,optional"` + Type string `form:"type,optional"` + ProducerDict string `form:"producerDict,optional"` + RegionDict string `form:"regionDict,optional"` + ResourceType string `form:"resourceType,optional"` + PageInfo } type ClusterCreateReq struct { @@ -761,15 +833,6 @@ type ClusterCreateReq struct { Environment map[string]string `json:"environment,optional"` } -type ClusterData struct { - TotalCount int `json:"totalCount"` - Clusters []ComputeCluster `json:"clusters"` -} - -type ClusterDelReq struct { - Id string `form:"id,optional"` -} - type ClusterInfo struct { Id string `json:"id,omitempty" db:"id"` AdapterId string `json:"adapterId,omitempty" db:"adapter_id"` @@ -797,31 +860,26 @@ type ClusterInfo struct { WorkDir string `json:"workDir,omitempty" db:"work_dir"` } +type ClusterDelReq struct { + Id string `form:"id,optional"` +} + +type ClusterResp struct { + List ClusterInfo `json:"list,omitempty"` +} + type ClusterListResp struct { List []ClusterInfo `json:"list,omitempty"` } -type ClusterLoadRecord struct { - AdapterId int64 `json:"adapterId,optional"` - ClusterName string `json:"clusterName,optional"` - CpuAvail float64 `json:"cpuAvail,optional"` - CpuTotal float64 `json:"cpuTotal,optional"` - CpuUtilisation float64 `json:"cpuUtilisation,optional"` - MemoryAvail float64 `json:"memoryAvail,optional"` - MemoryUtilisation float64 `json:"memoryUtilisation,optional"` - MemoryTotal float64 `json:"memoryTotal,optional"` - DiskAvail float64 `json:"diskAvail,optional"` - DiskTotal float64 `json:"diskTotal,optional"` - DiskUtilisation float64 `json:"diskUtilisation,optional"` - PodsUtilisation float64 `json:"podsUtilisation,optional"` - PodsCount int64 `json:"podsCount,optional"` - PodsTotal int64 `json:"podsTotal,optional"` +type ClusterSumReq struct { } -type ClusterNode struct { - Specification string `json:"specification,omitempty" copier:"Specification"` - Count int32 `json:"count,omitempty" copier:"Count"` - AvailableCount int32 `json:"availableCount,omitempty" copier:"AvailableCount"` +type ClusterSumReqResp struct { + PodSum int `json:"podSum,omitempty"` + VmSum int `json:"vmSum,omitempty"` + AdapterSum int `json:"AdapterSum,omitempty"` + TaskSum int `json:"TaskSum,omitempty"` } type ClusterRelationInfo struct { @@ -855,1630 +913,22 @@ type ClusterRelationInfo struct { CCreateTime string `json:"cCreateTime,omitempty" db:"created_time" gorm:"autoCreateTime"` } -type ClusterReq struct { - Id string `form:"id,optional"` - AdapterId string `form:"adapterId,optional"` - Name string `form:"name,optional"` - Nickname string `form:"nickname,optional"` - Description string `form:"description,optional"` - Server string `form:"server,optional"` - MonitorServer string `form:"monitorServer,optional"` - Username string `form:"username,optional"` - Password string `form:"password,optional"` - Token string `form:"token,optional"` - Ak string `form:"ak,optional"` - Sk string `form:"sk,optional"` - Region string `form:"region,optional"` - ProjectId string `form:"projectId,optional"` - Version string `form:"version,optional"` - Label string `form:"label,optional"` - OwnerId string `form:"ownerId,omitempty,optional"` - AuthType string `form:"authType,optional"` - Type string `form:"type,optional"` - ProducerDict string `form:"producerDict,optional"` - RegionDict string `form:"regionDict,optional"` - ResourceType string `form:"resourceType,optional"` - PageInfo +type AdapterInfoNameReq struct { + AdapterId string `form:"adapterId,optional"` } -type ClusterResp struct { - List struct { - Id string `json:"id,omitempty" db:"id"` - AdapterId string `json:"adapterId,omitempty" db:"adapter_id"` - Name string `json:"name,omitempty" db:"name"` - Nickname string `json:"nickname,omitempty" db:"nickname"` - Description string `json:"description,omitempty" db:"description"` - Server string `json:"server,omitempty" db:"server"` - MonitorServer string `json:"monitorServer,omitempty" db:"monitor_server"` - Username string `json:"username,omitempty" db:"username"` - Password string `json:"password,omitempty" db:"password"` - Token string `json:"token,omitempty" db:"token"` - Ak string `json:"ak,omitempty" db:"ak"` - Sk string `json:"sk,omitempty" db:"sk"` - Region string `json:"region,omitempty" db:"region"` - ProjectId string `json:"projectId,omitempty" db:"project_id"` - Version string `json:"version,omitempty" db:"version"` - Label string `json:"label,omitempty" db:"label"` - OwnerId string `json:"ownerId,omitempty" db:"owner_id"` - AuthType string `json:"authType,omitempty" db:"auth_type"` - ProducerDict string `json:"producerDict,omitempty" db:"producer_dict"` - RegionDict string `json:"regionDict,omitempty" db:"region_dict"` - Location string `json:"location,omitempty" db:"location"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` - Environment string `json:"environment,omitempty" db:"environment"` - WorkDir string `json:"workDir,omitempty" db:"work_dir"` - } `json:"list,omitempty"` +type AdapterInfoNameReqResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + InfoList InfoList `json:"infoList,omitempty"` } -type CommonResp struct { - Code int `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data interface{} `json:"data,omitempty"` -} - -type ComputeCluster struct { - Id int64 `json:"id"` - Name string `json:"name"` - Type string `json:"type"` - JcceDomainId int64 `json:"jcceDomainId"` - JcceDomainName string `json:"jcceDomainName"` - Longitude float64 `json:"longitude"` - Latitude float64 `json:"latitude"` - Description string `json:"description"` -} - -type ComputilityStatistics struct { - DomainSum int64 `json:"domainSum"` //域总数 - TotalComputility float64 `json:"totalComputility"` //算力总和 - ClusterNum int64 `json:"clusterNum"` //集群总数 -} - -type ComputilityStatisticsResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` - ComputilityStatistics struct { - DomainSum int64 `json:"domainSum"` //域总数 - TotalComputility float64 `json:"totalComputility"` //算力总和 - ClusterNum int64 `json:"clusterNum"` //集群总数 - } `json:"data"` //容器节点已使用 -} - -type Config struct { - Script string `json:"script" copier:"Script"` - TypeConfig string `json:"type" copier:"TypeConfig"` -} - -type Conntrack_helpers struct { - Protocol string `json:"protocol,optional" copier:"protocol"` - Helper string `json:"helper,optional" copier:"helper"` - Port uint32 `json:"port,optional" copier:"port"` -} - -type Constraint struct { - Type string `json:"type"` - Editable bool `json:"editable"` - Required bool `json:"required"` - Sensitive bool `json:"sensitive"` - ValidType string `json:"validType"` - ValidRange interface{} `json:"validRange,optional"` -} - -type ConstraintAlRq struct { - Type string `son:"type,optional"` - Editable bool `json:"editable,optional"` - Required bool `json:"required,optional"` - Sensitive bool `json:"sensitive,optional"` - ValidType string `json:"validType,optional"` - ValidRange []string `json:"validRange,optional"` -} - -type ConstraintCreateTraining struct { - Type string `json:"type,optional"` - Editable bool `json:"editable,optional"` - Required bool `json:"required,optional"` - Sensitive bool `json:"sensitive,optional"` - ValidType string `json:"validType,optional"` -} - -type ContainerHooks struct { - PostStart struct { - Script string `json:"script" copier:"Script"` - TypeConfig string `json:"type" copier:"TypeConfig"` - } `json:"postStart" copier:"PostStart"` - PreStart struct { - Script string `json:"script" copier:"Script"` - TypeConfig string `json:"type" copier:"TypeConfig"` - } `json:"preStart" copier:"PreStart"` -} - -type ContainerHooksResp struct { - PostStart struct { - Mode string `json:"mode,omitempty" copier:"Mode"` // * - Script string `json:"script,omitempty" copier:"Script"` // * - Type string `json:"type,omitempty" copier:"Type"` // * - } `json:"postStart,omitempty" copier:"PostStart"` // * - PreStart struct { - Mode string `json:"mode,omitempty" copier:"Mode"` // * - Script string `json:"script,omitempty" copier:"Script"` // * - Type string `json:"type,omitempty" copier:"Type"` // * - } `json:"preStart,omitempty" copier:"PreStart"` // * -} - -type ControllerMetricsReq struct { - Metrics []string `form:"metrics"` - ParticipantId int64 `form:"participantId"` - Pod string `form:"pod,optional"` - WorkloadName string `form:"workloadName,optional"` - Steps string `form:"steps"` - Start string `form:"start"` - End string `form:"end"` - Level string `form:"level,optional"` -} - -type ControllerMetricsResp struct { - Data interface{} `json:"data"` -} - -type CrServer struct { - Server struct { - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - Description string `json:"description,optional" copier:"Description"` - ImageRef string `json:"imageRef,optional" copier:"ImageRef"` - Networks []CreNetwork `json:"networks,optional" copier:"Networks"` - BlockDeviceMappingV2 []Block_device_mapping_v2 `json:"block_device_mapping_v2,optional" copier:"BlockDeviceMappingV2"` - MinCount int32 `json:"min_count,optional" copier:"MinCount"` - } `json:"server" copier:"Server"` -} - -type CreNetwork struct { - Uuid string `json:"uuid" copier:"Uuid"` -} - -type CreateAlertRuleReq struct { - CLusterId string `json:"clusterId"` - ClusterName string `json:"clusterName"` - Name string `json:"name"` - PromQL string `json:"promQL"` - Duration string `json:"duration"` - Annotations string `json:"annotations,optional"` - AlertLevel string `json:"alertLevel"` - AlertType string `json:"alertType"` -} - -type CreateAlgorithmReq struct { - MetadataCARq *MetadataAlRq `json:"metadata,optional"` - JobConfigCARq *JobConfigAl `json:"jobConfig,optional"` - ResourceRequirementsCARq []*ResourceRequirements `json:"resourceRequirements,optional"` - AdvancedConfigCARq *AdvancedConfigAl `json:"advancedConfig,optional"` - ProjectIdCARq string `path:"projectId"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type CreateAlgorithmResp struct { - MetadataCARp *MetadataAlRp `json:"metadata,omitempty"` - Share_infoCARp *ShareInfo `json:"shareInfo,omitempty"` - JobConfigCARp *JobConfigAl `json:"jobConfig,omitempty"` - ResourceRequirementsCARp []*ResourceRequirements `json:"resourceRequirements,omitempty"` - AdvancedConfigCARp *AdvancedConfigAl `json:"advancedConfig,omitempty"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type CreateDataSetReq struct { - DatasetName string `json:"datasetName" copier:"DatasetName"` - DatasetType int32 `json:"datasetType" copier:"DatasetType"` - Description string `json:"description" copier:"Description"` - WorkPath string `json:"workPath" copier:"WorkPath"` - WorkPathType int32 `json:"workPathType" copier:"WorkPathType"` - ProjectId string `path:"projectId" copier:"ProjectId"` - DataSources []DataSources `json:"dataSources" copier:"DataSources"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type CreateDataSetResp struct { - DatasetId string `json:"datasetId" copier:"DatasetId"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type CreateDeployTaskReq struct { - TaskName string `form:"taskName"` - TaskDesc string `form:"taskDesc"` - ModelName string `form:"modelName"` - ModelType string `form:"modelType"` - AdapterClusterMap map[string][]string `form:"adapterClusterMap"` -} - -type CreateDeployTaskResp struct { -} - -type CreateExportTaskReq struct { - ProjectId string `path:"projectId" copier:"ProjectId"` - DatasetId string `path:"datasetId" copier:"DatasetId"` - Path string `json:"path,optional" copier:"Path"` - AnnotationFormat string `json:"annotationFormat,optional" copier:"AnnotationFormat"` - ExportFormat int64 `json:"exportFormat,optional" copier:"ExportFormat"` - ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` - } `json:"exportParams,optional" copier:"ExportParams"` - ExportType int32 `json:"exportType,optional" copier:"ExportType"` - SampleState string `json:"sampleState,optional" copier:"ExportState"` - SourceTypeHeader string `json:"sourceTypeHeader,optional" copier:"SourceTypeHeader"` - Status int32 `json:"status,optional" copier:"Status"` - VersionFormat string `json:"versionFormat,optional" copier:"VersionFormat"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - WithColumnHeader bool `json:"withColumnHeader,optional" copier:"WithColumnHeader"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type CreateFirewallGroupReq struct { - Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_group,optional" copier:"firewall_group"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreateFirewallGroupResp struct { - Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_group,optional" copier:"firewall_group"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateFirewallPolicyReq struct { - Platform string `json:"platform,optional" copier:"Platform"` - Firewall_policy struct { - Name string `json:"name,optional" copier:"name"` - Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` - Audited bool `json:"audited,optional" copier:"audited"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_policy,optional" copier:"firewall_policy"` -} - -type CreateFirewallPolicyResp struct { - Firewall_policy struct { - Name string `json:"name,optional" copier:"name"` - Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` - Audited bool `json:"audited,optional" copier:"audited"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_policy,optional" copier:"firewall_policy"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateFirewallRuleReq struct { - Platform string `json:"platform,optional" copier:"Platform"` - Firewall_rule struct { - Action string `json:"action,optional" copier:"action"` - Description string `json:"description,optional" copier:"description"` - Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` - Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` - Destination_port string `json:"destination_port,optional" copier:"destination_port"` - Enabled bool `json:"enabled,optional" copier:"enabled"` - Id string `json:"id,optional" copier:"id"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Shared bool `json:"shared,optional" copier:"shared"` - Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` - Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` - Source_port string `json:"source_port,optional" copier:"source_port"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_rule,optional" copier:"firewall_rule"` -} - -type CreateFirewallRuleResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Firewall_rule struct { - Action string `json:"action,optional" copier:"action"` - Description string `json:"description,optional" copier:"description"` - Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` - Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` - Destination_port string `json:"destination_port,optional" copier:"destination_port"` - Enabled bool `json:"enabled,optional" copier:"enabled"` - Id string `json:"id,optional" copier:"id"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Shared bool `json:"shared,optional" copier:"shared"` - Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` - Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` - Source_port string `json:"source_port,optional" copier:"source_port"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_rule,optional" copier:"firewall_rule"` -} - -type CreateFlavorReq struct { - Platform string `json:"platform,optional"` - Flavor struct { - Name string `json:"name" copier:"Name"` - Ram uint32 `json:"ram" copier:"Ram"` - Disk uint32 `json:"disk" copier:"disk"` - Vcpus uint32 `json:"vcpus" copier:"vcpus"` - Id string `json:"id" copier:"id"` - Rxtx_factor float64 `json:"rxtx_factor" copier:"rxtx_factor"` - Description string `json:"description" copier:"description"` - } `json:"flavor" copier:"Flavor"` -} - -type CreateFlavorResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type CreateFloatingIPReq struct { - Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details Port_details `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - } `json:"floatingip,optional" copier:"floatingip"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreateFloatingIPResp struct { - Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details Port_details `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - } `json:"floatingip,omitempty" copier:"floatingip"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateImageReq struct { - Container_format string `json:"container_format" copier:"Container_format"` - Disk_format string `json:"disk_format" copier:"Disk_format"` - Min_disk int32 `json:"min_disk" copier:"Min_disk"` - Min_ram int32 `json:"min_ram" copier:"Min_ram"` - Name string `json:"name" copier:"Name"` - Protected bool `json:"protected" copier:"Protected"` - Platform string `json:"platform,optional"` - Visibility string `json:"visibility" copier:"Visibility"` -} - -type CreateImageResp struct { - Location string `json:"location" copier:"Location"` - Created_at string `json:"created_at" copier:"Created_at"` - Container_format string `json:"Container_format" copier:"Container_format"` - Disk_format string `json:"disk_format" copier:"Disk_format"` - File string `json:"file" copier:"File"` - Id string `json:"id" copier:"Id"` - Min_disk int32 `json:"min_disk" copier:"Min_disk"` - Min_ram int32 `json:"min_ram" copier:"Min_ram"` - Status string `json:"status" copier:"Status"` - Visibility string `json:"visibility" copier:"Visibility"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateMulDomainServer struct { - Platform string `json:"platform,optional"` - Name string `json:"name,optional"` - Min_count int64 `json:"min_count,optional"` - ImageRef string `json:"imageRef,optional"` - FlavorRef string `json:"flavorRef,optional"` - Uuid string `json:"uuid,optional"` - ClusterId string `json:"clusterId,optional"` -} - -type CreateMulServer struct { - Platform string `json:"platform,optional"` - CrServer struct { - Server MulServer `json:"server" copier:"Server"` - } `json:"crserver" copier:"CrServer"` -} - -type CreateMulServerReq struct { - CreateMulServer []CreateMulServer `json:"createMulServer,optional"` -} - -type CreateMulServerResp struct { - Server []MulServerResp `json:"server" copier:"Server"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type CreateNetwork struct { - AdminStateUp bool `json:"admin_state_up" copier:"AdminStateUp"` - Name string `json:"name" copier:"Name"` - Shared bool `json:"shared" copier:"Shared"` -} - -type CreateNetworkReq struct { - Network struct { - AdminStateUp bool `json:"admin_state_up" copier:"AdminStateUp"` - Name string `json:"name" copier:"Name"` - Shared bool `json:"shared" copier:"Shared"` - } `json:"network" copier:"Network"` - Platform string `json:"platform,optional"` -} - -type CreateNetworkResp struct { - Network struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id,optional" copier:"Id"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu,optional" copier:"Mtu"` - Name string `json:"name,optional" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled,optional" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id,optional" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id,optional" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number,optional" copier:"RevisionNumber"` - Shared bool `json:"shared,optional" copier:"Shared"` - RouterExternal bool `json:"router_external,optional" copier:"RouterExternal"` - Status string `json:"status,optional" copier:"Status"` - Subnets []string `json:"subnets,optional" copier:"Subnets"` - Tags []string `json:"tags,optional" copier:"Tags"` - TenantId string `json:"tenant_id,optional" copier:"TenantId"` - UpdatedAt string `json:"updated_at,optional" copier:"UpdatedAt"` - VlanTransparent bool `json:"vlan_transparent,optional" copier:"VlanTransparent"` - Description string `json:"description,optional" copier:"Description"` - IsDefault bool `json:"is_default,optional" copier:"IsDefault"` - } `json:"network" copier:"Network"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateNetworkSegmentRangeReq struct { - NetworkSegmentRange struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - } `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreateNetworkSegmentRangeResp struct { - NetworkSegmentRange struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - } `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateNodeReq struct { - Platform string `json:"platform,optional"` - Name string `json:"name" copier:"Name"` - Driver string `json:"driver" copier:"Driver"` - DriverInfo DriverInfo `json:"driver_info" copier:"DriverInfo"` - ResourceClass string `json:"resource_class" copier:"ResourceClass"` - BootInterface string `json:"boot_interface" copier:"BootInterface"` - ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` - ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` - DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` - InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` - ManagementInterface string `json:"inspect_interface" copier:"ManagementInterface"` - NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` - RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` - StorageInterface string `json:"storage_interface" copier:"StorageInterface"` - Uuid string `json:"uuid" copier:"Uuid"` - VendorInterface string `json:"vendor_interface" copier:"VendorInterface"` - Owner string `json:"owner" copier:"Owner"` - Description string `json:"description" copier:"Description"` - Lessee string `json:"lessee" copier:"Lessee"` - Shard string `json:"shard" copier:"Shard"` - Properties Properties `json:"properties" copier:"Properties"` - AutomatedClean bool `json:"automated_clean" copier:"AutomatedClean"` - BiosInterface string `json:"bios_interface" copier:"BiosInterface"` - ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` - InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` - Maintenance bool `json:"maintenance" copier:"Maintenance"` - MaintenanceReason bool `json:"maintenance_reason" copier:"MaintenanceReason"` - NetworkData NetworkData `json:"network_data" copier:"NetworkData"` - Protected bool `json:"protected" copier:"Protected"` - ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` - Retired bool `json:"retired" copier:"Retired"` - RetiredReason string `json:"retired_reason" copier:"RetiredReason"` -} - -type CreateNodeResp struct { - AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"` - Name string `json:"name" copier:"name"` - PowerState string `json:"power_state" copier:"PowerState"` - TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"` - ProvisionState string `json:"provision_state" copier:"ProvisionState"` - TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"` - Maintenance bool `json:"maintenance" copier:"Maintenance"` - MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"` - Fault string `json:"fault" copier:"Fault"` - LastError string `json:"last_error" copier:"LastError"` - Reservation string `json:"reservation" copier:"Reservation"` - Driver string `json:"driver" copier:"Driver"` - DriverInfo struct { - Ipmi_password string `json:"ipmi_password" copier:"ipmi_password"` - Ipmi_username string `json:"ipmi_username" copier:"ipmi_username"` - } `json:"driver_info" copier:"DriverInfo"` - DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"` - Properties Properties `json:"properties" copier:"Properties"` - InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"` - InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` - ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` - Extra Extra `json:"extra" copier:"Extra"` - ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"` - RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"` - TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"` - CleanStep CleanStep `json:"clean_step" copier:"CleanStep"` - DeployStep DeployStep `json:"clean_step" copier:"DeployStep"` - Links []Links `json:"links" copier:"Links"` - Ports []Ports `json:"ports" copier:"Ports"` - Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"` - States []States `json:"states" copier:"States"` - ResourceClass string `json:"resource_class" copier:"ResourceClass"` - BootInterface string `json:"boot_interface" copier:"BootInterface"` - ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` - DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` - ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` - InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` - ManagementInterface string `json:"management_interface" copier:"ManagementInterface"` - NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` - PowerInterface string `json:"power_interface" copier:"PowerInterface"` - RaidInterface string `json:"raid_interface" copier:"RaidInterface"` - RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` - StorageInterface string `json:"storage_interface" copier:"StorageInterface"` - Traits []string `json:"traits" copier:"Traits"` - Volume []VolumeNode `json:"volume" copier:"Volume"` - Protected bool `json:"protected" copier:"Protected"` - ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` - Conductor string `json:"conductor" copier:"Conductor"` - Owner string `json:"owner" copier:"Owner"` - Lessee string `json:"lessee" copier:"Lessee"` - Shard string `json:"shard" copier:"Shard"` - Description string `json:"description" copier:"Description"` - AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"` - BiosInterface string `json:"bios_interface" copier:"BiosInterface"` - NetworkData NetworkData `json:"network_data" copier:"NetworkData"` - Retired bool `json:"retired" copier:"Retired"` - RetiredReason string `json:"retired_reason" copier:"RetiredReason"` - CreatedAt string `json:"created_at" copier:"CreatedAt"` - InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"` - InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"` - UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` - Uuid string `json:"uuid" copier:"uuid"` - ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type CreateNotebookParam struct { - Description string `json:"description,optional" copier:"Description"` - Duration int64 `json:"duration,optional" copier:"Duration"` - Endpoints []EndpointsReq `json:"endpoints,optional" copier:"Endpoints"` - Feature string `json:"feature,optional" copier:"Feature"` - Flavor string `json:"flavor" copier:"Flavor"` - ImageId string `json:"imageId" copier:"ImageId"` - Name string `json:"name" copier:"Name"` - PoolId string `json:"poolId,optional" copier:"PoolId"` - Volume struct { - Capacity int64 `json:"capacity,optional" copier:"Capacity"` - Category string `json:"category" copier:"Category"` - Ownership string `json:"ownership" copier:"Ownership"` - Uri string `json:"uri,optional" copier:"Uri"` - } `json:"volume" copier:"Volume"` - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` - Hooks struct { - ContainerHooks ContainerHooks `json:"containerHooks" copier:"ContainerHooks"` - } `json:"hooks" copier:"Hooks"` - Lease struct { - Duration int64 `json:"duration,omitempty" copier:"Duration"` - TypeLeaseReq string `json:"type,omitempty" copier:"TypeLeaseReq"` - } `json:"lease,optional" copier:"Lease"` -} - -type CreateNotebookReq struct { - ProjectId string `json:"projectId" copier:"ProjectId"` - Param struct { - Description string `json:"description,optional" copier:"Description"` - Duration int64 `json:"duration,optional" copier:"Duration"` - Endpoints []EndpointsReq `json:"endpoints,optional" copier:"Endpoints"` - Feature string `json:"feature,optional" copier:"Feature"` - Flavor string `json:"flavor" copier:"Flavor"` - ImageId string `json:"imageId" copier:"ImageId"` - Name string `json:"name" copier:"Name"` - PoolId string `json:"poolId,optional" copier:"PoolId"` - Volume VolumeReq `json:"volume" copier:"Volume"` - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` - Hooks CustomHooks `json:"hooks" copier:"Hooks"` - Lease LeaseReq `json:"lease,optional" copier:"Lease"` - } `json:"param" copier:"Param"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type CreateNotebookResp struct { - NotebookResp *NotebookResp `json:"notebookResp,omitempty" copier:"NotebookResp"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type CreatePortReq struct { - Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - } `json:"port,optional" copier:"port"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreatePortResp struct { - Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - } `json:"port,optional" copier:"port"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateProcessorTaskReq struct { - ProjectId string `json:"datasetId" copier:"ProjectId"` - CreateVersion bool `json:"createVersion,optional" copier:"CreateVersion"` - Description string `json:"description,optional" copier:"Description"` - DataSources struct { - Name string `json:"name,optional" copier:"Name"` - Source string `json:"source,optional" copier:"Source"` - Type string `json:"type,optional" copier:"type"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - VersionName string `json:"versionName,optional" copier:"VersionName"` - } `json:"dataSource,optional" copier:"DataSources"` - Inputs []ProcessorDataSource `json:"inputs,optional" copier:"Inputs"` - Name string `json:"name,optional" copier:"Nmae"` - Template struct { - Id string `json:"id,optional" copier:"Id"` - Name string `json:"name,optional" copier:"Name"` - OperatorParam []OperatorParam `json:"operatorParams,optional" copier:"OperatorParam"` - } `json:"template,optional" copier:"Template"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - WorkPath struct { - Name string `json:"name,optional" copier:"name"` - OutputPath string `json:"outputPath,optional" copier:"OutputPath"` - Path string `json:"path,optional" copier:"Path"` - Type string `json:"type,optional" copier:"type"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - VersionName string `json:"versionName,optional" copier:"VersionName"` - } `json:"workPath,optional" copier:"WorkPath"` - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type CreateProcessorTaskResp struct { - TaskId string `json:"taskId,optional" copier:"Code"` - Code int32 `json:"code,optional" copier:"Code"` - Msg string `json:"msg,optional" copier:"Msg"` -} - -type CreateRouterReq struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreateRouterResp struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateSecurityGroupReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` -} - -type CreateSecurityGroupResp struct { - Security_group struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` - Security_group_rules []Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` - } `json:"security_group,optional" copier:"security_group"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateSecurityGroupRuleReq struct { - Platform string `json:"platform,optional" copier:"Platform"` -} - -type CreateSecurityGroupRuleResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group_rule struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` - } `json:"security_group_rule,optional" copier:"security_group_rule"` -} - -type CreateServerReq struct { - Platform string `json:"platform,optional"` - CrServer struct { - Server Server `json:"server" copier:"Server"` - } `json:"crserver" copier:"CrServer"` -} - -type CreateServerResp struct { - Server struct { - Id string `json:"id" copier:"Id"` - Links []Links `json:"links" copier:"Links"` - OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` - SecurityGroups []Security_groups_server `json:"security_groups" copier:"SecurityGroups"` - AdminPass string `json:"adminPass" copier:"AdminPass"` - } `json:"server" copier:"Server"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type CreateServiceReq struct { - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` - Schedule struct { - Duration int32 `json:"duration,optional" copier:"Duration"` - TimeUnit string `json:"timeUnit,optional" copier:"TimeUnit"` - Type string `json:"type,optional" copier:"Type"` - } `json:"schedule,optional" copier:"Schedule"` - ClusterId string `json:"clusterId,optional" copier:"ClusterId"` - InferType string `json:"inferType,optional" copier:"InferType"` - VpcId string `json:"vpcId,optional" copier:"VpcId"` - ServiceName string `json:"serviceName,optional" copier:"ServiceName"` - Description string `json:"description,optional" copier:"Description"` - SecurityGroupId string `json:"securityGroupId,optional" copier:"SecurityGroupId"` - SubnetNetworkId string `json:"subnetNetworkId,optional" copier:"SubnetNetworkId"` - Config []ServiceConfig `json:"config,optional" copier:"Config"` - ProjectId string `path:"projectId"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type CreateServiceResp struct { - ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` - ResourceIds []string `json:"resourceIds,omitempty" copier:"ResourceIds"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type CreateSubnetReq struct { - Subnet struct { - NetworkId string `json:"network_id" copier:"NetworkId"` - Name string `json:"name" copier:"Name"` - Cidr string `json:"cidr" copier:"Cidr"` - Ip_version int32 `json:"ip_version" copier:"IpVersion"` - Gateway_ip string `json:"gateway_ip" copier:"GatewayIp"` - Enable_dhcp bool `json:"enable_dhcp" copier:"EnableDhcp"` - Allocation_pools []Allocation_pools `json:"allocation_pools" copier:"AllocationPools"` - Dns_nameservers []string `json:"dns_nameservers" copier:"DnsNameservers"` - Host_routes []string `json:"host_routes" copier:"HostRoutes"` - } `json:"subnet" copier:"Subnet"` - Platform string `json:"platform,optional"` -} - -type CreateSubnetResp struct { - Subnet struct { - Name string `json:"name" copier:"Name"` - Cidr string `json:"cidr" copier:"Cidr"` - Ip_version int32 `json:"ip_version" copier:"Ip_version"` - Gateway_ip string `json:"gateway_ip" copier:"Gateway_ip"` - Enable_dhcp bool `json:"enable_dhcp" copier:"Enable_dhcp"` - Allocation_pools []Allocation_pools `json:"allocation_pools" copier:"Allocation_pools"` - Dns_nameservers []string `json:"dns_nameservers" copier:"Dns_nameservers"` - Host_routes []string `json:"host_routes" copier:"Host_routes"` - Network_id string `json:"network_id" copier:"Network_id"` - Segment_id string `json:"segment_id" copier:"Segment_id"` - Project_id string `json:"project_id" copier:"Project_id"` - Tenant_id string `json:"tenant_id" copier:"Tenant_id"` - Dns_publish_fixed_ip string `json:"Dns_publish_fixed_ip" copier:"Dns_publish_fixed_ip"` - Id string `json:"id" copier:"Id"` - Created_at string `json:"created_at" copier:"Created_at"` - Description string `json:"description" copier:"Description"` - Ipv6_address_mode string `json:"ipv6_address_mode" copier:"Ipv6_address_mode"` - Ipv6_ra_mode string `json:"ipv6_ra_mode" copier:"Ipv6_ra_mode"` - Revision_number string `json:"revision_number" copier:"Revision_number"` - Service_types []string `json:"service_types" copier:"Service_types"` - Subnetpool_id string `json:"subnetpool_id" copier:"Subnetpool_id"` - Tags []string `json:"tags" copier:"Tags"` - Updated_at string `json:"updated_at" copier:"Updated_at"` - } `json:"subnet" copier:"Subnet"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateTrainingJobReq struct { - Kind string `json:"kind,optional"` - Metadatas struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - Description string `json:"description,optional"` - WorkspaceId string `json:"workspaceId,optional"` - } `json:"metadata,optional"` - AlgorithmsCtRq struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - CodeDir string `json:"codeDir,optional"` - BootFile string `json:"bootFile,optional"` - EngineCreateTraining EngineCreateTraining `json:"engine,optional"` - ParametersTrainJob []ParametersTrainJob `json:"parameters,optional"` - PoliciesCreateTraining PoliciesCreateTraining `json:"policies,optional"` - Command string `json:"command,optional"` - SubscriptionId string `json:"subscriptionId,optional"` - ItemVersionId string `json:"itemVersionId,optional"` - InputTra []InputTra `json:"inputs,optional"` - OutputTra []OutputTra `json:"outputs,optional"` - Environments Environments `json:"environments,optional"` - } `json:"algorithm,optional"` - SpecsCtRq struct { - Resource ResourceCreateTraining `json:"resource,optional"` - Volumes []Volumes `json:"volumes,optional"` - LogExportPath LogExportPath `json:"logExportPath,optional"` - } `json:"spec,optional"` - ProjectId string `path:"projectId"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type CreateTrainingJobResp struct { - Kind string `json:"kind,omitempty"` - Metadatas *MetadataS `json:"metadata,omitempty"` - Status *Status `json:"status,omitempty"` - SpecCtRp *SpecCtRp `json:"spec,omitempty"` - Algorithms *AlgorithmsCtRq `json:"algorithm,omitempty"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type CreateVisualizationJobParam struct { - Job_name string `json:"jobName"` - Job_desc string `json:"jobDesc"` - Train_url string `json:"trainUrl"` - Job_type string `json:"jobType"` - Flavor struct { - Code string `json:"code"` - } `json:"flavor"` - Schedule struct { - Type_schedule string `json:"type"` - Time_unit string `json:"timeUnit"` - Duration int32 `json:"duration"` - } `json:"schedule"` -} - -type CreateVisualizationJobReq struct { - Project_id string `json:"projectId"` - Param struct { - Job_name string `json:"jobName"` - Job_desc string `json:"jobDesc"` - Train_url string `json:"trainUrl"` - Job_type string `json:"jobType"` - Flavor Flavor `json:"flavor"` - Schedule Schedule `json:"schedule"` - } `json:"param"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type CreateVisualizationJobResp struct { - Error_message string `json:"errorMessage"` - Error_code string `json:"errorCode"` - Job_id int64 `json:"jobId"` - Job_name string `json:"jobName"` - Status int32 `json:"status"` - Create_time int64 `json:"createTime"` - Service_url string `json:"serviceUrl"` -} - -type CreateVolumeReq struct { - Volume struct { - Size int32 `json:"size" copier:"Size"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Description string `json:"description" copier:"Description"` - Name string `json:"name" copier:"Name"` - VolumeType string `json:"volume_type" copier:"VolumeType"` - } `json:"volume" copier:"Volume"` - Platform string `json:"platform,optional"` -} - -type CreateVolumeResp struct { - Volume struct { - CreatedAt string `json:"created_at" copier:"CreatedAt"` - Id string `json:"id" copier:"Id"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Encrypted bool `json:"encrypted" copier:"Encrypted"` - Name string `json:"name" copier:"Name"` - Size int32 `json:"size" copier:"Size"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` - Description string `json:"description" copier:"Description"` - Multiattach bool `json:"multiattach" copier:"Multiattach"` - Bootable bool `json:"bootable" copier:"Bootable"` - VolumeType string `json:"volume_type" copier:"VolumeType"` - Count int32 `json:"count" copier:"Count"` - SharedTargets bool `json:"shared_targets" copier:"SharedTargets"` - ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` - } `json:"volume" copier:"Volume"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CreateVolumeTypeReq struct { - VolumeType struct { - Name string `json:"name" copier:"Name"` - Description string `json:"description" copier:"Description"` - ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"` - Id string `json:"id" copier:"Id"` - IsPublic bool `json:"is_public" copier:"IsPublic"` - } `json:"volume_type" copier:"VolumeType"` - Platform string `json:"platform,optional"` -} - -type CreateVolumeTypeResp struct { - VolumeType struct { - Name string `json:"name" copier:"Name"` - Description string `json:"description" copier:"Description"` - ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"` - Id string `json:"id" copier:"Id"` - IsPublic bool `json:"is_public" copier:"IsPublic"` - } `json:"volume_type" copier:"VolumeType"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type CustomHooks struct { - ContainerHooks struct { - PostStart Config `json:"postStart" copier:"PostStart"` - PreStart Config `json:"preStart" copier:"PreStart"` - } `json:"containerHooks" copier:"ContainerHooks"` -} - -type CustomSpec struct { - GpuP4 float64 `json:"gpuP4,optional" copier:"GpuP4"` - Memory int64 `json:"memory,optional" copier:"Memory"` - Cpu float64 `json:"cpu,optional" copier:"Cpu"` - AscendA310 int64 `json:"ascendA310,optional" copier:"AscendA310"` -} - -type DailyPowerScreenResp struct { - Chart interface{} `json:"chart"` -} - -type DataSet struct { - ApiVersion int32 `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - Name string `json:"name,omitempty"` - NameSpace string `json:"nameSpace,omitempty"` -} - -type DataSetReq struct { - ProjectId string `path:"projectId"` - Limit int32 `form:"limit,optional"` - OffSet int32 `form:"offSet,optional"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type DataSetResp struct { - TotalNumber uint32 `json:"totalNumber" copier:"TotalNumber"` - Datasets []DataSets `json:"dataSets" copier:"Datasets"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type DataSets struct { - DatasetId string `json:"datasetId" copier:"DatasetId"` - DataFormat string `json:"dataFormat" copier:"DataFormat"` - DataSources []DataSources `json:"dataSources" copier:"DataSources"` - DatasetFormat int32 `json:"datasetFormat" copier:"DatasetFormat"` - DatasetName string `json:"datasetName" copier:"DatasetName"` - DatasetType int32 `json:"datasetType" copier:"DatasetType"` - ImportData bool `json:"importData" copier:"ImportData"` - TotalSampleCount int32 `json:"totalSampleCount" copier:"TotalSampleCount"` - CreateTime int64 `json:"createTime" copier:"CreateTime"` - Description string `json:"description" copier:"Description"` -} - -type DataSources struct { - DataPath string `json:"dataPath" copier:"DataPath"` - DataType int32 `json:"dataType" copier:"DataType"` -} - -type DataVolumesRes struct { - Category string `json:"category" copier:"Category"` - Id string `json:"id" copier:"Id"` - MountPath string `json:"mountPath" copier:"MountPath"` - Status string `json:"status" copier:"Status"` - Uri string `json:"uri" copier:"Uri"` -} - -type DatasetTra struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - VersionName string `json:"versionName,optional"` - VersionId string `json:"versionId,optional"` -} - -type DeleteAlertRuleReq struct { - Id int64 `form:"id"` - ClusterName string `form:"clusterName"` - Name string `form:"name"` -} - -type DeleteAlgorithmReq struct { - ProjectId string `path:"projectId" copier:"ProjectId"` - AlgorithmId string `path:"algorithmId" jcopier:"AlgorithmId"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type DeleteAlgorithmResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type DeleteAppReq struct { - Name string `form:"name"` - NsID string `form:"nsID"` -} - -type DeleteAppResp struct { - Code int `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data interface{} `json:"data,omitempty"` -} - -type DeleteDataSetReq struct { - DatasetId string `path:"datasetId"` - ProjectId string `path:"projectId"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type DeleteDataSetResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type DeleteFirewallGroupReq struct { - Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` - Platform string `form:"platform,optional" copier:"Platform"` -} - -type DeleteFirewallGroupResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteFirewallPolicyReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_policy_id string `json:"firewall_policy_id,optional" copier:"firewall_policy_id"` -} - -type DeleteFirewallPolicyResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteFirewallRuleReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` -} - -type DeleteFirewallRuleResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteFlavorReq struct { - Platform string `form:"platform,optional"` - ServerId string `json:"server_id" copier:"ServerId"` - FlavorId string `json:"flavor_id" copier:"FlavorId"` -} - -type DeleteFlavorResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type DeleteFloatingIPReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` -} - -type DeleteFloatingIPResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteImageReq struct { - ImageId string `form:"image_id" copier:"ImageId"` - Platform string `form:"platform,optional"` -} - -type DeleteImageResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type DeleteLinkImageReq struct { - PartId int64 `json:"partId"` - ImageId string `json:"imageId"` -} - -type DeleteLinkImageResp struct { - Success bool `json:"success"` - ErrorMsg string `json:"errorMsg"` -} - -type DeleteLinkTaskReq struct { - PartId int64 `json:"partId"` - TaskId string `json:"taskId"` -} - -type DeleteLinkTaskResp struct { - Success bool `json:"success"` - ErrorMsg string `json:"errorMsg"` -} - -type DeleteNetworkReq struct { - NetworkId string `form:"network_id" copier:"NetworkId"` - Platform string `form:"platform,optional"` -} - -type DeleteNetworkResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteNetworkSegmentRangesReq struct { - Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` - Platform string `form:"platform,optional"` -} - -type DeleteNetworkSegmentRangesResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteNodeReq struct { - Platform string `json:"platform,optional"` - NodeIdent string `json:"node_ident" copier:"NodeIdent"` -} - -type DeleteNodeResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type DeletePortReq struct { - Port_id string `json:"port_id,optional" copier:"port_id"` - Platform string `form:"platform,optional" copier:"platform"` -} - -type DeletePortResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteReq struct { - YamlString string `json:"yamlString" copier:"yamlString"` -} - -type DeleteResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data string `json:"data,omitempty"` -} - -type DeleteRouterReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Router_id string `json:"router_id,optional" copier:"router_id"` -} - -type DeleteRouterResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteSecurityGroupReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` -} - -type DeleteSecurityGroupResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteSecurityGroupRuleReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"` -} - -type DeleteSecurityGroupRuleResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group_rule struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` - } `json:"security_group_rule,optional" copier:"security_group_rule"` -} - -type DeleteServerReq struct { - ServerId string `form:"server_id" copier:"ServerId"` - Platform string `form:"platform,optional"` -} - -type DeleteServerResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type DeleteServiceReq struct { - ProjectId string `path:"projectId"` - ServiceId string `path:"serviceId"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type DeleteServiceResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type DeleteSubnetReq struct { - SubnetId string `json:"subnet_id,optional" copier:"subnetId"` - Platform string `form:"platform,optional" copier:"Platform"` -} - -type DeleteSubnetResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteTrainingJobReq struct { - Project_id string `path:"projectId"` - Training_job_id string `path:"trainingJobId"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type DeleteTrainingJobResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type DeleteVolumeReq struct { - VolumeId string `form:"volume_id" copier:"VolumeId"` - Cascade bool `json:"cascade" copier:"Cascade"` - Force bool `json:"force" copier:"force"` - Platform string `form:"platform,optional"` -} - -type DeleteVolumeResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeleteVolumeTypeReq struct { - VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"` - Platform string `form:"platform,optional"` -} - -type DeleteVolumeTypeResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type DeployInstance struct { - Id string `json:"id"` - DeployTaskId string `json:"deployTaskId"` - InstanceId string `json:"instanceId"` - InstanceName string `json:"instanceName"` - AdapterId string `json:"adapterId"` - AdapterName string `json:"adapterName"` - ClusterId string `json:"clusterId"` - ClusterName string `json:"clusterName"` - ModelName string `json:"modelName"` - ModelType string `json:"modelType"` - InferCard string `json:"inferCard"` - Status string `json:"status"` - CreateTime string `json:"createTime"` - UpdateTime string `json:"updateTime"` - ClusterType string `json:"clusterType"` -} - -type DeployInstanceListReq struct { - PageInfo -} - -type DeployInstanceListResp struct { - PageResult -} - -type DeployInstanceStatReq struct { -} - -type DeployInstanceStatResp struct { - Running int32 `json:"running"` - Total int32 `json:"total"` -} - -type DeployStep struct { -} - -type DictCodeReq struct { - DictCode string `path:"dictCode"` -} - -type DictEditReq struct { - Id string `json:"id,optional"` - DictName string `json:"dictName,optional"` - DictCode string `json:"dictCode,optional"` - Description string `json:"description,optional"` - Type string `json:"type,optional"` - Status string `json:"status,optional"` +type InfoList struct { + Type string `json:"type,omitempty"` + ResourceType string `json:"resource_type,omitempty"` + TName string `json:"name,omitempty"` + InfoName string `json:"info_name,omitempty"` } type DictInfo struct { @@ -2491,17 +941,40 @@ type DictInfo struct { CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` } -type DictItemEditReq struct { +type DictReq struct { + Id string `form:"id,optional"` + DictName string `form:"dictName,optional"` + DictCode string `form:"dictCode,optional"` + Description string `form:"description,optional"` + Type string `form:"type,optional"` + Status string `form:"status,optional"` + PageInfo +} + +type DictEditReq struct { Id string `json:"id,optional"` - DictId string `json:"dictId,optional"` - ItemText string `json:"itemText,optional"` - ItemValue string `json:"itemValue,optional"` + DictName string `json:"dictName,optional"` + DictCode string `json:"dictCode,optional"` Description string `json:"description,optional"` - SortOrder string `json:"sortOrder,optional"` - ParentId string `json:"parentId,optional"` + Type string `json:"type,optional"` Status string `json:"status,optional"` } +type DictResp struct { + Id string `json:"id,omitempty"` + DictName string `json:"dictName,omitempty"` + DictCode string `json:"dictCode,omitempty"` + Description string `json:"description,omitempty"` + Type string `json:"type,omitempty"` + Status string `json:"status,omitempty"` + CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` + DictItemInfo []*DictItemInfo `json:"dictItemInfo,omitempty"` +} + +type Dicts struct { + List []DictInfo `json:"list,omitempty"` +} + type DictItemInfo struct { Id string `json:"id,omitempty"` DictId string `json:"dictId,omitempty"` @@ -2527,6 +1000,17 @@ type DictItemReq struct { Status string `form:"status,optional"` } +type DictItemEditReq struct { + Id string `json:"id,optional"` + DictId string `json:"dictId,optional"` + ItemText string `json:"itemText,optional"` + ItemValue string `json:"itemValue,optional"` + Description string `json:"description,optional"` + SortOrder string `json:"sortOrder,optional"` + ParentId string `json:"parentId,optional"` + Status string `json:"status,optional"` +} + type DictItemResp struct { Id string `json:"id,omitempty"` DictId string `json:"dictId,omitempty"` @@ -2544,894 +1028,36 @@ type DictItems struct { List []DictItemInfo `json:"list,omitempty"` } -type DictReq struct { - Id string `form:"id,optional"` - DictName string `form:"dictName,optional"` - DictCode string `form:"dictCode,optional"` - Description string `form:"description,optional"` - Type string `form:"type,optional"` - Status string `form:"status,optional"` - PageInfo +type DictCodeReq struct { + DictCode string `path:"dictCode"` } -type DictResp struct { - Id string `json:"id,omitempty"` - DictName string `json:"dictName,omitempty"` - DictCode string `json:"dictCode,omitempty"` - Description string `json:"description,omitempty"` - Type string `json:"type,omitempty"` - Status string `json:"status,omitempty"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` - DictItemInfo []*DictItemInfo `json:"dictItemInfo,omitempty"` +type CId struct { + Id string `path:"id":"id,omitempty" validate:"required"` } -type Dicts struct { - List []DictInfo `json:"list,omitempty"` -} - -type Disk struct { - Size int32 `json:"size"` - Unit string `json:"unit"` -} - -type Dns_assignment struct { - Hostname string `json:"hostname,optional" copier:"hostname"` - Ip_address string `json:"ip_address,optional" copier:"ip_address"` - Opt_name string `json:"opt_name,optional" copier:"opt_name"` -} - -type DomainResource struct { - Id int64 `json:"id"` // id - DomainId string `json:"domainId"` // 资源域id - DomainName string `json:"domainName"` // 资源域名称 - JobCount int64 `json:"jobCount"` // 资源域任务数量 - DomainSource int64 `json:"domainSource"` // 资源域数据来源:0-nudt,1-鹏城 - Stack string `json:"stack"` // 技术栈 - ResourceType string `json:"resourceType"` // 资源类型 - Cpu float64 `json:"cpu"` // cpu使用率 - Memory float64 `json:"memory"` // 内存使用率 - Disk float64 `json:"disk"` // 存储使用率 - NodeCount float64 `json:"nodeCount"` //节点使用率 - Description string `json:"description"` //集群描述 - ClusterName string `json:"clusterName"` //集群名称 - CpuTotal float64 `json:"cpuTotal"` //cpu总核数 - MemoryTotal float64 `json:"memoryTotal"` //内存总量Gi - DiskTotal float64 `json:"diskTotal"` //存储总量GB - NodeTotal float64 `json:"nodeTotal"` //容器节点数 - CpuUsage float64 `json:"cpuUsage"` //cpu已使用核数 - MemoryUsage float64 `json:"memoryUsage"` //内存已使用Gi - DiskUsage float64 `json:"diskUsage"` //存储已使用GB - NodeUsage float64 `json:"nodeUsage"` //容器节点已使用 -} - -type DomainResourceResp struct { - TotalCount int `json:"totalCount"` - DomainResourceList []DomainResource `json:"domainResourceList"` -} - -type DownloadAlgorithmCodeReq struct { - AdapterId string `form:"adapterId"` - ClusterId string `form:"clusterId"` - ResourceType string `form:"resourceType"` - Card string `form:"card"` - TaskType string `form:"taskType"` - Dataset string `form:"dataset"` - Algorithm string `form:"algorithm"` -} - -type DownloadAlgorithmCodeResp struct { - Code string `json:"code"` -} - -type DriverInfo struct { -} - -type DriverInternalInfo struct { -} - -type Driver_info struct { - Ipmi_password string `json:"ipmi_password" copier:"ipmi_password"` - Ipmi_username string `json:"ipmi_username" copier:"ipmi_username"` -} - -type EndpointsReq struct { - AllowedAccessIps []string `json:"allowedAccessIps" copier:"AllowedAccessIps"` - DevService string `json:"devService" copier:"DevService"` - SshKeys []string `json:"sshKeys" copier:"SshKeys"` -} - -type EndpointsRes struct { - AllowedAccessIps []string `json:"allowedAccessIps,omitempty" copier:"AllowedAccessIps"` - DevService string `json:"devService,omitempty" copier:"DevService"` - SshKeys []string `json:"sshKeys,omitempty" copier:"SshKeys"` -} - -type Engine struct { - EngineID string `json:"engineId"` - EngineName string `json:"engineName"` - EngineVersion string `json:"engineVersion"` - V1Compatible bool `json:"v1Compatible"` - RunUser string `json:"runUser"` - ImageSource bool `json:"imageSource"` -} - -type EngineAlRq struct { - EngineId string `json:"engineId,optional"` - EngineName string `json:"engineName,optional"` - EngineVersion string `json:"engineVersion,optional"` - ImageUrl string `json:"imageUrl,optional"` -} - -type EngineCreateTraining struct { - EngineId string `json:"engineId,optional"` - EngineName string `json:"engineName,optional"` - EngineVersion string `json:"engineVersion,optional"` - ImageUrl string `json:"imageUrl,optional"` -} - -type EnvSl struct { - Key string `json:"key"` - Val string `json:"value"` -} - -type Environments struct { -} - -type ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` -} - -type ExportTaskDataResp struct { - TaskId string `json:"taskId,omitempty" copier:"TaskId"` - CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` - ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` - ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` - } `json:"exportParams,omitempty" copier:"ExportParams"` - FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` - Path string `json:"path,omitempty" copier:"Path"` - Progress float64 `json:"progress,omitempty" copier:"Progress"` - Status string `json:"status,omitempty" copier:"Status"` - TotalSampleCount int64 `json:"totalSampleCount,omitempty" copier:"TotalSampleCount"` - UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` - VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` - VersionId string `json:"versionId,omitempty" copier:"VersionId"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type ExportTaskStatus struct { - TaskId string `json:"taskId,omitempty" copier:"TaskId"` - CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` - ErrorCode string `json:"errorCode,omitempty" copier:"ErrorCode"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` - ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` - } `json:"exportParams,omitempty" copier:"ExportParams"` - FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` - Path string `json:"path,omitempty" copier:"Path"` - Progress float64 `json:"progress,omitempty" copier:"Progress"` - Status string `json:"status,omitempty" copier:"Status"` - TotalCount int64 `json:"totalCount,omitempty" copier:"TotalCount"` - UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` - VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` - VersionId string `json:"versionId,omitempty" copier:"VersionId"` - ExportType int32 `json:"exportType,omitempty" copier:"ExportType"` - TotalSample int64 `json:"totalSample,omitempty" copier:"TotalSample"` -} - -type External_fixed_ips struct { - Destination string `json:"destination,optional" copier:"destination"` - Subnet_id string `json:"subnet_id,optional" copier:"subnet_id"` -} - -type External_gateway_info struct { - Enable_snat string `json:"enable_snat,optional" copier:"enable_snat"` - External_fixed_ips []External_fixed_ips `json:"external_fixed_ips,optional" copier:"external_fixed_ips"` - Platform string `json:"platform,optional" copier:"platform"` -} - -type Extra struct { -} - -type ExtraSpecs struct { - Capabilities string `json:"capabilities" copier:"Capabilities"` -} - -type Extra_dhcp_opts struct { - Opt_value string `json:"opt_value,optional" copier:"opt_value"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Fqdn string `json:"fqdn,optional" copier:"fqdn"` -} - -type Extra_specs struct { - Capabilities string `json:"capabilities" copier:"Capabilities"` +type CIds struct { + Ids []string `json:"ids,omitempty" validate:"required"` } type FId struct { Id string `form:"id":"id,omitempty" validate:"required"` } -type Fault struct { - Code uint32 `json:"code " copier:"Code"` - Created string `json:"created " copier:"Created"` - Message string `json:"message " copier:"Message"` - Details string `json:"details " copier:"Details"` +type PageInfo struct { + PageNum int `form:"pageNum"` + PageSize int `form:"pageSize"` } -type Fields struct { +type PageResult struct { + List interface{} `json:"list,omitempty"` + Total int64 `json:"total,omitempty"` + PageNum int `json:"pageNum,omitempty"` + PageSize int `json:"pageSize,omitempty"` } -type Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Firewall_groups struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - Description string `json:"description,optional" copier:"description"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Id string `json:"id,optional" copier:"id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Firewall_policies struct { - Audited bool `json:"audited,optional" copier:"audited"` - Description string `json:"description,optional" copier:"description"` - Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Firewall_policy struct { - Name string `json:"name,optional" copier:"name"` - Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` - Audited bool `json:"audited,optional" copier:"audited"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Firewall_rule struct { - Action string `json:"action,optional" copier:"action"` - Description string `json:"description,optional" copier:"description"` - Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` - Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` - Destination_port string `json:"destination_port,optional" copier:"destination_port"` - Enabled bool `json:"enabled,optional" copier:"enabled"` - Id string `json:"id,optional" copier:"id"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Shared bool `json:"shared,optional" copier:"shared"` - Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` - Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` - Source_port string `json:"source_port,optional" copier:"source_port"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Firewall_rules struct { - Action string `json:"action,optional" copier:"action"` - Description string `json:"description,optional" copier:"description"` - Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` - Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` - Destination_port string `json:"destination_port,optional" copier:"destination_port"` - Enabled bool `json:"enabled,optional" copier:"enabled"` - Id string `json:"id,optional" copier:"id"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Shared bool `json:"shared,optional" copier:"shared"` - Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` - Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` - Source_port string `json:"source_port,optional" copier:"source_port"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` -} - -type Fixed_ips struct { - Ip_address string `json:"ip_address,optional" copier:"ip_address"` - Subnet_id string `json:"subnet_id,optional" copier:"subnet_id"` -} - -type Flavor struct { - Code string `json:"code"` -} - -type FlavorDetail struct { - FlavorType string `json:"flavorType"` - Billing struct { - Code string `json:"code"` - UnitNum int32 `json:"unitNum"` - } `json:"billing"` - Attributes struct { - DataFormat []string `json:"dataFormat"` - DataSegmentation []string `json:"dataSegmentation"` - DatasetType []string `json:"datasetType"` - IsFree string `json:"isFree"` - MaxFreeJobCount string `json:"maxFreeJobCount"` - } `json:"attributes"` - FlavorInfo struct { - CPU CPU `json:"cpu"` - Gpu Gpu `json:"gpu"` - Memory Memory `json:"memory"` - Disk Disk `json:"disk"` - } `json:"flavorInfo"` -} - -type FlavorDetailed struct { - Id string `json:"id" copier:"Id"` - Links string `json:"links" copier:"Links"` - Vcpus string `json:"vcpus" copier:"Vcpus"` - Ram uint32 `json:"ram" copier:"Ram"` - Disk uint32 `json:"ram" copier:"Disk"` - Dphemeral uint32 `json:"ephemeral" copier:"Dphemeral"` - Swap uint32 `json:"swap" copier:"Swap"` - OriginalName string `json:"OriginalName" copier:"OriginalName"` - ExtraSpecs struct { - Capabilities string `json:"capabilities" copier:"Capabilities"` - } `json:"Extra_specs" copier:"ExtraSpecs"` -} - -type FlavorDict struct { - Id int `json:"id"` - PublicFlavorName string `json:"public_flavor_name"` -} - -type FlavorInfo struct { - CPU struct { - Arch string `json:"arch"` - CoreNum int32 `json:"coreNum"` - } `json:"cpu"` - Gpu struct { - MemUsage MemUsage `json:"memUsage"` - Util Util `json:"util"` - UnitNum int32 `json:"unitNum"` - ProductName string `json:"productName"` - Memory string `json:"memory"` - } `json:"gpu"` - Memory struct { - Size int `json:"size"` - Unit string `json:"unit"` - } `json:"memory"` - Disk struct { - Size int32 `json:"size"` - Unit string `json:"unit"` - } `json:"disk"` -} - -type FlavorServer struct { - Name string `json:"name" copier:"Name"` - Ram uint32 `json:"ram" copier:"Ram"` - Disk uint32 `json:"disk" copier:"disk"` - Vcpus uint32 `json:"vcpus" copier:"vcpus"` - Id string `json:"id" copier:"id"` - Rxtx_factor float64 `json:"rxtx_factor" copier:"rxtx_factor"` - Description string `json:"description" copier:"description"` -} - -type Flavors struct { - Name string `json:"name" copier:"name"` - Description string `json:"description" copier:"description"` - Id string `json:"id" copier:"id"` - Disk int32 `json:"disk" copier:"disk"` - Ephemeral uint32 `json:"ephemeral" copier:"ephemeral"` - Original_name string `json:"original_name" copier:"original_name"` - Ram int32 `json:"ram" copier:"ram"` - Swap int32 `json:"swap" copier:"swap"` - Vcpus int32 `json:"vcpus" copier:"vcpus"` - Rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"` - Os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"` -} - -type Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details struct { - Status string `json:"status,optional" copier:"status"` - Name string `json:"name,optional" copier:"name"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Device_id string `json:"device_id,optional" copier:"device_id"` - } `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` -} - -type Floatingips struct { - Router_id string `json:"router_id,optional" copier:"router_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Id string `json:"id,optional" copier:"id"` - Status string `json:"status,optional" copier:"status"` - Port_details struct { - Status string `json:"status,optional" copier:"status"` - Name string `json:"name,optional" copier:"name"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Device_id string `json:"device_id,optional" copier:"device_id"` - } `json:"port_details,optional" copier:"port_details"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` -} - -type GeneralTaskReq struct { - Name string `json:"name"` - AdapterIds []string `json:"adapterIds"` - ClusterIds []string `json:"clusterIds"` - Strategy string `json:"strategy"` - StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` - ReqBody []string `json:"reqBody"` - Replicas int64 `json:"replicas,string"` -} - -type GetAdaptersByModelReq struct { - ModelName string `form:"modelName"` - ModelType string `form:"modelType"` -} - -type GetAdaptersByModelResp struct { - Adapters []*AdapterAvail `json:"adapters"` -} - -type GetClusterBalanceByIdReq struct { - AdapterId string `path:"adapterId"` - ClusterId string `path:"clusterId"` -} - -type GetClusterBalanceByIdResp struct { - Balance float64 `json:"balance"` -} - -type GetComputeCardsByClusterReq struct { - AdapterId string `path:"adapterId"` - ClusterId string `path:"clusterId"` -} - -type GetComputeCardsByClusterResp struct { - Cards []string `json:"cards"` -} - -type GetComputeLimitsReq struct { - Platform string `form:"platform,optional"` -} - -type GetComputeLimitsResp struct { - Limits struct { - Rate Rate `json:"rate,optional"` - Absolute Absolute `json:"absolute,optional"` - } `json:"limits,optional"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type GetDeployTasksByTypeReq struct { - ModelType string `form:"modelType"` -} - -type GetDeployTasksByTypeResp struct { - List interface{} `json:"list"` -} - -type GetExportTaskStatusOfDatasetReq struct { - ProjectId string `path:"projectId"` - ResourceId string `path:"resourceId"` - TaskId string `path:"taskId"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type GetExportTaskStatusOfDatasetResp struct { - TaskId string `json:"taskId,optional" copier:"TaskId"` - CreateTime uint32 `json:"createTime,optional" copier:"CreateTime"` - ExportFormat int64 `json:"exportFormat,optional" copier:"ExportFormat"` - ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` - } `json:"exportParams,optional" copier:"ExportParams"` - ExportTasks []ExportTaskStatus `json:"exportTasks,optional" copier:"ExportTasks"` - FinishedSampleCount int32 `json:"finishedSampleCount,optional" copier:"FinishedSampleCount"` - Path string `json:"path,optional" copier:"Path"` - Progress float64 `json:"progress,optional" copier:"Progress"` - Status string `json:"status,optional" copier:"Status"` - TotalCount int64 `json:"totalCount,optional" copier:"TotalCount"` - UpdateTime uint32 `json:"updateTime,optional" copier:"UpdateTime"` - VersionFormat string `json:"versionFormat,optional" copier:"VersionFormat"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - ExportType int32 `json:"exportType,optional" copier:"ExportType"` - TotalSample int64 `json:"totalSample,optional" copier:"TotalSample"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type GetExportTasksOfDatasetReq struct { - ProjectId string `path:"projectId" copier:"ProjectId"` - DatasetId string `path:"datasetId" copier:"DatasetId"` - ExportType int32 `json:"exportType,optional" copier:"ExportType"` - Limit int32 `form:"limit,optional"` - Offset int32 `form:"offset,optional"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type GetExportTasksOfDatasetResp struct { - TaskId string `json:"taskId,omitempty" copier:"TaskId"` - CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` - ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` - ExportParams struct { - ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` - ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` - ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` - ExportDest string `json:"exportDest,optional" copier:"ExportDest"` - ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` - ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` - RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` - SampleState string `json:"sampleState,optional" copier:"SampleState"` - Sample []string `json:"sample,optional" copier:"Sample"` - SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` - TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` - } `json:"exportParams,omitempty" copier:"ExportParams"` - ExportTasks []ExportTaskStatus `json:"exportTasks,omitempty" copier:"ExportTasks"` - FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` - Path string `json:"path,omitempty" copier:"Path"` - Progress float64 `json:"progress,omitempty" copier:"Progress"` - Status string `json:"status,omitempty" copier:"Status"` - TotalCount int64 `json:"totalCount,omitempty" copier:"TotalCount"` - UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` - VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` - VersionId string `json:"versionId,omitempty" copier:"VersionId"` - ExportType int32 `json:"exportType,omitempty" copier:"ExportType"` - TotalSample int64 `json:"totalSample,omitempty" copier:"TotalSample"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type GetLinkImageListReq struct { - PartId int64 `json:"partId"` -} - -type GetLinkImageListResp struct { - Success bool `json:"success"` - Images []*ImageSl `json:"images"` - ErrorMsg string `json:"errorMsg"` -} - -type GetLinkTaskReq struct { - PartId int64 `json:"partId"` - TaskId string `json:"taskId"` -} - -type GetLinkTaskResp struct { - Success bool `json:"success"` - Task *TaskSl `json:"task"` - ErrorMsg string `json:"errorMsg"` -} - -type GetNotebookStorageReq struct { - InstanceId string `json:"instanceId" copier:"InstanceId"` - ProjectId string `json:"projectId" copier:"ProjectId"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type GetNotebookStorageResp struct { - Current int32 `json:"current" copier:"Current"` - Data []DataVolumesRes `json:"data" copier:"Data"` - Pages int32 `json:"pages" copier:"Pages"` - Size int32 `json:"size" copier:"Size"` - Total int64 `json:"total" copier:"Total"` -} - -type GetParticipantsReq struct { -} - -type GetParticipantsResp struct { - Success bool `json:"success"` - Participants []*ParticipantSl `json:"participant"` -} - -type GetResourceSpecsReq struct { - PartId int64 `json:"partId"` -} - -type GetResourceSpecsResp struct { - Success bool `json:"success"` - ResourceSpecs []*ResourceSpecSl `json:"resourceSpecs"` - ErrorMsg string `json:"errorMsg"` -} - -type GetRunningInstanceReq struct { - Id string `form:"deployTaskId"` - AdapterId string `form:"adapterId"` -} - -type GetRunningInstanceResp struct { - List interface{} `json:"list"` -} - -type GetServersDetailedByIdReq struct { - ServerId string `form:"server_id" copier:"ServerId"` - Platform string `form:"platform,optional"` -} - -type GetServersDetailedByIdResp struct { - Servers struct { - AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` - AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` - Addresses Addresses `json:"addresses" copier:"Addresses"` - Name string `json:"name" copier:"Name"` - ConfigDrive string `json:"config_drive" copier:"ConfigDrive"` - Created string `json:"created" copier:"Created"` - Flavor FlavorDetailed `json:"flavor" copier:"Flavor"` - HostId string `json:"hostId" copier:"HostId"` - Id string `json:"id" copier:"Id"` - Image ImageDetailed `json:"image" copier:"Image"` - KeyName string `json:"key_name" copier:"KeyName"` - Links1 []Links1 `json:"links" copier:"Links1"` - Metadata MetadataDetailed `json:"metadata" copier:"Metadata"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` - Fault Fault `json:"fault" copier:"Fault"` - Progress uint32 `json:"progress" copier:"Progress"` - Locked bool `json:"locked" copier:"Locked"` - HostStatus string `json:"host_status" copier:"HostStatus"` - Description string `json:"description" copier:"Description"` - Tags []string `json:"tags" copier:"Tags"` - TrustedImageCertificates string `json:"trusted_image_certificates" copier:"TrustedImageCertificates"` - ServerGroups string `json:"server_groups" copier:"ServerGroups"` - LockedReason string `json:"locked_reason" copier:"LockedReason"` - SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"` - } `json:"server" copier:"Servers"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type GetVisualizationJobParam struct { - Status string `json:"status"` - Per_page int32 `json:"perPage"` - Page int32 `json:"page"` - SortBy string `json:"sortBy"` - Order string `json:"order"` - Search_content string `json:"searchContent"` - Workspace_id string `json:"workspaceId"` -} - -type GetVisualizationJobReq struct { - Project_id string `json:"projectId"` - Param struct { - Status string `json:"status"` - Per_page int32 `json:"perPage"` - Page int32 `json:"page"` - SortBy string `json:"sortBy"` - Order string `json:"order"` - Search_content string `json:"searchContent"` - Workspace_id string `json:"workspaceId"` - } `json:"param"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type GetVisualizationJobResp struct { - Is_success bool `json:"isSuccess"` - Error_code string `json:"errorCode"` - Error_message string `json:"errorMessage"` - Job_total_count int32 `json:"jobTotalCount"` - Job_count_limit int32 `json:"jobCountLimit"` - Jobs []Jobs `json:"jobs"` - Quotas int32 `json:"quotas"` -} - -type GetVolumeDetailedByIdReq struct { - VolumeId string `form:"volume_id" copier:"VolumeId"` - Platform string `form:"platform,optional"` -} - -type GetVolumeDetailedByIdResp struct { - Volume struct { - CreatedAt string `json:"created_at" copier:"CreatedAt"` - Id string `json:"id" copier:"Id"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Encrypted bool `json:"encrypted" copier:"Encrypted"` - Name string `json:"name" copier:"Name"` - Size int32 `json:"size" copier:"Size"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` - Description string `json:"description" copier:"Description"` - Multiattach bool `json:"multiattach" copier:"Multiattach"` - Bootable string `json:"bootable" copier:"Bootable"` - VolumeType string `json:"volume_type" copier:"VolumeType"` - Count int32 `json:"count" copier:"Count"` - SharedTargets bool `json:"shared_targets" copier:"SharedTargets"` - ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` - } `json:"volume" copier:"Volume"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type GetVolumeLimitsReq struct { - Platform string `form:"platform,optional"` -} - -type GetVolumeLimitsResp struct { - Limits struct { - Rate VolumeRate `json:"rate,optional"` - Absolute VolumeAbsolute `json:"absolute,optional"` - } `json:"limits,optional"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type GiResp struct { - CpuNum int32 `json:"cpuNum,optional"` - MemoryInGib int32 `json:"memoryInGib,optional"` - StorageInGib int32 `json:"storageInGib,optional"` -} - -type Gpu struct { - MemUsage struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` - } `json:"memUsage"` - Util struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` - } `json:"util"` - UnitNum int32 `json:"unitNum"` - ProductName string `json:"productName"` - Memory string `json:"memory"` -} - -type HPCAdapterSummary struct { - AdapterName string `json:"adapterName"` - StackCount int32 `json:"stackCount"` - ClusterCount int32 `json:"clusterCount"` - TaskCount int32 `json:"taskCount"` -} - -type HPCOverView struct { - AdapterCount int32 `json:"adapterCount"` - StackCount int32 `json:"stackCount"` - ClusterCount int32 `json:"clusterCount"` - TaskCount int32 `json:"taskCount"` -} - -type HPCResource struct { - 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 HomeOverviewData struct { - AdaptSum int64 `json:"adaptSum"` - ClusterSum int64 `json:"clusterSum"` - StorageSum float32 `json:"storageSum"` - TaskSum int64 `json:"taskSum"` -} - -type HomeOverviewReq struct { -} - -type HomeOverviewResp struct { - Code int `json:"code"` - Message string `json:"message"` - Data struct { - AdaptSum int64 `json:"adaptSum"` - ClusterSum int64 `json:"clusterSum"` - StorageSum float32 `json:"storageSum"` - TaskSum int64 `json:"taskSum"` - } `json:"data"` -} - -type Hooks struct { - ContainerHooksResp struct { - PostStart PostStart `json:"postStart,omitempty" copier:"PostStart"` // * - PreStart PreStart `json:"preStart,omitempty" copier:"PreStart"` // * - } `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // * +type ListResult struct { + List interface{} `json:"list,omitempty"` } type HpcInfo struct { @@ -3477,102 +1103,369 @@ type HpcInfo struct { UpdateTime string `json:"updated_time"` // 更新时间 } -type I18NDescription struct { - Language string `json:"language,optional"` - Description string `json:"description,optional"` +type CloudInfo struct { + Participant int64 `json:"participant,omitempty"` + Id int64 `json:"id,omitempty"` + TaskId int64 `json:"taskId,omitempty"` + ApiVersion string `json:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty"` + Namespace string `json:"namespace,omitempty"` + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + StartTime string `json:"startTime,omitempty"` + RunningTime int64 `json:"runningTime,omitempty"` + Result string `json:"result,omitempty"` + YamlString string `json:"yamlString,omitempty"` } -type Image struct { - Arch string `json:"arch,omitempty" copier:"Arch"` - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` - Description string `json:"description,omitempty" copier:"Description"` - DevServices []string `json:"devServices,omitempty" copier:"DevServices"` - Id string `json:"id,omitempty" copier:"Id"` - Name string `json:"name,omitempty" copier:"Name"` - Namespace string `json:"namespace,omitempty" copier:"Namespace"` - Origin string `json:"origin,omitempty" copier:"Origin"` - ResourceCategories []string `json:"resourceCategories,omitempty" copier:"ResourceCategories"` - ServiceType string `json:"serviceType,omitempty" copier:"ServiceType"` - Size int64 `json:"size,omitempty" copier:"Size"` - Status string `json:"status,omitempty" copier:"Status"` - StatusMessage string `json:"statusMessage,omitempty" copier:"StatusMessage"` - SupportResCategories []string `json:"supportResCategories,omitempty" copier:"SupportResCategories"` - SwrPath string `json:"swrPath,omitempty" copier:"SwrPath"` - Tag string `json:"tag,omitempty" copier:"Tag"` - TypeImage string `json:"type,omitempty" copier:"TypeImage"` - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` - Visibility string `json:"visibility,omitempty" copier:"Visibility"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` +type AiInfo struct { + ParticipantId int64 `json:"participantId,omitempty"` + TaskId int64 `json:"taskId,omitempty"` + ProjectId string `json:"project_id,omitempty"` + Name string `json:"name,omitempty"` + Status string `json:"status,omitempty"` + StartTime string `json:"startTime,omitempty"` + RunningTime int64 `json:"runningTime,omitempty"` + Result string `json:"result,omitempty"` + JobId string `json:"jobId,omitempty"` + CreateTime string `json:"createTime,omitempty"` + ImageUrl string `json:"imageUrl,omitempty"` + Command string `json:"command,omitempty"` + FlavorId string `json:"flavorId,omitempty"` + SubscriptionId string `json:"subscriptionId,omitempty"` + ItemVersionId string `json:"itemVersionId,omitempty"` } -type ImageDetailed struct { - Id string `json:"id " copier:"Id"` - Links []Links `json:"links" copier:"Links"` +type VmInfo struct { + ParticipantId int64 `json:"participantId,omitempty"` + TaskId int64 `json:"taskId,omitempty"` + Name string `json:"name,omitempty"` + FlavorRef string `json:"flavor_ref,omitempty"` + ImageRef string `json:"image_ref,omitempty"` + NetworkUuid string `json:"network_uuid,omitempty"` + BlockUuid string `json:"block_uuid,omitempty"` + SourceType string `json:"source_type,omitempty"` + DeleteOnTermination bool `json:"delete_on_termination,omitempty"` + Status string `json:"status,omitempty"` + MinCount string `json:"min_count,omitempty"` + Platform string `json:"platform,omitempty"` + Uuid string `json:"uuid,omitempty"` } -type ImageDict struct { - Id int `json:"id"` - PublicImageName string `json:"public_image_name"` +type PullTaskInfoReq struct { + AdapterId int64 `form:"adapterId"` } -type ImageInferenceReq struct { - TaskName string `form:"taskName"` - TaskDesc string `form:"taskDesc"` - ModelType string `form:"modelType"` - InstanceIds []int64 `form:"instanceIds"` - Strategy string `form:"strategy,,optional"` - StaticWeightMap map[string]map[string]int32 `form:"staticWeightMap,optional"` - Replica int32 `form:"replicas,optional"` +type PullTaskInfoResp struct { + HpcInfoList []*HpcInfo `json:"HpcInfoList,omitempty"` + CloudInfoList []*CloudInfo `json:"CloudInfoList,omitempty"` + AiInfoList []*AiInfo `json:"AiInfoList,omitempty"` + VmInfoList []*VmInfo `json:"VmInfoList,omitempty"` } -type ImageInferenceResp struct { - InferResults []*ImageResult `json:"result"` +type PushTaskInfoReq struct { + AdapterId int64 `json:"adapterId"` + HpcInfoList []*HpcInfo `json:"hpcInfoList"` + CloudInfoList []*CloudInfo `json:"cloudInfoList"` + AiInfoList []*AiInfo `json:"aiInfoList"` + VmInfoList []*VmInfo `json:"vmInfoList"` } -type ImageNum struct { - ImageNum int32 `json:"imageNum"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` +type PushTaskInfoResp struct { + Code int64 `json:"code"` + Msg string `json:"msg"` } -type ImageResult struct { - ClusterId string `json:"clusterId"` +type PushResourceInfoReq struct { + AdapterId int64 `json:"adapterId"` + ResourceStats []ResourceStats `json:"resourceStats"` +} + +type PushResourceInfoResp struct { + Code int64 `json:"code"` + Msg string `json:"msg"` +} + +type NoticeInfo struct { + AdapterId int64 `json:"adapterId"` + AdapterName string `json:"adapterName"` + ClusterId int64 `json:"clusterId"` ClusterName string `json:"clusterName"` - ImageName string `json:"imageName"` - Card string `json:"card"` - ImageResult string `json:"imageResult"` + NoticeType string `json:"noticeType"` + TaskName string `json:"taskName"` + Incident string `json:"incident"` } -type ImageSl struct { - ImageId string `json:"imageId"` - ImageName string `json:"imageName"` - ImageStatus string `json:"imageStatus"` +type ListNoticeReq struct { } -type Images struct { - Status string `json:"status" copier:"Status"` - Name string `json:"name" copier:"Name"` - Tags []Tags `json:"tags" copier:"Tags"` - Container_format string `json:"container_format" copier:"Container_format"` - Created_at string `json:"created_at" copier:"Created_at"` - Disk_format string `json:"disk_format" copier:"Disk_format"` - Updated_at string `json:"updated_at" copier:"Updated_at"` - Visibility string `json:"visibility" copier:"Visibility"` - Self string `json:"self" copier:"Self"` - Min_disk uint32 `json:"min_disk" copier:"Min_disk"` - Protected bool `json:"protected" copier:"Protected"` - Id string `json:"id" copier:"Id"` - File string `json:"file" copier:"File"` - Checksum string `json:"checksum" copier:"Checksum"` - Os_hash_algo string `json:"os_hash_algo" copier:"Os_hash_algo"` - Os_hash_value string `json:"os_hash_value" copier:"Os_hash_value"` - Os_hidden string `json:"os_hidden" copier:"Os_hidden"` - Owner string `json:"owner" copier:"Owner"` - Size uint32 `json:"size" copier:"Size"` - Min_ram uint32 `json:"min_ram" copier:"Min_ram"` - Schema string `json:"schema" copier:"Schema"` - Virtual_size int32 `json:"virtual_size" copier:"Virtual_size"` +type ListNoticeResp struct { + Code int64 `json:"code"` + Msg string `json:"msg"` + Data []NoticeInfo `json:"data"` +} + +type PushNoticeReq struct { + NoticeInfo NoticeInfo `json:"noticeInfo"` +} + +type PushNoticeResp struct { + Code int64 `json:"code"` + Msg string `json:"msg"` +} + +type ResourceStats struct { + ClusterId int64 `json:"clusterId"` + Name string `json:"name"` + CpuCoreAvail int64 `json:"cpuCoreAvail"` + CpuCoreTotal int64 `json:"cpuCoreTotal"` + MemAvail float64 `json:"memAvail"` + MemTotal float64 `json:"memTotal"` + DiskAvail float64 `json:"diskAvail"` + DiskTotal float64 `json:"diskTotal"` + GpuAvail int64 `json:"gpuAvail"` + CardsAvail []*Card `json:"cardsAvail"` + CpuCoreHours float64 `json:"cpuCoreHours"` + Balance float64 `json:"balance"` +} + +type Card struct { + Platform string `json:"platform"` + Type string `json:"type"` + Name string `json:"name"` + TOpsAtFp16 float64 `json:"TOpsAtFp16"` + CardHours float64 `json:"cardHours"` + CardNum int32 `json:"cardNum"` +} + +type TaskStatusResp struct { + Succeeded int `json:"Succeeded"` + Failed int `json:"Failed"` + Running int `json:"Running"` + Saved int `json:"Saved"` +} + +type TaskDetailsResp struct { + Name string `json:"name"` + Description string `json:"description"` + StartTime string `json:"startTime"` + EndTime string `json:"endTime"` + Strategy int64 `json:"strategy"` + SynergyStatus int64 `json:"synergyStatus"` + ClusterInfos []*ClusterInfo `json:"clusterInfos"` + SubTaskInfos []*SubTaskInfo `json:"subTaskInfos"` + TaskTypeDict string `json:"taskTypeDict"` + AdapterTypeDict string `json:"adapterTypeDict"` +} + +type SubTaskInfo struct { + Id string `json:"id" db:"id"` + Name string `json:"name" db:"name"` + ClusterId string `json:"clusterId" db:"cluster_id"` + ClusterName string `json:"clusterName" db:"cluster_name"` + Status string `json:"status" db:"status"` + Remark string `json:"remark" db:"remark"` + InferUrl string `json:"inferUrl"` +} + +type CommonResp struct { + Code int `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + Data interface{} `json:"data,omitempty"` +} + +type CommitHpcTaskReq struct { + 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"` +} + +type CommitHpcTaskResp struct { + TaskId int64 `json:"taskId"` + Code int32 `json:"code"` + Msg string `json:"msg"` +} + +type HpcOverViewReq struct { +} + +type HpcOverViewResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data HPCOverView `json:"data"` +} + +type HPCOverView struct { + AdapterCount int32 `json:"adapterCount"` + StackCount int32 `json:"stackCount"` + ClusterCount int32 `json:"clusterCount"` + TaskCount int32 `json:"taskCount"` +} + +type HpcAdapterSummaryReq struct { +} + +type HpcAdapterSummaryResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data []HPCAdapterSummary `json:"data"` +} + +type HPCAdapterSummary struct { + AdapterName string `json:"adapterName"` + StackCount int32 `json:"stackCount"` + ClusterCount int32 `json:"clusterCount"` + TaskCount int32 `json:"taskCount"` +} + +type HpcJobReq struct { +} + +type HpcJobResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data []Job `json:"data"` +} + +type Job struct { + 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 struct { +} + +type HpcResourceResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data HPCResource `json:"data"` +} + +type HPCResource struct { + 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 struct { + ClusterId int64 `form:"clusterId"` + JobId string `form:"jobId"` +} + +type JobInfoReq struct { + ClusterId int64 `form:"clusterId"` + JobId string `form:"jobId"` +} + +type JobInfoResp struct { + JobId string `form:"jobId"` + JobState string `json:"jobState"` + CurrentWorkingDirectory string `json:"currentWorkingDirectory"` +} + +type QueueAssetsResp struct { + QueueAssets []QueueAsset `json:"queueAsset"` +} + +type QueueAsset struct { + 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数 +} + +type DataSets struct { + DatasetId string `json:"datasetId" copier:"DatasetId"` + DataFormat string `json:"dataFormat" copier:"DataFormat"` + DataSources []DataSources `json:"dataSources" copier:"DataSources"` + DatasetFormat int32 `json:"datasetFormat" copier:"DatasetFormat"` + DatasetName string `json:"datasetName" copier:"DatasetName"` + DatasetType int32 `json:"datasetType" copier:"DatasetType"` + ImportData bool `json:"importData" copier:"ImportData"` + TotalSampleCount int32 `json:"totalSampleCount" copier:"TotalSampleCount"` + CreateTime int64 `json:"createTime" copier:"CreateTime"` + Description string `json:"description" copier:"Description"` +} + +type DataSources struct { + DataPath string `json:"dataPath" copier:"DataPath"` + DataType int32 `json:"dataType" copier:"DataType"` +} + +type DataSetReq struct { + ProjectId string `path:"projectId"` + Limit int32 `form:"limit,optional"` + OffSet int32 `form:"offSet,optional"` + ModelArtsType string `form:"modelArtsType,optional"` +} + +type DataSetResp struct { + TotalNumber uint32 `json:"totalNumber" copier:"TotalNumber"` + Datasets []DataSets `json:"dataSets" copier:"Datasets"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type CreateDataSetReq struct { + DatasetName string `json:"datasetName" copier:"DatasetName"` + DatasetType int32 `json:"datasetType" copier:"DatasetType"` + Description string `json:"description" copier:"Description"` + WorkPath string `json:"workPath" copier:"WorkPath"` + WorkPathType int32 `json:"workPathType" copier:"WorkPathType"` + ProjectId string `path:"projectId" copier:"ProjectId"` + DataSources []DataSources `json:"dataSources" copier:"DataSources"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type CreateDataSetResp struct { + DatasetId string `json:"datasetId" copier:"DatasetId"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } type ImportTaskDataReq struct { @@ -3589,6 +1482,232 @@ type ImportTaskDataResp struct { ErrorMsg string `json:"ErrorMsg,omitempty"` } +type CreateExportTaskReq struct { + ProjectId string `path:"projectId" copier:"ProjectId"` + DatasetId string `path:"datasetId" copier:"DatasetId"` + Path string `json:"path,optional" copier:"Path"` + AnnotationFormat string `json:"annotationFormat,optional" copier:"AnnotationFormat"` + ExportFormat int64 `json:"exportFormat,optional" copier:"ExportFormat"` + ExportParams ExportParams `json:"exportParams,optional" copier:"ExportParams"` + ExportType int32 `json:"exportType,optional" copier:"ExportType"` + SampleState string `json:"sampleState,optional" copier:"ExportState"` + SourceTypeHeader string `json:"sourceTypeHeader,optional" copier:"SourceTypeHeader"` + Status int32 `json:"status,optional" copier:"Status"` + VersionFormat string `json:"versionFormat,optional" copier:"VersionFormat"` + VersionId string `json:"versionId,optional" copier:"VersionId"` + WithColumnHeader bool `json:"withColumnHeader,optional" copier:"WithColumnHeader"` + ModelArtsType string `json:"modelartsType,optional"` +} + +type ExportTaskDataResp struct { + TaskId string `json:"taskId,omitempty" copier:"TaskId"` + CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` + ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` + ExportParams ExportParams `json:"exportParams,omitempty" copier:"ExportParams"` + FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` + Path string `json:"path,omitempty" copier:"Path"` + Progress float64 `json:"progress,omitempty" copier:"Progress"` + Status string `json:"status,omitempty" copier:"Status"` + TotalSampleCount int64 `json:"totalSampleCount,omitempty" copier:"TotalSampleCount"` + UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` + VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` + VersionId string `json:"versionId,omitempty" copier:"VersionId"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type ExportParams struct { + ClearHardProperty bool `json:"clearHardProperty" copier:"ClearHardProperty"` + ExportDatasetVersionFormat string `json:"exportDatasetVersionFormat,optional" copier:"ExportDatasetVersionFormat"` + ExportDatasetVersionName string `json:"exportDatasetVersionName,optional" copier:"ExportDatasetVersionName"` + ExportDest string `json:"exportDest,optional" copier:"ExportDest"` + ExportNewDatasetWorkName string `json:"exportNewDatasetWorkName,optional" copier:"ExportNewDatasetWorkName"` + ExportNewDatasetWorkPath string `json:"exportNewDatasetWorkPath,optional" copier:"ExportNewDatasetWorkPath"` + RatioSampleUsage bool `json:"ratioSampleUsage,optional" copier:"RatioSampleUsage"` + SampleState string `json:"sampleState,optional" copier:"SampleState"` + Sample []string `json:"sample,optional" copier:"Sample"` + SearchConditions []SearchCondition `json:"searchConditions,optional" copier:"SearchConditions"` + TrainSampleRatio string `json:"trainSampleRatio,optional" copier:"TrainSampleRatio"` +} + +type SearchCondition struct { + Coefficient string `json:"coefficient,optional" copier:"Coefficient"` + FrameInVideo int64 `json:"frameInVideo,optional" copier:"FrameInVideo"` + Hard string `json:"hard,optional" copier:"Hard"` + Kvp string `json:"kvp,optional" copier:"Kvp"` + ImportOrigin string `json:"importOrigin,optional" copier:"ImportOrigin"` + LabelList SearchLabels `json:"labelList,optional" copier:"LabelList"` + Labeler string `json:"labeler,optional" copier:"Labeler"` + ParentSampleId string `json:"parentSampleId,optional" copier:"ParentSampleId"` + Metadata SearchProp `json:"metadata,optional" copier:"Metadata"` + SampleDir string `json:"sampleDir,optional" copier:"SampleDir"` + SampleName string `json:"sampleName,optional" copier:"SampleName"` + SampleTime string `json:"sampleTime,optional" copier:"SampleTime"` + Score string `json:"score,optional" copier:"Score"` + SliceThickness string `json:"sliceThickness,optional" copier:"SliceThickness"` + StudyDate string `json:"StudyDate,optional" copier:"StudyDate"` + TimeInVideo string `json:"timeInVideo,optional" copier:"TimeInVideo"` +} + +type SearchLabels struct { + Labels []SearchLabel `json:"labels,optional" copier:"Labels"` + Op string `json:"op,optional" copier:"Op"` +} + +type SearchLabel struct { + Name string `json:"name,optional" copier:"Name"` + Op string `json:"op,optional" copier:"Op"` + Type int64 `json:"type,optional" copier:"Type"` +} + +type SearchProp struct { + Op string `json:"op,optional" copier:"Op"` +} + +type GetExportTasksOfDatasetReq struct { + ProjectId string `path:"projectId" copier:"ProjectId"` + DatasetId string `path:"datasetId" copier:"DatasetId"` + ExportType int32 `json:"exportType,optional" copier:"ExportType"` + Limit int32 `form:"limit,optional"` + Offset int32 `form:"offset,optional"` + ModelArtsType string `json:"modelartsType,optional"` +} + +type GetExportTasksOfDatasetResp struct { + TaskId string `json:"taskId,omitempty" copier:"TaskId"` + CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` + ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` + ExportParams ExportParams `json:"exportParams,omitempty" copier:"ExportParams"` + ExportTasks []ExportTaskStatus `json:"exportTasks,omitempty" copier:"ExportTasks"` + FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` + Path string `json:"path,omitempty" copier:"Path"` + Progress float64 `json:"progress,omitempty" copier:"Progress"` + Status string `json:"status,omitempty" copier:"Status"` + TotalCount int64 `json:"totalCount,omitempty" copier:"TotalCount"` + UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` + VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` + VersionId string `json:"versionId,omitempty" copier:"VersionId"` + ExportType int32 `json:"exportType,omitempty" copier:"ExportType"` + TotalSample int64 `json:"totalSample,omitempty" copier:"TotalSample"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type ExportTaskStatus struct { + TaskId string `json:"taskId,omitempty" copier:"TaskId"` + CreateTime uint32 `json:"createTime,omitempty" copier:"CreateTime"` + ErrorCode string `json:"errorCode,omitempty" copier:"ErrorCode"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + ExportFormat int64 `json:"exportFormat,omitempty" copier:"ExportFormat"` + ExportParams ExportParams `json:"exportParams,omitempty" copier:"ExportParams"` + FinishedSampleCount int32 `json:"finishedSampleCount,omitempty" copier:"FinishedSampleCount"` + Path string `json:"path,omitempty" copier:"Path"` + Progress float64 `json:"progress,omitempty" copier:"Progress"` + Status string `json:"status,omitempty" copier:"Status"` + TotalCount int64 `json:"totalCount,omitempty" copier:"TotalCount"` + UpdateTime uint32 `json:"updateTime,omitempty" copier:"UpdateTime"` + VersionFormat string `json:"versionFormat,omitempty" copier:"VersionFormat"` + VersionId string `json:"versionId,omitempty" copier:"VersionId"` + ExportType int32 `json:"exportType,omitempty" copier:"ExportType"` + TotalSample int64 `json:"totalSample,omitempty" copier:"TotalSample"` +} + +type GetExportTaskStatusOfDatasetReq struct { + ProjectId string `path:"projectId"` + ResourceId string `path:"resourceId"` + TaskId string `path:"taskId"` + ModelArtsType string `json:"modelartsType,optional"` +} + +type GetExportTaskStatusOfDatasetResp struct { + TaskId string `json:"taskId,optional" copier:"TaskId"` + CreateTime uint32 `json:"createTime,optional" copier:"CreateTime"` + ExportFormat int64 `json:"exportFormat,optional" copier:"ExportFormat"` + ExportParams ExportParams `json:"exportParams,optional" copier:"ExportParams"` + ExportTasks []ExportTaskStatus `json:"exportTasks,optional" copier:"ExportTasks"` + FinishedSampleCount int32 `json:"finishedSampleCount,optional" copier:"FinishedSampleCount"` + Path string `json:"path,optional" copier:"Path"` + Progress float64 `json:"progress,optional" copier:"Progress"` + Status string `json:"status,optional" copier:"Status"` + TotalCount int64 `json:"totalCount,optional" copier:"TotalCount"` + UpdateTime uint32 `json:"updateTime,optional" copier:"UpdateTime"` + VersionFormat string `json:"versionFormat,optional" copier:"VersionFormat"` + VersionId string `json:"versionId,optional" copier:"VersionId"` + ExportType int32 `json:"exportType,optional" copier:"ExportType"` + TotalSample int64 `json:"totalSample,optional" copier:"TotalSample"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type CreateProcessorTaskReq struct { + ProjectId string `json:"datasetId" copier:"ProjectId"` + CreateVersion bool `json:"createVersion,optional" copier:"CreateVersion"` + Description string `json:"description,optional" copier:"Description"` + DataSources ProcessorDataSource `json:"dataSource,optional" copier:"DataSources"` + Inputs []ProcessorDataSource `json:"inputs,optional" copier:"Inputs"` + Name string `json:"name,optional" copier:"Nmae"` + Template TemplateParam `json:"template,optional" copier:"Template"` + VersionId string `json:"versionId,optional" copier:"VersionId"` + WorkPath WorkPath `json:"workPath,optional" copier:"WorkPath"` + WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` + ModelArtsType string `json:"modelartsType,optional"` +} + +type CreateProcessorTaskResp struct { + TaskId string `json:"taskId,optional" copier:"Code"` + Code int32 `json:"code,optional" copier:"Code"` + Msg string `json:"msg,optional" copier:"Msg"` +} + +type ProcessorDataSource struct { + Name string `json:"name,optional" copier:"Name"` + Source string `json:"source,optional" copier:"Source"` + Type string `json:"type,optional" copier:"type"` + VersionId string `json:"versionId,optional" copier:"VersionId"` + VersionName string `json:"versionName,optional" copier:"VersionName"` +} + +type TemplateParam struct { + Id string `json:"id,optional" copier:"Id"` + Name string `json:"name,optional" copier:"Name"` + OperatorParam []OperatorParam `json:"operatorParams,optional" copier:"OperatorParam"` +} + +type WorkPath struct { + Name string `json:"name,optional" copier:"name"` + OutputPath string `json:"outputPath,optional" copier:"OutputPath"` + Path string `json:"path,optional" copier:"Path"` + Type string `json:"type,optional" copier:"type"` + VersionId string `json:"versionId,optional" copier:"VersionId"` + VersionName string `json:"versionName,optional" copier:"VersionName"` +} + +type OperatorParam struct { + Id string `json:"id,optional" copier:"Id"` + Name string `json:"name,optional" copier:"Name"` + Params string `json:"params,optional" copier:"Params"` + AdvancedParamsSwitch bool `json:"advancedParamsSwitch,optional" copier:"AdvancedParamsSwitch"` +} + +type ListImportTasksReq struct { + ProjectId string `path:"projectId"` + DatasetId string `path:"datasetId"` + Limit int32 `form:"limit,optional"` + Offset int32 `form:"offSet,optional"` + ModelArtsType string `form:"modelArtsType,optional"` +} + +type ListImportTasksResp struct { + TotalCount uint32 `json:"totalCount,omitempty"` + ImportTasks []*ImportTasks `json:"importTasks,omitempty"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + type ImportTasks struct { Status string `json:"status,omitempty"` TaskId string `json:"taskId,omitempty"` @@ -3609,646 +1728,346 @@ type ImportTasks struct { AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"` } -type InferenceResult struct { - ImageName string `json:"imageName"` - TaskName string `json:"taskName"` - TaskAiName string `json:"taskAiName"` - Result string `json:"result"` - Card string `json:"card"` - ClusterName string `json:"clusterName"` +type Annotations struct { + JobTemplate string `json:"jobTemplate"` + KeyTask string `json:"keyTask"` } -type InferenceTaskDetailReq struct { - TaskId int64 `form:"taskId"` +type TrainingExperimentReference struct { } -type InferenceTaskDetailResp struct { - InferenceResults []InferenceResult `json:"data"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` +type Metadata struct { + ID string `json:"id"` + Name string `json:"name"` + Description string `json:"description"` + CreateTime uint64 `json:"createTime"` + WorkspaceID string `json:"workspaceId"` + AiProject string `json:"aiProject"` + UserName string `json:"userName"` + Annotations Annotations `json:"annotations"` + TrainingExperimentReference TrainingExperimentReference `json:"trainingExperimentReference"` + Tags []interface{} `json:"tags"` } -type InferenceTaskStatReq struct { +type CPUUsage struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` } -type InferenceTaskStatResp struct { - Running int32 `json:"running"` - Total int32 `json:"total"` +type MemUsage struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` } -type InfoList struct { - Type string `json:"type,omitempty"` - ResourceType string `json:"resource_type,omitempty"` - TName string `json:"name,omitempty"` - InfoName string `json:"info_name,omitempty"` +type Util struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` } -type InputTra struct { - Name string `json:"name,optional"` - AccessMethod string `json:"accessMethod,optional"` - RemoteIn struct { - DatasetIn DatasetTra `json:"dataSet,optional"` - } `json:"remoteIn,optional"` +type Gpu struct { + MemUsage MemUsage `json:"memUsage"` + Util Util `json:"util"` + UnitNum int32 `json:"unitNum"` + ProductName string `json:"productName"` + Memory string `json:"memory"` +} + +type Status struct { + Phase string `json:"phase"` + SecondaryPhase string `json:"secondaryPhase"` + Duration int32 `json:"duration"` + Tasks []string `json:"tasks"` + StartTime uint64 `json:"startTime"` + TaskStatuses []*TaskStatuses `json:"taskStatuses,omitempty"` +} + +type TaskStatuses struct { + Task string `json:"task,omitempty"` + ExitCode string `json:"exitCode,omitempty"` + Message string `json:"message,omitempty"` +} + +type Constraint struct { + Type string `json:"type"` + Editable bool `json:"editable"` + Required bool `json:"required"` + Sensitive bool `json:"sensitive"` + ValidType string `json:"validType"` + ValidRange interface{} `json:"validRange,optional"` +} + +type Parameters struct { + Name string `json:"name"` + Description string `json:"description"` + I18NDescription interface{} `json:"i18nDescription"` + Value string `json:"value"` + Constraint Constraint `json:"constraint"` +} + +type Obs struct { + ObsURL string `json:"obsUrl"` +} + +type Remote struct { + Obs Obs `json:"obs"` +} + +type Attributes struct { + DataFormat []string `json:"dataFormat"` + DataSegmentation []string `json:"dataSegmentation"` + DatasetType []string `json:"datasetType"` + IsFree string `json:"isFree"` + MaxFreeJobCount string `json:"maxFreeJobCount"` +} + +type RemoteConstraints struct { + DataType string `json:"dataType"` + Attributes Attributes `json:"attributes,omitempty"` } type Inputs struct { - Name string `json:"name"` - Description string `json:"description"` - LocalDir string `json:"localDir"` - AccessMethod string `json:"accessMethod"` - Remote struct { - Obs Obs `json:"obs"` - } `json:"remote"` + Name string `json:"name"` + Description string `json:"description"` + LocalDir string `json:"localDir"` + AccessMethod string `json:"accessMethod"` + Remote Remote `json:"remote"` RemoteConstraints []RemoteConstraints `json:"remoteConstraints"` } -type InputsAlRq struct { - Name string `json:"name,optional"` - Description string `json:"description,optional"` - RemoteConstraints []RemoteConstraints `json:"remoteConstraints,optional"` +type Outputs struct { + Name string `json:"name"` + LocalDir string `json:"localDir"` + AccessMethod string `json:"accessMethod"` + Remote Remote `json:"remote"` + Mode string `json:"mode"` + Period int32 `json:"period"` + PrefetchToLocal bool `json:"prefetchToLocal"` } -type InstanceCenterList struct { - LogoPath string `json:"logo_path"` - InstanceName string `json:"instance_name"` - InstanceType int32 `json:"instance_type"` - InstanceClass string `json:"instance_class"` - InstanceClassChinese string `json:"instance_class_chinese"` - Description string `json:"description"` - Version string `json:"version"` +type Engine struct { + EngineID string `json:"engineId"` + EngineName string `json:"engineName"` + EngineVersion string `json:"engineVersion"` + V1Compatible bool `json:"v1Compatible"` + RunUser string `json:"runUser"` + ImageSource bool `json:"imageSource"` } -type InstanceCenterReq struct { - InstanceType int32 `form:"instance_type"` - InstanceClass string `form:"instance_class,optional"` - InstanceName string `form:"instance_name,optional"` +type Policies struct { } -type InstanceCenterResp struct { - InstanceCenterList []InstanceCenterList `json:"instanceCenterList" copier:"InstanceCenterList"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - TotalCount int `json:"totalCount"` +type Algorithm struct { + ID string `json:"id"` + Name string `json:"name"` + V1Algorithm bool `json:"v1Algorithm"` + SubscriptionID string `json:"subscriptionId"` + ItemVersionID string `json:"itemVersionId"` + ContentID string `json:"contentId"` + Parameters []Parameters `json:"parameters"` + ParametersCustomization bool `json:"parametersCustomization"` + Inputs []Inputs `json:"inputs"` + Outputs []Outputs `json:"outputs"` + Engine Engine `json:"engine"` + Policies Policies `json:"policies"` } -type InstanceInfo struct { +type Billing struct { + Code string `json:"code"` + UnitNum int32 `json:"unitNum"` +} + +type CPU struct { + Arch string `json:"arch"` + CoreNum int32 `json:"coreNum"` +} + +type Memory struct { + Size int `json:"size"` + Unit string `json:"unit"` +} + +type Disk struct { + Size int32 `json:"size"` + Unit string `json:"unit"` +} + +type FlavorInfo struct { + CPU CPU `json:"cpu"` + Gpu Gpu `json:"gpu"` + Memory Memory `json:"memory"` + Disk Disk `json:"disk"` +} + +type FlavorDetail struct { + FlavorType string `json:"flavorType"` + Billing Billing `json:"billing"` + Attributes Attributes `json:"attributes"` + FlavorInfo FlavorInfo `json:"flavorInfo"` +} + +type Resource struct { + Policy string `json:"policy,optional"` + FlavorId string `json:"flavorId,optional"` + FlavorName string `json:"flavorName,optional"` + NodeCount int32 `json:"nodeCount,optional"` + FlavorDetail FlavorDetail `json:"flavorDetail,optional"` +} + +type LogExportPathCreateTraining struct { +} + +type Spec struct { + Resource Resource `json:"resource"` + LogExportPath LogExportPath `json:"logExportPath"` + IsHostedLog bool `json:"isHostedLog"` } type Items struct { - Kind string `json:"kind"` - Metadata struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - CreateTime uint64 `json:"createTime"` - WorkspaceID string `json:"workspaceId"` - AiProject string `json:"aiProject"` - UserName string `json:"userName"` - Annotations Annotations `json:"annotations"` - TrainingExperimentReference TrainingExperimentReference `json:"trainingExperimentReference"` - Tags []interface{} `json:"tags"` - } `json:"metadata"` - Status struct { - Phase string `json:"phase"` - SecondaryPhase string `json:"secondaryPhase"` - Duration int32 `json:"duration"` - Tasks []string `json:"tasks"` - StartTime uint64 `json:"startTime"` - TaskStatuses []*TaskStatuses `json:"taskStatuses,omitempty"` - } `json:"status"` - Algorithm struct { - ID string `json:"id"` - Name string `json:"name"` - SubscriptionID string `json:"subscriptionId"` - ItemVersionID string `json:"itemVersionId"` - CodeDir string `json:"codeDir"` - BootFile string `json:"bootFile"` - AutosearchConfigPath string `json:"autosearchConfigPath"` - AutosearchFrameworkPath string `json:"autosearchFrameworkPath"` - Command string `json:"command"` - Parameters []Parameters `json:"parameters"` - Policies Policies `json:"policies"` - Inputs []Inputs `json:"inputs"` - Outputs []Outputs `json:"outputs"` - Engine Engine `json:"engine"` - LocalCodeDir string `json:"localCodeDir"` - WorkingDir string `json:"workingDir"` - Environments []map[string]string `json:"environments"` - } `json:"algorithm,omitempty"` - Spec struct { - Resource Resource `json:"resource"` - LogExportPath LogExportPath `json:"logExportPath"` - IsHostedLog bool `json:"isHostedLog"` - } `json:"spec"` - ProjectId string `json:"projectId"` -} - -type Job struct { - 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"` + Kind string `json:"kind"` + Metadata Metadata `json:"metadata"` + Status Status `json:"status"` + Algorithm JobAlgorithmResponse `json:"algorithm,omitempty"` + Spec Spec `json:"spec"` + ProjectId string `json:"projectId"` } type JobAlgorithmResponse struct { - ID string `json:"id"` - Name string `json:"name"` - SubscriptionID string `json:"subscriptionId"` - ItemVersionID string `json:"itemVersionId"` - CodeDir string `json:"codeDir"` - BootFile string `json:"bootFile"` - AutosearchConfigPath string `json:"autosearchConfigPath"` - AutosearchFrameworkPath string `json:"autosearchFrameworkPath"` - Command string `json:"command"` - Parameters []Parameters `json:"parameters"` - Policies Policies `json:"policies"` - Inputs []Inputs `json:"inputs"` - Outputs []Outputs `json:"outputs"` - Engine struct { - EngineID string `json:"engineId"` - EngineName string `json:"engineName"` - EngineVersion string `json:"engineVersion"` - V1Compatible bool `json:"v1Compatible"` - RunUser string `json:"runUser"` - ImageSource bool `json:"imageSource"` - } `json:"engine"` - LocalCodeDir string `json:"localCodeDir"` - WorkingDir string `json:"workingDir"` - Environments []map[string]string `json:"environments"` + ID string `json:"id"` + Name string `json:"name"` + SubscriptionID string `json:"subscriptionId"` + ItemVersionID string `json:"itemVersionId"` + CodeDir string `json:"codeDir"` + BootFile string `json:"bootFile"` + AutosearchConfigPath string `json:"autosearchConfigPath"` + AutosearchFrameworkPath string `json:"autosearchFrameworkPath"` + Command string `json:"command"` + Parameters []Parameters `json:"parameters"` + Policies Policies `json:"policies"` + Inputs []Inputs `json:"inputs"` + Outputs []Outputs `json:"outputs"` + Engine Engine `json:"engine"` + LocalCodeDir string `json:"localCodeDir"` + WorkingDir string `json:"workingDir"` + Environments []map[string]string `json:"environments"` } -type JobConfigAl struct { - CodeDir string `json:"codeDir,optional"` - BootFile string `json:"bootFile,optional"` - Command string `json:"command,optional"` - Parameters []ParametersAlRq `json:"parameters,optional"` - ParametersCustomization bool `json:"parametersCustomization,optional"` - Inputs []InputsAlRq `json:"inputs,optional"` - Outputs []OutputsAl `json:"outputs,optional"` - Engine struct { - EngineId string `json:"engineId,optional"` - EngineName string `json:"engineName,optional"` - EngineVersion string `json:"engineVersion,optional"` - ImageUrl string `json:"imageUrl,optional"` - } `json:"engine,optional"` -} - -type JobConfigAlRp struct { - CodeDir string `json:"codeDir,optional"` - BootFile string `json:"bootFile,optional"` - Command string `json:"command,optional"` - ParametersAlRq []ParametersAlRq `json:"parameters,optional"` - ParametersCustomization bool `json:"parametersCustomization,optional"` - InputsAlRq []InputsAlRq `json:"inputs,optional"` - OutputsAl []OutputsAl `json:"outputs,optional"` - EngineAlRq struct { - EngineId string `json:"engineId,optional"` - EngineName string `json:"engineName,optional"` - EngineVersion string `json:"engineVersion,optional"` - ImageUrl string `json:"imageUrl,optional"` - } `json:"engine,optional"` -} - -type JobProgress struct { - NotebookId string `json:"notebookId" copier:"NotebookId"` - Status string `json:"status,omitempty" copier:"Status"` - Step int32 `json:"step,omitempty" copier:"Step"` - StepDescription string `json:"stepDescription,omitempty" copier:"StepDescription"` -} - -type Jobs struct { - Job_name string `json:"jobName"` - Status int32 `json:"status"` - Create_time int64 `json:"createTime"` - Duration int64 `json:"duration"` - Job_desc string `json:"jobDesc"` - Service_url string `json:"serviceUrl"` - Train_url string `json:"trainUrl"` - Job_id string `json:"jobId"` - Resource_id string `json:"resourceId"` -} - -type Lease struct { - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` - Duration int64 `json:"duration,omitempty" copier:"Duration"` - Enable bool `json:"enable,omitempty" copier:"Enable"` - TypeLease string `json:"type,omitempty" copier:"TypeLease"` - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` -} - -type LeaseReq struct { - Duration int64 `json:"duration,omitempty" copier:"Duration"` - TypeLeaseReq string `json:"type,omitempty" copier:"TypeLeaseReq"` -} - -type Limits struct { - Rate Rate `json:"rate,optional"` - Absolute struct { - MaxServerMeta int64 `json:"max_server_meta,optional"` - MaxPersonality int64 `json:"max_personality,optional"` - TotalServerGroupsUsed int64 `json:"total_server_groups_used,optional"` - MaxImageMeta int64 `json:"max_image_meta,optional"` - MaxPersonalitySize int64 `json:"max_personality_size,optional"` - MaxTotalKeypairs int64 `json:"max_total_keypairs,optional"` - MaxSecurityGroupRules int64 `json:"max_security_group_rules,optional"` - MaxServerGroups int64 `json:"max_server_groups,optional"` - TotalCoresUsed int64 `json:"total_cores_used,optional"` - TotalRAMUsed int64 `json:"total_ram_used,optional"` - TotalInstancesUsed int64 `json:"total_instances_used,optional"` - MaxSecurityGroups int64 `json:"max_security_groups,optional"` - TotalFloatingIpsUsed int64 `json:"total_floating_ips_used,optional"` - MaxTotalCores int64 `json:"max_total_cores,optional"` - MaxServerGroupMembers int64 `json:"max_server_group_members,optional"` - MaxTotalFloatingIps int64 `json:"max_total_floating_ips,optional"` - TotalSecurityGroupsUsed int64 `json:"total_security_groups_used,optional"` - MaxTotalInstances int64 `json:"max_total_instances,optional"` - MaxTotalRAMSize int64 `json:"max_total_ram_size,optional"` - } `json:"absolute,optional"` -} - -type Link struct { - Source string `json:"source"` - Target string `json:"target"` -} - -type Links struct { - Href string `json:"href " copier:"Href"` - Rel string `json:"rel" copier:"Rel"` -} - -type Links1 struct { - Href string `json:"href " copier:"Href"` - Rel string `json:"rel" copier:"Rel"` -} - -type ListAlgorithmsReq struct { - ProjectId string `path:"projectId,optional"` - Offset int32 `form:"offset,optional"` - Limit int32 `form:"limit,optional"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type ListAlgorithmsResp struct { - Total int32 `json:"total,omitempty"` - Count int32 `json:"count,omitempty"` - Limit int32 `json:"limit,omitempty"` - SortBy string `json:"sortBy,omitempty"` - Order string `json:"order,omitempty"` - Items []*AlgorithmResponse `json:"items,omitempty"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type ListClustersReq struct { - ProjectId string `json:"projectId" copier:"ProjectId"` - ClusterName string `json:"clusterName,optional" copier:"ClusterName"` - Offset int64 `form:"offset,optional"` - Limit int64 `form:"limit,optional"` - SortBy string `json:"sortBy,optional" copier:"SortBy"` - Order string `json:"order,optional" copier:"Order"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type ListClustersResp struct { - Resp200 struct { - Count int32 `json:"count,omitempty" copier:"Count"` - Clusters []Cluster `json:"clusters,omitempty" copier:"Clusters"` - } `json:"resp200,omitempty" copier:"Resp200"` - Resp400 struct { - ErrorCode string `json:"errorCode,optional" copier:"ErrorCode"` - ErrorMsg string `json:"errorMsg,optional" copier:"ErrorMsg"` - } `json:"resp400,omitempty" copier:"Resp400"` -} - -type ListClustersResp200 struct { - Count int32 `json:"count,omitempty" copier:"Count"` - Clusters []Cluster `json:"clusters,omitempty" copier:"Clusters"` -} - -type ListClustersResp400 struct { - ErrorCode string `json:"errorCode,optional" copier:"ErrorCode"` - ErrorMsg string `json:"errorMsg,optional" copier:"ErrorMsg"` -} - -type ListFirewallGroupsReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Fields string `json:"fields,optional" copier:"fields"` -} - -type ListFirewallGroupsResp struct { - Firewall_groups struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - Description string `json:"description,optional" copier:"description"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Id string `json:"id,optional" copier:"id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_groups,omitempty" copier:"firewall_groups"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListFirewallPoliciesReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Fields string `json:"fields,optional" copier:"fields"` -} - -type ListFirewallPoliciesResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Firewall_policies []Firewall_policies `json:"firewall_policies,optional" copier:"firewall_policies"` -} - -type ListFirewallRulesReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Fields string `json:"fields,optional" copier:"fields"` -} - -type ListFirewallRulesResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Firewall_rules []Firewall_rules `json:"firewall_rules,optional" copier:"firewall_rules"` -} - -type ListFlavorsDetailReq struct { - Platform string `form:"platform,optional"` -} - -type ListFlavorsDetailResp struct { - Flavor []Flavors `json:"flavors" copier:"Flavor"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type ListFloatingIPsReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Limit int32 `json:"limit,optional" copier:"Limit"` - OffSet int32 `json:"offSet,optional" copier:"OffSet"` -} - -type ListFloatingIPsResp struct { - Floatingips []Floatingips `json:"floatingips,omitempty" copier:"floatingips"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListImagesReq struct { - Platform string `form:"platform,optional"` -} - -type ListImagesResp struct { - First string `json:"first" copier:"First"` - Next string `json:"next" copier:"Next"` - Schema string `json:"schema" copier:"Schema"` - Images []Images `json:"images" copier:"Images"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type ListImportTasksReq struct { +type ListTrainingJobsreq struct { ProjectId string `path:"projectId"` - DatasetId string `path:"datasetId"` Limit int32 `form:"limit,optional"` Offset int32 `form:"offSet,optional"` ModelArtsType string `form:"modelArtsType,optional"` } -type ListImportTasksResp struct { - TotalCount uint32 `json:"totalCount,omitempty"` - ImportTasks []*ImportTasks `json:"importTasks,omitempty"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` +type ListTrainingJobsresp struct { + Total int32 `json:"total"` + Count int32 `json:"count,omitempty"` + Limit int32 `json:"limit,omitempty"` + Offset int32 `json:"offset,omitempty"` + SortBy string `json:"sortBy,omitempty"` + Order string `json:"order,omitempty"` + GroupBy string `json:"groupBy,omitempty"` + WorkspaceID string `json:"workspaceId,omitempty"` + AiProject string `json:"aiProject,omitempty"` + Items []*Items `json:"items,omitempty"` + Code int32 `json:"code,omitempty,omitempty"` + Msg string `json:"msg,omitempty,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } -type ListNetworkSegmentRangesReq struct { - Limit int32 `json:"limit,optional"` - OffSet int32 `json:"offSet,optional"` - Platform string `form:"platform,optional"` +type DeleteTrainingJobReq struct { + Project_id string `path:"projectId"` + Training_job_id string `path:"trainingJobId"` + ModelArtsType string `form:"modelArtsType,optional"` } -type ListNetworkSegmentRangesResp struct { - NetworkSegmentRange []Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +type DeleteTrainingJobResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } -type ListNetworksReq struct { - Platform string `form:"platform,optional"` +type CreateServiceReq struct { + WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` + Schedule Scheduler `json:"schedule,optional" copier:"Schedule"` + ClusterId string `json:"clusterId,optional" copier:"ClusterId"` + InferType string `json:"inferType,optional" copier:"InferType"` + VpcId string `json:"vpcId,optional" copier:"VpcId"` + ServiceName string `json:"serviceName,optional" copier:"ServiceName"` + Description string `json:"description,optional" copier:"Description"` + SecurityGroupId string `json:"securityGroupId,optional" copier:"SecurityGroupId"` + SubnetNetworkId string `json:"subnetNetworkId,optional" copier:"SubnetNetworkId"` + Config []ServiceConfig `json:"config,optional" copier:"Config"` + ProjectId string `path:"projectId"` + ModelArtsType string `json:"modelartsType,optional"` } -type ListNetworksResp struct { - Networks []Network `json:"networks" copier:"Networks"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` +type CreateServiceResp struct { + ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` + ResourceIds []string `json:"resourceIds,omitempty" copier:"ResourceIds"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } -type ListNodesReq struct { - Platform string `form:"platform,optional"` - Limit int64 `json:"limit" copier:"Limit"` - Marker string `json:"marker" copier:"Marker"` - SortDir string `json:"sort_dir" copier:"SortDir"` - SortKey string `json:"sort_key" copier:"SortKey"` - InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` - Maintenance bool `json:"maintenance" copier:"Maintenance"` - Associated bool `json:"associated" copier:"Associated"` - ProvisionState string `json:"provision_state" copier:"ProvisionState"` - Sharded bool `json:"sharded" copier:"Sharded"` - Driver string `json:"driver" copier:"Driver"` - ResourceClass string `json:"resource_class" copier:"ResourceClass"` - ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` - Conductor string `json:"conductor" copier:"Conductor"` - Fault string `json:"fault" copier:"Fault"` - Owner string `json:"owner" copier:"Owner"` - Lessee string `json:"lessee" copier:"Lessee"` - Shard []string `json:"shard" copier:"Shard"` - Detail bool `json:"detail" copier:"Detail"` - ParentNode string `json:"parent_node" copier:"ParentNode"` - IncludeChildren string `json:"include_children" copier:"IncludeChildren"` +type Scheduler struct { + Duration int32 `json:"duration,optional" copier:"Duration"` + TimeUnit string `json:"timeUnit,optional" copier:"TimeUnit"` + Type string `json:"type,optional" copier:"Type"` } -type ListNodesResp struct { - Nodes []Nodes `json:"nodes" copier:"Nodes"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` +type ServiceConfig struct { + CustomSpec CustomSpec `json:"customSpec,optional" copier:"CustomSpec"` + Envs map[string]string `json:"envs,optional" copier:"Envs"` + Specification string `json:"specification,optional" copier:"Specification"` + Weight int32 `json:"weight,optional" copier:"Weight"` + ModelId string `json:"modelId,optional" copier:"ModelId"` + SrcPath string `json:"srcPath,optional" copier:"SrcPath"` + ReqUri string `json:"reqUri,optional" copier:"ReqUri"` + MappingType string `json:"mappingType,optional" copier:"MappingType"` + ClusterId string `json:"clusterId,optional" copier:"ClusterId"` + Nodes []string `json:"nodes,optional" copier:"Nodes"` + SrcType string `json:"srcType,optional" copier:"SrcType"` + DestPath string `json:"destPath,optional" copier:"DestPath"` + InstanceCount int32 `json:"instanceCount,optional" copier:"InstanceCount"` } -type ListNotebookParam struct { - Feature string `json:"feature,optional" copier:"Feature"` - Limit int32 `json:"limit,optional" copier:"Limit"` - Name string `json:"name,optional" copier:"Name"` - PoolId string `json:"poolId,optional" copier:"PoolId"` - Offset int32 `json:"offset,optional" copier:"Offset"` - Owner string `json:"owner,optional" copier:"Owner"` - SortDir string `json:"sortDir,optional" copier:"SortDir"` - SortKey string `json:"sortKey,optional" copier:"SortKey"` - Status string `json:"status,optional" copier:"Status"` - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` +type CustomSpec struct { + GpuP4 float64 `json:"gpuP4,optional" copier:"GpuP4"` + Memory int64 `json:"memory,optional" copier:"Memory"` + Cpu float64 `json:"cpu,optional" copier:"Cpu"` + AscendA310 int64 `json:"ascendA310,optional" copier:"AscendA310"` } -type ListNotebookReq struct { - ProjectId string `json:"projectId" copier:"ProjectId"` - Param struct { - Feature string `json:"feature,optional" copier:"Feature"` - Limit int32 `json:"limit,optional" copier:"Limit"` - Name string `json:"name,optional" copier:"Name"` - PoolId string `json:"poolId,optional" copier:"PoolId"` - Offset int32 `json:"offset,optional" copier:"Offset"` - Owner string `json:"owner,optional" copier:"Owner"` - SortDir string `json:"sortDir,optional" copier:"SortDir"` - SortKey string `json:"sortKey,optional" copier:"SortKey"` - Status string `json:"status,optional" copier:"Status"` - WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` - } `json:"param,optional" copier:"Param"` - Platform string `json:"platform,optional"` +type DeleteServiceReq struct { + ProjectId string `path:"projectId"` + ServiceId string `path:"serviceId"` + ModelArtsType string `form:"modelArtsType,optional"` } -type ListNotebookResp struct { - Current int32 `json:"current,omitempty" copier:"Current"` - Data []NotebookResp `json:"data" copier:"Data"` - Pages int32 `json:"pages,omitempty" copier:"Pages"` - Size int32 `json:"size,omitempty" copier:"Size"` - Total int64 `json:"total" copier:"Total"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` +type DeleteServiceResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } -type ListNoticeReq struct { +type ListServicesReq struct { + ProjectId string `path:"projectId"` + Limit int32 `form:"limit,optional"` + Offset int32 `form:"offSet,optional"` + ModelArtsType string `form:"modelArtsType,optional"` + Platform string `form:"platform,optional"` } -type ListNoticeResp struct { - Code int64 `json:"code"` - Msg string `json:"msg"` - Data []NoticeInfo `json:"data"` -} - -type ListPortsReq struct { - Limit int32 `json:"limit,optional"` - OffSet int32 `json:"offSet,optional"` - Platform string `form:"platform,optional"` -} - -type ListPortsResp struct { - Ports []PortLists `json:"ports,optional" copier:"ports"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListResult struct { - List interface{} `json:"list,omitempty"` -} - -type ListRoutersReq struct { - Limit int32 `json:"limit,optional"` - OffSet int32 `json:"offSet,optional"` - Platform string `form:"platform,optional"` -} - -type ListRoutersResp struct { - Routers []Routers `json:"routers,optional" copier:"routers"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListSecurityGroupRulesReq struct { - Platform string `form:"platform,optional" copier:"Platform"` -} - -type ListSecurityGroupRulesResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group_rules struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` - } `json:"security_group_rules,optional" copier:"security_group_rules"` -} - -type ListSecurityGroupsReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Fields string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` -} - -type ListSecurityGroupsResp struct { - Security_groups struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` - } `json:"security_groups,optional" copier:"security_groups"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListServersDetailedReq struct { - Platform string `form:"platform,optional"` -} - -type ListServersDetailedResp struct { - ServersDetailed []ServersDetailed `json:"servers" copier:"ServersDetailed"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type ListServersReq struct { - Limit int32 `form:"limit,optional"` - OffSet int32 `form:"offSet,optional"` - Platform string `form:"platform,optional"` -} - -type ListServersResp struct { - TotalNumber uint32 `json:"totalNumber" copier:"TotalNumber"` - Servers []Servers `json:"servers" copier:"Servers"` - Servers_links []Servers_links `json:"serversLinks" copier:"Servers_links"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` +type ListServicesResp struct { + TotalCount int32 `json:"total,omitempty" copier:"TotalCount"` + Count int32 `json:"count,omitempty" copier:"Count"` + Services []ListServices `json:"services,omitempty" copier:"Services"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` } type ListServices struct { @@ -4278,1991 +2097,6 @@ type ListServices struct { AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` } -type ListServicesReq struct { - ProjectId string `path:"projectId"` - Limit int32 `form:"limit,optional"` - Offset int32 `form:"offSet,optional"` - ModelArtsType string `form:"modelArtsType,optional"` - Platform string `form:"platform,optional"` -} - -type ListServicesResp struct { - TotalCount int32 `json:"total,omitempty" copier:"TotalCount"` - Count int32 `json:"count,omitempty" copier:"Count"` - Services []ListServices `json:"services,omitempty" copier:"Services"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type ListSubnetsReq struct { - Limit int32 `json:"limit,optional"` - OffSet int32 `json:"offSet,optional"` - Platform string `form:"platform,optional"` -} - -type ListSubnetsResp struct { - Subnets []Subnets `json:"subnets" copier:"Subnets"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListTrainingJobsreq struct { - ProjectId string `path:"projectId"` - Limit int32 `form:"limit,optional"` - Offset int32 `form:"offSet,optional"` - ModelArtsType string `form:"modelArtsType,optional"` -} - -type ListTrainingJobsresp struct { - Total int32 `json:"total"` - Count int32 `json:"count,omitempty"` - Limit int32 `json:"limit,omitempty"` - Offset int32 `json:"offset,omitempty"` - SortBy string `json:"sortBy,omitempty"` - Order string `json:"order,omitempty"` - GroupBy string `json:"groupBy,omitempty"` - WorkspaceID string `json:"workspaceId,omitempty"` - AiProject string `json:"aiProject,omitempty"` - Items []*Items `json:"items,omitempty"` - Code int32 `json:"code,omitempty,omitempty"` - Msg string `json:"msg,omitempty,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type ListVolumeTypesReq struct { - Platform string `form:"platform,optional"` -} - -type ListVolumeTypesResp struct { - VolumeTypes []Volume_types `json:"volume_types" copier:"VolumeTypes"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ListVolumesDetailReq struct { - Platform string `form:"platform,optional"` -} - -type ListVolumesDetailResp struct { - VolumeDetail []VolumeDetail `json:"volumes" copier:"VolumeDetail"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type ListVolumesReq struct { - ProjectId string `json:"project_id" copier:"ProjectId"` - AllTenants string `json:"all_tenants" copier:"AllTenants"` - Sort string `json:"sort" copier:"Sort"` - Limit int32 `json:"limit" copier:"Limit"` - Offset int32 `json:"offset" copier:"Offset"` - Marker string `json:"marker" copier:"Marker"` - WithCount bool `json:"with_count" copier:"WithCount"` - CreatedAt string `json:"created_at" copier:"CreatedAt"` - ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` - UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` - Platform string `form:"platform,optional"` -} - -type ListVolumesResp struct { - Volumes []VolumesList `json:"volumes" copier:"Volumes"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type LogExportPath struct { - ObsUrl string `json:"obsUrl,optional"` - HostPath string `json:"hostPath,optional"` -} - -type LogExportPathCreateTraining struct { -} - -type LogExportPathCreateTrainingJob struct { - ObsUrl string `json:"obsUrl,optional"` -} - -type MemUsage struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` -} - -type Memory struct { - Size int `json:"size"` - Unit string `json:"unit"` -} - -type Metadata struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - CreateTime uint64 `json:"createTime"` - WorkspaceID string `json:"workspaceId"` - AiProject string `json:"aiProject"` - UserName string `json:"userName"` - Annotations struct { - JobTemplate string `json:"jobTemplate"` - KeyTask string `json:"keyTask"` - } `json:"annotations"` - TrainingExperimentReference TrainingExperimentReference `json:"trainingExperimentReference"` - Tags []interface{} `json:"tags"` -} - -type MetadataAlRp struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - Description string `json:"description,optional"` - CreateTime uint64 `json:"createTime,optional"` - WorkspaceId string `json:"workspaceId,optional"` - AiProject string `json:"aiProject,optional"` - UserName string `json:"userName,optional"` - DomainId string `json:"domainId,optional"` - Source string `json:"source,optional"` - ApiVersion string `json:"apiVersion,optional"` - IsValid bool `json:"isValid,optional"` - State string `son:"state,optional"` - Size int32 `json:"size,optional"` - Tags []*TagsAlRp `json:"tags,optional"` - AttrList []string `json:"attrList,optional"` - VersionNum int32 `json:"versionNum,optional"` - UpdateTime uint64 `json:"updateTime,optional"` -} - -type MetadataAlRq struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - Description string `json:"description,optional"` - WorkspaceId string `json:"workspaceId,optional"` - AiProject string `json:"aiProject,optional"` -} - -type MetadataDetailed struct { -} - -type MetadataS struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - Description string `json:"description,optional"` - WorkspaceId string `json:"workspaceId,optional"` -} - -type MetadataServer struct { -} - -type Migrate struct { - Host []map[string]string `json:"host,optional" copier:"host"` -} - -type MigrateServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `json:"platform,optional"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - MigrateAction string `json:"migrate_action,optional" copier:"MigrateAction"` - Migrate struct { - Host []map[string]string `json:"host,optional" copier:"host"` - } `json:"migrate" copier:"Migrate"` -} - -type MigrateServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type ModelNamesReq struct { - Type string `form:"type"` -} - -type ModelNamesResp struct { - ModelNames []string `json:"models"` -} - -type ModelTypesResp struct { - ModelTypes []string `json:"types"` -} - -type MountNotebookStorageParam struct { - Category string `json:"category" copier:"Category"` - MountPath string `json:"mountPath" copier:"MountPath"` - Uri string `json:"uri" copier:"Uri"` -} - -type MountNotebookStorageReq struct { - InstanceId string `json:"instanceId" copier:"InstanceId"` - ProjectId string `json:"projectId" copier:"ProjectId"` - Param struct { - Category string `json:"category" copier:"Category"` - MountPath string `json:"mountPath" copier:"MountPath"` - Uri string `json:"uri" copier:"Uri"` - } `json:"param" copier:"Param"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type MountNotebookStorageResp struct { - Category string `json:"category" copier:"Category"` - Id string `json:"id" copier:"Id"` - MountPath string `json:"mountPath" copier:"MountPath"` - Status string `json:"status" copier:"Status"` - Uri string `json:"uri" copier:"Uri"` -} - -type MulCrServer struct { - Server struct { - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - Description string `json:"description,optional" copier:"Description"` - ImageRef string `json:"imageRef,optional" copier:"ImageRef"` - Networks []CreNetwork `json:"networks,optional" copier:"Networks"` - MinCount int32 `json:"min_count,optional" copier:"MinCount"` - } `json:"server" copier:"Server"` -} - -type MulServer struct { - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - Description string `json:"description,optional" copier:"Description"` - ImageRef string `json:"imageRef,optional" copier:"ImageRef"` - Networks []CreNetwork `json:"networks,optional" copier:"Networks"` - MinCount int32 `json:"min_count,optional" copier:"MinCount"` -} - -type MulServerResp struct { - Id string `json:"id" copier:"Id"` - Links []Links `json:"links" copier:"Links"` - OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` - SecurityGroups []Security_groups_server `json:"security_groups" copier:"SecurityGroups"` - AdminPass string `json:"adminPass" copier:"AdminPass"` -} - -type Network struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id,optional" copier:"Id"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu,optional" copier:"Mtu"` - Name string `json:"name,optional" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled,optional" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id,optional" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id,optional" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number,optional" copier:"RevisionNumber"` - Shared bool `json:"shared,optional" copier:"Shared"` - RouterExternal bool `json:"router_external,optional" copier:"RouterExternal"` - Status string `json:"status,optional" copier:"Status"` - Subnets []string `json:"subnets,optional" copier:"Subnets"` - Tags []string `json:"tags,optional" copier:"Tags"` - TenantId string `json:"tenant_id,optional" copier:"TenantId"` - UpdatedAt string `json:"updated_at,optional" copier:"UpdatedAt"` - VlanTransparent bool `json:"vlan_transparent,optional" copier:"VlanTransparent"` - Description string `json:"description,optional" copier:"Description"` - IsDefault bool `json:"is_default,optional" copier:"IsDefault"` -} - -type NetworkData struct { -} - -type NetworkDict struct { - Id int `json:"id"` - PublicNetworkName string `json:"public_netWork_name"` -} - -type NetworkNum struct { - NetworkNum int32 `json:"networkNum"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type Network_segment_range struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` -} - -type Network_segment_ranges struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` -} - -type Networkdetail struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id" copier:"Id,optional"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu" copier:"Mtu"` - Name string `json:"name" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number" copier:"RevisionNumber"` - Shared bool `json:"shared" copier:"Shared"` - Status string `json:"status" copier:"Status"` - Subnets []string `json:"subnets" copier:"Subnets"` - TenantId string `json:"tenant_id" copier:"TenantId"` - VlanTransparent bool `json:"vlan_transparent" copier:"VlanTransparent"` - Description string `json:"description" copier:"Description"` - IsDefault bool `json:"is_default" copier:"IsDefault"` - Tags []string `json:"tags" copier:"Tags"` -} - -type Nfs struct { - NfsServerPath string `json:"nfsServerPath,optional"` - LocalPath string `json:"localPath,optional"` - ReadOnly bool `json:"readOnly,optional"` -} - -type NodeAsset struct { - Name string `json:"Name"` //租户名称 - NodeName string `json:"NodeName"` // 节点名称 - CpuTotal int64 `json:"CpuTotal"` // cpu核数 - CpuUsable float64 `json:"CpuUsable"` // cpu可用率 - DiskTotal int64 `json:"DiskTotal"` // 磁盘空间 - DiskAvail int64 `json:"DiskAvail"` // 磁盘可用空间 - MemTotal int64 `json:"MemTotal"` // 内存总数 - MemAvail int64 `json:"MemAvail"` // 内存可用数 - GpuTotal int64 `json:"GpuTotal"` // gpu总数 - GpuAvail int64 `json:"GpuAvail"` // gpu可用数 - ParticipantId int64 `json:"ParticipantId"` // 集群动态信息id -} - -type NodeAssetsResp struct { - NodeAssets []NodeAsset `json:"nodeAssets"` -} - -type NodeRegion struct { - Id string `json:"id"` - Name string `json:"name"` - Category int `json:"category"` - Value int `json:"value"` -} - -type Nodes struct { - InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` - Links []Links `json:"links" copier:"Links"` - Maintenance bool `json:"maintenance" copier:"Maintenance"` - Name string `json:"name" copier:"Name"` - PowerState string `json:"power_state" copier:"PowerState"` - ProvisionState string `json:"provision_state" copier:"ProvisionState"` - Uuid string `json:"uuid" copier:"Uuid"` -} - -type NotebookResp struct { - ActionProgress []ActionProgress `json:"actionProgress,omitempty" copier:"ActionProgress"` - Description string `json:"description,omitempty" copier:"Description"` - Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"` - FailReason string `json:"failReason,omitempty" copier:"FailReason"` - Flavor string `json:"flavor,omitempty" copier:"Flavor"` - Id string `json:"id,omitempty" copier:"Id"` - Image struct { - Arch string `json:"arch,omitempty" copier:"Arch"` - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` - Description string `json:"description,omitempty" copier:"Description"` - DevServices []string `json:"devServices,omitempty" copier:"DevServices"` - Id string `json:"id,omitempty" copier:"Id"` - Name string `json:"name,omitempty" copier:"Name"` - Namespace string `json:"namespace,omitempty" copier:"Namespace"` - Origin string `json:"origin,omitempty" copier:"Origin"` - ResourceCategories []string `json:"resourceCategories,omitempty" copier:"ResourceCategories"` - ServiceType string `json:"serviceType,omitempty" copier:"ServiceType"` - Size int64 `json:"size,omitempty" copier:"Size"` - Status string `json:"status,omitempty" copier:"Status"` - StatusMessage string `json:"statusMessage,omitempty" copier:"StatusMessage"` - SupportResCategories []string `json:"supportResCategories,omitempty" copier:"SupportResCategories"` - SwrPath string `json:"swrPath,omitempty" copier:"SwrPath"` - Tag string `json:"tag,omitempty" copier:"Tag"` - TypeImage string `json:"type,omitempty" copier:"TypeImage"` - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` - Visibility string `json:"visibility,omitempty" copier:"Visibility"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - } `json:"image,omitempty" copier:"Image"` - Lease struct { - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` - Duration int64 `json:"duration,omitempty" copier:"Duration"` - Enable bool `json:"enable,omitempty" copier:"Enable"` - TypeLease string `json:"type,omitempty" copier:"TypeLease"` - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` - } `json:"lease,omitempty" copier:"Lease"` - Name string `json:"name,omitempty" copier:"Name"` - Pool struct { - Id string `json:"id,omitempty" copier:"Id"` - Name string `json:"name,omitempty" copier:"Name"` - } `json:"pool,omitempty" copier:"Pool"` - Status string `json:"status,omitempty" copier:"Status"` - Token string `json:"token,omitempty" copier:"Token"` - Url string `json:"url,omitempty" copier:"Url"` - Volume struct { - Capacity int64 `json:"capacity,omitempty" copier:"Capacity"` - Category string `json:"category,omitempty" copier:"Category"` - MountPath string `json:"mountPath,omitempty" copier:"MountPath"` - Ownership string `json:"ownership,omitempty" copier:"Ownership"` - Status string `json:"status,omitempty" copier:"Status"` - } `json:"volume,omitempty" copier:"Volume"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - Feature string `json:"feature,omitempty" copier:"Feature"` - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` // * - Hooks struct { - ContainerHooksResp ContainerHooksResp `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // * - } `json:"hooks,omitempty" copier:"Hooks"` // * - Tags []string `json:"tags,omitempty" copier:"Tags"` // * - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` // * - UserNotebookResp struct { - UserNotebookDomain UserNotebookDomain `json:"domain,omitempty" copier:"UserNotebookDomain"` // * - Id string `json:"id,omitempty" copier:"Id"` // * - Name string `json:"name,omitempty" copier:"Name"` // * - } `json:"user,omitempty" copier:"UserNotebookResp"` // * - UserId string `json:"userId,omitempty" copier:"UserId"` // * - BillingItems []string `json:"billingItems,omitempty" copier:"BillingItems"` // * -} - -type NoticeInfo struct { - AdapterId int64 `json:"adapterId"` - AdapterName string `json:"adapterName"` - ClusterId int64 `json:"clusterId"` - ClusterName string `json:"clusterName"` - NoticeType string `json:"noticeType"` - TaskName string `json:"taskName"` - Incident string `json:"incident"` -} - -type Obs struct { - ObsURL string `json:"obsUrl"` -} - -type ObsTra struct { - ObsUrl string `json:"obsUrl,optional"` -} - -type OpenstackOverview struct { - Max_total_cores int32 `json:"max_total_cores"` - Max_total_ram_size int32 `json:"max_total_ram_size"` - Max_total_volumes int32 `json:"max_total_volumes"` -} - -type OpenstackOverviewReq struct { - Platform string `form:"platform,optional"` -} - -type OpenstackOverviewResp struct { - Data struct { - Max_total_cores int32 `json:"max_total_cores"` - Max_total_ram_size int32 `json:"max_total_ram_size"` - Max_total_volumes int32 `json:"max_total_volumes"` - } `json:"data"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type OperatorParam struct { - Id string `json:"id,optional" copier:"Id"` - Name string `json:"name,optional" copier:"Name"` - Params string `json:"params,optional" copier:"Params"` - AdvancedParamsSwitch bool `json:"advancedParamsSwitch,optional" copier:"AdvancedParamsSwitch"` -} - -type OutputTra struct { - Name string `json:"name,optional"` - AccessMethod string `json:"accessMethod,optional"` - PrefetchToLocal string `json:"prefetchToLocal,optional"` - RemoteOut struct { - Obs ObsTra `json:"obs,optional"` - } `json:"remoteOut,optional"` -} - -type Outputs struct { - Name string `json:"name"` - LocalDir string `json:"localDir"` - AccessMethod string `json:"accessMethod"` - Remote struct { - Obs Obs `json:"obs"` - } `json:"remote"` - Mode string `json:"mode"` - Period int32 `json:"period"` - PrefetchToLocal bool `json:"prefetchToLocal"` -} - -type OutputsAl struct { - Name string `json:"name,optional"` - Description string `json:"description,optional"` -} - -type PageInfo struct { - PageNum int `form:"pageNum"` - PageSize int `form:"pageSize"` -} - -type PageResult struct { - List interface{} `json:"list,omitempty"` - Total int64 `json:"total,omitempty"` - PageNum int `json:"pageNum,omitempty"` - PageSize int `json:"pageSize,omitempty"` -} - -type ParamSl struct { - Key string `json:"key"` - Val string `json:"value"` -} - -type Parameters struct { - Name string `json:"name"` - Description string `json:"description"` - I18NDescription interface{} `json:"i18nDescription"` - Value string `json:"value"` - Constraint struct { - Type string `json:"type"` - Editable bool `json:"editable"` - Required bool `json:"required"` - Sensitive bool `json:"sensitive"` - ValidType string `json:"validType"` - ValidRange interface{} `json:"validRange,optional"` - } `json:"constraint"` -} - -type ParametersAlRq struct { - Name string `json:"name,optional"` - Description string `json:"description,optional"` - I18NDescription struct { - Language string `json:"language,optional"` - Description string `json:"description,optional"` - } `json:"i18nDescription,optional"` - Value string `json:"value,optional"` - Constraint struct { - Type string `son:"type,optional"` - Editable bool `json:"editable,optional"` - Required bool `json:"required,optional"` - Sensitive bool `json:"sensitive,optional"` - ValidType string `json:"validType,optional"` - ValidRange []string `json:"validRange,optional"` - } `json:"constraint,optional"` -} - -type ParametersTrainJob struct { - Name string `json:"name,optional"` - Value string `json:"value,optional"` -} - -type Participant struct { - Id int64 `json:"id"` - Name string `json:"name"` - Address string `json:"address"` - MetricsUrl string `json:"metricsUrl"` - TenantName string `json:"tenantName"` - TypeName string `json:"typeName"` -} - -type ParticipantSl struct { - ParticipantId int64 `json:"id"` - ParticipantName string `json:"name"` - ParticipantType string `json:"type"` -} - -type PauseServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Pause_action string `json:"pause_action" copier:"pause_action"` - Platform string `form:"platform,optional"` -} - -type PauseServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type PerCenterComputerPowersResp struct { - Chart interface{} `json:"chart"` -} - -type Personality struct { - Path string `json:"path" copier:"Path"` - Contents string `json:"contents" copier:"Contents"` -} - -type PodLogsReq struct { - TaskId string `json:"taskId"` - TaskName string `json:"taskName"` - ClusterId string `json:"clusterId"` - ClusterName string `json:"clusterName"` - AdapterId string `json:"adapterId"` - AdapterName string `json:"adapterName"` - PodName string `json:"podName"` - Stream bool `json:"stream"` -} - -type Policies struct { -} - -type PoliciesCreateTraining struct { -} - -type Pool struct { - Id string `json:"id,omitempty" copier:"Id"` - Name string `json:"name,omitempty" copier:"Name"` -} - -type Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment struct { - Hostname string `json:"hostname,optional" copier:"hostname"` - Ip_address string `json:"ip_address,optional" copier:"ip_address"` - Opt_name string `json:"opt_name,optional" copier:"opt_name"` - } `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` -} - -type PortLists struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment []Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Extra_dhcp_opts []Extra_dhcp_opts `json:"extra_dhcp_opts,optional" copier:"extra_dhcp_opts"` - Fixed_ips []Fixed_ips `json:"fixed_ips,optional" copier:"fixed_ips"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"project_id,optional" copier:"project_id"` - Security_groups []string `json:"security_groups,optional" copier:"security_groups"` - Status string `json:"status,optional" copier:"status"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` -} - -type Port_details struct { - Status string `json:"status,optional" copier:"status"` - Name string `json:"name,optional" copier:"name"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Device_id string `json:"device_id,optional" copier:"device_id"` -} - -type Port_forwardings struct { - Protocol string `json:"protocol,optional" copier:"protocol"` - Internal_ip_address string `json:"internal_ip_address,optional" copier:"internal_ip_address"` - Internal_port string `json:"internal_port,optional" copier:"internal_port"` - Internal_port_id string `json:"internal_port_id,optional" copier:"internal_port_id"` - Id string `json:"id,optional" copier:"id"` -} - -type Portgroups struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` -} - -type Ports struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` -} - -type PostStart struct { - Mode string `json:"mode,omitempty" copier:"Mode"` // * - Script string `json:"script,omitempty" copier:"Script"` // * - Type string `json:"type,omitempty" copier:"Type"` // * -} - -type PreStart struct { - Mode string `json:"mode,omitempty" copier:"Mode"` // * - Script string `json:"script,omitempty" copier:"Script"` // * - Type string `json:"type,omitempty" copier:"Type"` // * -} - -type Private struct { - Addr string `json:"addr" copier:"Addr"` - Version uint32 `json:"version" copier:"Version"` -} - -type ProcessorDataSource struct { - Name string `json:"name,optional" copier:"Name"` - Source string `json:"source,optional" copier:"Source"` - Type string `json:"type,optional" copier:"type"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - VersionName string `json:"versionName,optional" copier:"VersionName"` -} - -type Properties struct { -} - -type PublicFlavorReq struct { -} - -type PublicFlavorResp struct { - Code int `json:"code"` - Message string `json:"message"` - FlavorDict []FlavorDict `json:"flavorDict"` -} - -type PublicImageReq struct { -} - -type PublicImageResp struct { - Code int `json:"code"` - Message string `json:"message"` - ImageDict []ImageDict `json:"imageRDict"` -} - -type PublicNetworkReq struct { -} - -type PublicNetworkResp struct { - Code int `json:"code"` - Message string `json:"message"` - NetworkDict []NetworkDict `json:"networkDict"` -} - -type PullTaskInfoReq struct { - AdapterId int64 `form:"adapterId"` -} - -type PullTaskInfoResp struct { - HpcInfoList []*HpcInfo `json:"HpcInfoList,omitempty"` - CloudInfoList []*CloudInfo `json:"CloudInfoList,omitempty"` - AiInfoList []*AiInfo `json:"AiInfoList,omitempty"` - VmInfoList []*VmInfo `json:"VmInfoList,omitempty"` -} - -type PushNoticeReq struct { - NoticeInfo struct { - AdapterId int64 `json:"adapterId"` - AdapterName string `json:"adapterName"` - ClusterId int64 `json:"clusterId"` - ClusterName string `json:"clusterName"` - NoticeType string `json:"noticeType"` - TaskName string `json:"taskName"` - Incident string `json:"incident"` - } `json:"noticeInfo"` -} - -type PushNoticeResp struct { - Code int64 `json:"code"` - Msg string `json:"msg"` -} - -type PushResourceInfoReq struct { - AdapterId int64 `json:"adapterId"` - ResourceStats []ResourceStats `json:"resourceStats"` -} - -type PushResourceInfoResp struct { - Code int64 `json:"code"` - Msg string `json:"msg"` -} - -type PushTaskInfoReq struct { - AdapterId int64 `json:"adapterId"` - HpcInfoList []*HpcInfo `json:"hpcInfoList"` - CloudInfoList []*CloudInfo `json:"cloudInfoList"` - AiInfoList []*AiInfo `json:"aiInfoList"` - VmInfoList []*VmInfo `json:"vmInfoList"` -} - -type PushTaskInfoResp struct { - Code int64 `json:"code"` - Msg string `json:"msg"` -} - -type QueryServiceConfig struct { - ModelVersion string `json:"modelVersion,omitempty" copier:"ModelVersion"` - FinishedTime string `json:"finishedTime,omitempty" copier:"FinishedTime"` - CustomSpec *CustomSpec `json:"CustomSpec,omitempty" copier:"CustomSpec"` - Envs map[string]string `json:"envs,omitempty" copier:"Envs"` - Specification string `json:"specification,omitempty" copier:"Specification"` - Weight int32 `json:"weight,omitempty" copier:"Weight"` - ModelId string `json:"modelId,omitempty" copier:"ModelId"` - SrcPath string `json:"srcPath,omitempty" copier:"SrcPath"` - ReqUri string `json:"reqUri,omitempty" copier:"ReqUri"` - MappingType string `json:"mappingType,omitempty" copier:"MappingType"` - StartTime string `json:"startTime,omitempty" copier:"StartTime"` - ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` - Nodes []string `json:"nodes,omitempty" copier:"Nodes"` - MappingRule string `json:"mappingRule,omitempty" copier:"MappingRule"` - ModelName string `json:"modelName,omitempty" copier:"ModelName"` - SrcType string `json:"srcType,omitempty" copier:"SrcType"` - DestPath string `json:"destPath,omitempty" copier:"DestPath"` - InstanceCount int32 `json:"instanceCount,omitempty" copier:"InstanceCount"` - Status string `json:"status,omitempty" copier:"Status"` - Scaling bool `json:"scaling,omitempty" copier:"Scaling"` - SupportDebug bool `json:"supportDebug,omitempty" copier:"SupportDebug"` - AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` -} - -type QueueAsset struct { - 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数 -} - -type QueueAssetsResp struct { - QueueAssets []QueueAsset `json:"queueAsset"` -} - -type RaidConfig struct { -} - -type Rate struct { -} - -type Reboot struct { - Type string `json:"type" copier:"Type"` -} - -type RebootServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Reboot struct { - Type string `json:"type" copier:"Type"` - } `json:"reboot" copier:"Reboot"` - Platform string `form:"platform,optional"` -} - -type RebootServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type Rebuild struct { - ImageRef string `json:"imageRef" copier:"ImageRef"` - AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` - AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` - AdminPass string `json:"adminPass" copier:"AdminPass"` - Name string `json:"name" copier:"Name"` - PreserveEphemeral bool `json:"preserve_ephemeral" copier:"PreserveEphemeral"` - Description string `json:"description" copier:"Description"` - KeyName string `json:"key_name" copier:"KeyName"` - UserData string `json:"user_data" copier:"UserData"` - Hostname string `json:"hostname" copier:"Hostname"` - Metadata MetadataServer `json:"metadata" copier:"Metadata"` - Personality []Personality `json:"personality" copier:"Personality"` - Trusted_image_certificates []Trusted_image_certificates `json:"trusted_image_certificates" copier:"trusted_image_certificates"` -} - -type RebuildServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `form:"platform,optional"` - Rebuild struct { - ImageRef string `json:"imageRef" copier:"ImageRef"` - AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` - AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` - AdminPass string `json:"adminPass" copier:"AdminPass"` - Name string `json:"name" copier:"Name"` - PreserveEphemeral bool `json:"preserve_ephemeral" copier:"PreserveEphemeral"` - Description string `json:"description" copier:"Description"` - KeyName string `json:"key_name" copier:"KeyName"` - UserData string `json:"user_data" copier:"UserData"` - Hostname string `json:"hostname" copier:"Hostname"` - Metadata MetadataServer `json:"metadata" copier:"Metadata"` - Personality []Personality `json:"personality" copier:"Personality"` - Trusted_image_certificates []Trusted_image_certificates `json:"trusted_image_certificates" copier:"trusted_image_certificates"` - } `json:"rebuild" copier:"Rebuild"` -} - -type RebuildServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type Region struct { - RegionName string `json:"RegionName"` // 域名 - SoftStack string `json:"SoftStack"` // 软件栈 - SlurmNum int64 `json:"SlurmNum"` // 超算域适配slurm数量 - AdaptorInterfaceSum int64 `json:"AdaptorInterfaceSum"` // 适配接口数量 - RunningJobs int64 `json:"runningJobs"` -} - -type RegionNum struct { - RegionSum int64 `json:"regionSum"` - SoftStackSum int64 `json:"softStackSum"` -} - -type RegisterClusterReq struct { - Name string `form:"name"` // 名称 - Address string `form:"address"` // 地址 - Token string `form:"token"` // 数算集群token - MetricsUrl string `form:"metricsUrl"` //监控url -} - -type Remote struct { - Obs struct { - ObsURL string `json:"obsUrl"` - } `json:"obs"` -} - -type RemoteConstraints struct { - DataType string `json:"dataType"` - Attributes struct { - DataFormat []string `json:"dataFormat"` - DataSegmentation []string `json:"dataSegmentation"` - DatasetType []string `json:"datasetType"` - IsFree string `json:"isFree"` - MaxFreeJobCount string `json:"maxFreeJobCount"` - } `json:"attributes,omitempty"` -} - -type RemoteOut struct { - Obs struct { - ObsUrl string `json:"obsUrl,optional"` - } `json:"obs,optional"` -} - -type RemoteTra struct { - DatasetIn struct { - Id string `json:"id,optional"` - Name string `json:"name,optional"` - VersionName string `json:"versionName,optional"` - VersionId string `json:"versionId,optional"` - } `json:"dataSet,optional"` -} - -type RemoveSecurityGroup struct { - Name string `json:"name" copier:"Name"` -} - -type Replica struct { - ClusterName string `json:"clusterName"` - Replica int32 `json:"replica"` -} - -type Rescue struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` - RescueImageRef string `json:"rescue_image_ref" copier:"RescueImageRef"` -} - -type RescueServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `form:"platform,optional"` - Rescue struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` - RescueImageRef string `json:"rescue_image_ref" copier:"RescueImageRef"` - } `json:"rescue" copier:"Rescue"` -} - -type RescueServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type Resize struct { - FlavorRef string `json:"flavorRef" copier:"flavorRef"` -} - -type ResizeServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `json:"platform,optional"` - Resize struct { - FlavorRef string `json:"flavorRef" copier:"flavorRef"` - } `json:"resize" copier:"Resize"` -} - -type ResizeServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type Resource struct { - Policy string `json:"policy,optional"` - FlavorId string `json:"flavorId,optional"` - FlavorName string `json:"flavorName,optional"` - NodeCount int32 `json:"nodeCount,optional"` - FlavorDetail struct { - FlavorType string `json:"flavorType"` - Billing Billing `json:"billing"` - Attributes Attributes `json:"attributes"` - FlavorInfo FlavorInfo `json:"flavorInfo"` - } `json:"flavorDetail,optional"` -} - -type ResourceCreateTraining struct { - FlavorId string `json:"flavorId,optional"` - NodeCount int32 `json:"nodeCount,optional"` - Policy string `json:"policy,optional"` - FlavorLabel string `json:"flavorLabel,optional"` -} - -type ResourcePanelConfigReq struct { - Id int64 `json:"id"` //id - Title string `json:"title"` //标题 - TitleColor string `json:"titleColor"` //标题色 - MainColor string `json:"mainColor"` //主色调 - MainColor2 string `json:"mainColor2"` //次主色调 - TextColor string `json:"textColor"` //文字颜色 - BackgroundColor string `json:"backgroundColor"` //背景底色 - Center string `json:"center"` //中心点 - CenterPosition string `json:"centerPosition"` //comment 中心点坐标 - ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色 - StatusIng string `json:"statusIng"` //接入中图标 - StatusUn string `json:"statusUn"` //未接入图标 - StatusEnd string `json:"statusEnd"` //已接入图标 - TitleIcon string `json:"titleIcon"` //标题底图 - SubTitleIcon string `json:"subTitleIcon"` //小标题底图 - NumberBg string `json:"numberBg"` //数字底图 - TaskBg string `json:"taskBg"` //任务底图 -} - -type ResourcePanelConfigResp struct { - Id int64 `json:"id"` //id - Title string `json:"title"` //标题, - TitleColor string `json:"titleColor"` //标题色, - MainColor string `json:"mainColor"` //主色调, - MainColor2 string `json:"mainColor2"` //次主色调, - TextColor string `json:"textColor"` //文字颜色, - BackgroundColor string `json:"backgroundColor"` //背景底色, - Center string `json:"center"` //中心点, - CenterPosition string `json:"centerPosition"` //comment 中心点坐标, - ProvinceBgColor string `json:"provinceBgColor"` //三级地图底色, - StatusIng string `json:"statusIng"` //接入中图标, - StatusUn string `json:"statusUn"` //未接入图标, - StatusEnd string `json:"statusEnd"` //已接入图标, - TitleIcon string `json:"titleIcon"` //标题底图, - SubTitleIcon string `json:"subTitleIcon"` //小标题底图, - NumberBg string `json:"numberBg"` //数字底图, - TaskBg string `json:"taskBg"` //任务底图, - CreateTime string `json:"createTime"` //创建时间, - UpdateTime string `json:"updateTime"` //更新时间 -} - -type ResourceRequirements struct { - Key string `json:"key,optional"` - Value []string `json:"value,optional"` - Operator string `json:"operator,optional"` -} - -type ResourceSpecSl struct { - ParticipantId int64 `json:"participantId"` - ParticipantName string `json:"participantName"` - SpecName string `json:"specName"` - SpecId string `json:"specId"` - SpecPrice float64 `json:"specPrice"` -} - -type ResourceStats struct { - ClusterId int64 `json:"clusterId"` - Name string `json:"name"` - CpuCoreAvail int64 `json:"cpuCoreAvail"` - CpuCoreTotal int64 `json:"cpuCoreTotal"` - MemAvail float64 `json:"memAvail"` - MemTotal float64 `json:"memTotal"` - DiskAvail float64 `json:"diskAvail"` - DiskTotal float64 `json:"diskTotal"` - GpuAvail int64 `json:"gpuAvail"` - CardsAvail []*Card `json:"cardsAvail"` - CpuCoreHours float64 `json:"cpuCoreHours"` - Balance float64 `json:"balance"` -} - -type RewardAttrs struct { - Name string `json:"name,optional"` - Mode string `json:"mode,optional"` - Regex string `json:"regex,optional"` -} - -type Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info struct { - Enable_snat string `json:"enable_snat,optional" copier:"enable_snat"` - External_fixed_ips []External_fixed_ips `json:"external_fixed_ips,optional" copier:"external_fixed_ips"` - Platform string `json:"platform,optional" copier:"platform"` - } `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers struct { - Protocol string `json:"protocol,optional" copier:"protocol"` - Helper string `json:"helper,optional" copier:"helper"` - Port uint32 `json:"port,optional" copier:"port"` - } `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` -} - -type Routers struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed string `json:"distributed,optional" copier:"distributed"` - External_gateway_info struct { - Enable_snat string `json:"enable_snat,optional" copier:"enable_snat"` - External_fixed_ips []External_fixed_ips `json:"external_fixed_ips,optional" copier:"external_fixed_ips"` - Platform string `json:"platform,optional" copier:"platform"` - } `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id bool `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Routes []Routes `json:"routes,optional" copier:"routes"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers struct { - Protocol string `json:"protocol,optional" copier:"protocol"` - Helper string `json:"helper,optional" copier:"helper"` - Port uint32 `json:"port,optional" copier:"port"` - } `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` -} - -type Routes struct { - Ip_address string `json:"ip_address,optional" copier:"ip_address"` - Nexthop string `json:"nexthop,optional" copier:"nexthop"` -} - -type Schedule struct { - Type_schedule string `json:"type"` - Time_unit string `json:"timeUnit"` - Duration int32 `json:"duration"` -} - -type ScheduleOverviewResp struct { -} - -type ScheduleReq struct { - AiOption *AiOption `json:"aiOption,optional"` -} - -type ScheduleResp struct { - Results []*ScheduleResult `json:"results"` -} - -type ScheduleResult struct { - ClusterId string `json:"clusterId"` - TaskId string `json:"taskId"` - Card string `json:"card"` - Strategy string `json:"strategy"` - JobId string `json:"jobId"` - Replica int32 `json:"replica"` - Msg string `json:"msg"` -} - -type ScheduleVmResult struct { - ClusterId string `json:"clusterId"` - TaskId string `json:"taskId"` - Strategy string `json:"strategy"` - Replica int32 `json:"replica"` - Msg string `json:"msg"` -} - -type Scheduler struct { - Duration int32 `json:"duration,optional" copier:"Duration"` - TimeUnit string `json:"timeUnit,optional" copier:"TimeUnit"` - Type string `json:"type,optional" copier:"Type"` -} - -type ScreenChartResp struct { - ComputingPower []int `json:"computingPower"` - CpuAvg []int `json:"cpuAvg"` - CpuLoad []int `json:"cpuLoad"` - MemoryLoad []int `json:"memoryLoad"` - MemoryAvg []int `json:"memoryAvg"` - CenterName string `json:"centerName"` -} - -type ScreenInfoResp struct { - StorageUsed float32 `json:"storageUsed"` - StorageUsing float32 `json:"storageUsing"` - UsageRate float32 `json:"usageRate"` - UsingRate float32 `json:"usingRate"` - ApiDelay string `json:"apiDelay"` - SchedulerTimes int `json:"schedulerTimes"` - SchedulerErr int `json:"schedulerErr"` - ApiTimes string `json:"apiTimes"` - CenterCount int `json:"centerCount"` - ComputingPower float64 `json:"computingPower"` - ClusterCount int `json:"clusterCount"` - RunningCount int `json:"runningCount"` - CardCount int `json:"cardCount"` - RunningTime int `json:"runningTime"` -} - -type SearchCondition struct { - Coefficient string `json:"coefficient,optional" copier:"Coefficient"` - FrameInVideo int64 `json:"frameInVideo,optional" copier:"FrameInVideo"` - Hard string `json:"hard,optional" copier:"Hard"` - Kvp string `json:"kvp,optional" copier:"Kvp"` - ImportOrigin string `json:"importOrigin,optional" copier:"ImportOrigin"` - LabelList struct { - Labels []SearchLabel `json:"labels,optional" copier:"Labels"` - Op string `json:"op,optional" copier:"Op"` - } `json:"labelList,optional" copier:"LabelList"` - Labeler string `json:"labeler,optional" copier:"Labeler"` - ParentSampleId string `json:"parentSampleId,optional" copier:"ParentSampleId"` - Metadata struct { - Op string `json:"op,optional" copier:"Op"` - } `json:"metadata,optional" copier:"Metadata"` - SampleDir string `json:"sampleDir,optional" copier:"SampleDir"` - SampleName string `json:"sampleName,optional" copier:"SampleName"` - SampleTime string `json:"sampleTime,optional" copier:"SampleTime"` - Score string `json:"score,optional" copier:"Score"` - SliceThickness string `json:"sliceThickness,optional" copier:"SliceThickness"` - StudyDate string `json:"StudyDate,optional" copier:"StudyDate"` - TimeInVideo string `json:"timeInVideo,optional" copier:"TimeInVideo"` -} - -type SearchLabel struct { - Name string `json:"name,optional" copier:"Name"` - Op string `json:"op,optional" copier:"Op"` - Type int64 `json:"type,optional" copier:"Type"` -} - -type SearchLabels struct { - Labels []SearchLabel `json:"labels,optional" copier:"Labels"` - Op string `json:"op,optional" copier:"Op"` -} - -type SearchParams struct { - Name string `json:"name,optional"` - ParamType string `json:"paramType,optional"` - LowerBound string `json:"lowerBound,optional"` - UpperBound string `json:"upperBound,optional"` - DiscretePointsNum string `json:"discretePointsNum,optional"` - DiscreteValues []string `json:"discreteValues,optional"` -} - -type SearchProp struct { - Op string `json:"op,optional" copier:"Op"` -} - -type Security_group struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` - Security_group_rules []Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` -} - -type Security_group_rule struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` -} - -type Security_group_rules struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` -} - -type Security_groups struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` -} - -type Security_groups_server struct { - Name string `json:"name" copier:"Name"` -} - -type Server struct { - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - Description string `json:"description,optional" copier:"Description"` - ImageRef string `json:"imageRef,optional" copier:"ImageRef"` - Networks []CreNetwork `json:"networks,optional" copier:"Networks"` - BlockDeviceMappingV2 []Block_device_mapping_v2 `json:"block_device_mapping_v2,optional" copier:"BlockDeviceMappingV2"` - MinCount int32 `json:"min_count,optional" copier:"MinCount"` -} - -type ServerResp struct { - Id string `json:"id" copier:"Id"` - Links []Links `json:"links" copier:"Links"` - OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` - SecurityGroups []Security_groups_server `json:"security_groups" copier:"SecurityGroups"` - AdminPass string `json:"adminPass" copier:"AdminPass"` -} - -type ServerUpdate struct { - Server struct { - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - Description string `json:"description,optional" copier:"Description"` - ImageRef string `json:"imageRef,optional" copier:"ImageRef"` - Networks []CreNetwork `json:"networks,optional" copier:"Networks"` - BlockDeviceMappingV2 []Block_device_mapping_v2 `json:"block_device_mapping_v2,optional" copier:"BlockDeviceMappingV2"` - MinCount int32 `json:"min_count,optional" copier:"MinCount"` - } `json:"server" copier:"Server"` -} - -type Servers struct { - Id string `json:"id" copier:"Id"` - Name string `json:"name" copier:"Name"` - Links []Links `json:"links " copier:"Links "` -} - -type ServersDetaileResp struct { - AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` - AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` - Addresses struct { - Private Private `json:"private" copier:"private"` - } `json:"addresses" copier:"Addresses"` - Name string `json:"name" copier:"Name"` - ConfigDrive string `json:"config_drive" copier:"ConfigDrive"` - Created string `json:"created" copier:"Created"` - Flavor struct { - Id string `json:"id" copier:"Id"` - Links string `json:"links" copier:"Links"` - Vcpus string `json:"vcpus" copier:"Vcpus"` - Ram uint32 `json:"ram" copier:"Ram"` - Disk uint32 `json:"ram" copier:"Disk"` - Dphemeral uint32 `json:"ephemeral" copier:"Dphemeral"` - Swap uint32 `json:"swap" copier:"Swap"` - OriginalName string `json:"OriginalName" copier:"OriginalName"` - ExtraSpecs ExtraSpecs `json:"Extra_specs" copier:"ExtraSpecs"` - } `json:"flavor" copier:"Flavor"` - HostId string `json:"hostId" copier:"HostId"` - Id string `json:"id" copier:"Id"` - Image struct { - Id string `json:"id " copier:"Id"` - Links []Links `json:"links" copier:"Links"` - } `json:"image" copier:"Image"` - KeyName string `json:"key_name" copier:"KeyName"` - Links1 []Links1 `json:"links" copier:"Links1"` - Metadata MetadataDetailed `json:"metadata" copier:"Metadata"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` - Fault struct { - Code uint32 `json:"code " copier:"Code"` - Created string `json:"created " copier:"Created"` - Message string `json:"message " copier:"Message"` - Details string `json:"details " copier:"Details"` - } `json:"fault" copier:"Fault"` - Progress uint32 `json:"progress" copier:"Progress"` - Locked bool `json:"locked" copier:"Locked"` - HostStatus string `json:"host_status" copier:"HostStatus"` - Description string `json:"description" copier:"Description"` - Tags []string `json:"tags" copier:"Tags"` - TrustedImageCertificates string `json:"trusted_image_certificates" copier:"TrustedImageCertificates"` - ServerGroups string `json:"server_groups" copier:"ServerGroups"` - LockedReason string `json:"locked_reason" copier:"LockedReason"` - SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"` -} - -type ServersDetailed struct { - Id string `json:"id" copier:"Id"` - Name string `json:"name" copier:"Name"` - OSTaskState uint32 `json:"os_task_state" copier:"OSTaskState"` - Status string `json:"status" copier:"Status"` - VmState string `json:"vm_state" copier:"VmState"` - OS_EXT_SRV_ATTR_Instance_Name string `json:"os_ext_srv_attr_instance_name" copier:"OS_EXT_SRV_ATTR_Instance_Name"` - Created string `json:"created" copier:"Created"` - HostId string `json:"hostId" copier:"HostId"` - Ip string `json:"ip" copier:"Ip"` - Image string `json:"image" copier:"Image"` - Updated string `json:"updated" copier:"Updated"` - Flavor string `json:"flavor" copier:"Flavor"` - Key_name string `json:"key_name" copier:"Key_name"` - Survival_time int32 `json:"survival_time" copier:"Survival_time"` -} - -type Servers_links struct { - Href string `json:"href " copier:"Href"` - Rel string `json:"rel" copier:"Rel"` -} - -type ServiceConfig struct { - CustomSpec struct { - GpuP4 float64 `json:"gpuP4,optional" copier:"GpuP4"` - Memory int64 `json:"memory,optional" copier:"Memory"` - Cpu float64 `json:"cpu,optional" copier:"Cpu"` - AscendA310 int64 `json:"ascendA310,optional" copier:"AscendA310"` - } `json:"customSpec,optional" copier:"CustomSpec"` - Envs map[string]string `json:"envs,optional" copier:"Envs"` - Specification string `json:"specification,optional" copier:"Specification"` - Weight int32 `json:"weight,optional" copier:"Weight"` - ModelId string `json:"modelId,optional" copier:"ModelId"` - SrcPath string `json:"srcPath,optional" copier:"SrcPath"` - ReqUri string `json:"reqUri,optional" copier:"ReqUri"` - MappingType string `json:"mappingType,optional" copier:"MappingType"` - ClusterId string `json:"clusterId,optional" copier:"ClusterId"` - Nodes []string `json:"nodes,optional" copier:"Nodes"` - SrcType string `json:"srcType,optional" copier:"SrcType"` - DestPath string `json:"destPath,optional" copier:"DestPath"` - InstanceCount int32 `json:"instanceCount,optional" copier:"InstanceCount"` -} - -type ShareInfo struct { -} - -type ShelveServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Shelve_action string `json:"shelve_action" copier:"shelve_action"` - Platform string `form:"platform,optional"` -} - -type ShelveServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type ShowAlgorithmByUuidReq struct { - ProjectId string `path:"projectId" copier:"ProjectId"` - AlgorithmId string `path:"algorithmId" copier:"AlgorithmId"` - ModelArtsType string `form:"modelartsType,optional"` -} - -type ShowAlgorithmByUuidResp struct { - Metadata *MetadataAlRq `json:"metadata,omitempty" copier:"Metadata"` - JobConfig *JobConfigAl `json:"jobConfig,omitempty" copier:"JobConfig"` - ResourceRequirements []*ResourceRequirements `json:"resourceRequirements,omitempty" copier:"ResourceRequirements"` - AdvancedConfig *AdvancedConfigAl `json:"advancedConfig,omitempty" copier:"AdvancedConfig"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type ShowFirewallGroupDetailsReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` -} - -type ShowFirewallGroupDetailsResp struct { - Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_group,optional" copier:"firewall_group"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowFirewallPolicyDetailsReq struct { - Platform string `json:"platform,optional" copier:"Platform"` - Firewall_policy_id string `json:"firewall_policy_id,optional" copier:"firewall_policy_id"` -} - -type ShowFirewallPolicyDetailsResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Firewall_policy struct { - Name string `json:"name,optional" copier:"name"` - Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` - Audited bool `json:"audited,optional" copier:"audited"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_policy,optional" copier:"firewall_policy"` -} - -type ShowFirewallRuleDetailsReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` -} - -type ShowFirewallRuleDetailsResp struct { - Firewall_rule struct { - Action string `json:"action,optional" copier:"action"` - Description string `json:"description,optional" copier:"description"` - Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` - Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` - Destination_port string `json:"destination_port,optional" copier:"destination_port"` - Enabled bool `json:"enabled,optional" copier:"enabled"` - Id string `json:"id,optional" copier:"id"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Shared bool `json:"shared,optional" copier:"shared"` - Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` - Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` - Source_port string `json:"source_port,optional" copier:"source_port"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_rule,optional" copier:"firewall_rule"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowFloatingIPDetailsReq struct { - Platform string `json:"platform,optional" copier:"Platform"` - Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` -} - -type ShowFloatingIPDetailsResp struct { - Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details Port_details `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - } `json:"floatingip,omitempty" copier:"floatingip"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowNetworkDetailsReq struct { - NetworkId string `form:"network_id" copier:"NetworkId"` - Platform string `form:"platform,optional"` -} - -type ShowNetworkDetailsResp struct { - Network struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id" copier:"Id,optional"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu" copier:"Mtu"` - Name string `json:"name" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number" copier:"RevisionNumber"` - Shared bool `json:"shared" copier:"Shared"` - Status string `json:"status" copier:"Status"` - Subnets []string `json:"subnets" copier:"Subnets"` - TenantId string `json:"tenant_id" copier:"TenantId"` - VlanTransparent bool `json:"vlan_transparent" copier:"VlanTransparent"` - Description string `json:"description" copier:"Description"` - IsDefault bool `json:"is_default" copier:"IsDefault"` - Tags []string `json:"tags" copier:"Tags"` - } `json:"network" copier:"Network"` - Msg string `json:"msg" copier:"Msg"` - Code int32 `json:"code" copier:"Code"` - ErrorMsg string `json:"error_msg" copier:"ErrorMsg"` -} - -type ShowNetworkSegmentRangeDetailsReq struct { - Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type ShowNetworkSegmentRangeDetailsResp struct { - NetworkSegmentRange struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - } `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowNodeDetailsReq struct { - NodeIdent string `json:"node_ident" copier:"NodeIdent"` - Fields []Fields `json:"fields" copier:"Fields"` - Platform string `json:"platform,optional"` -} - -type ShowNodeDetailsResp struct { - AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"` - Name string `json:"name" copier:"name"` - PowerState string `json:"power_state" copier:"PowerState"` - TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"` - ProvisionState string `json:"provision_state" copier:"ProvisionState"` - TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"` - Maintenance bool `json:"maintenance" copier:"Maintenance"` - MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"` - Fault string `json:"fault" copier:"Fault"` - LastError string `json:"last_error" copier:"LastError"` - Reservation string `json:"reservation" copier:"Reservation"` - Driver string `json:"driver" copier:"Driver"` - DriverInfo struct { - Ipmi_password string `json:"ipmi_password" copier:"ipmi_password"` - Ipmi_username string `json:"ipmi_username" copier:"ipmi_username"` - } `json:"driver_info" copier:"DriverInfo"` - DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"` - Properties Properties `json:"properties" copier:"Properties"` - InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"` - InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` - ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` - Extra Extra `json:"extra" copier:"Extra"` - ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"` - RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"` - TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"` - CleanStep CleanStep `json:"clean_step" copier:"CleanStep"` - DeployStep DeployStep `json:"clean_step" copier:"DeployStep"` - Links []Links `json:"links" copier:"Links"` - Ports []Ports `json:"ports" copier:"Ports"` - Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"` - States []States `json:"states" copier:"States"` - ResourceClass string `json:"resource_class" copier:"ResourceClass"` - BootInterface string `json:"boot_interface" copier:"BootInterface"` - ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` - DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` - ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` - InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` - ManagementInterface string `json:"management_interface" copier:"ManagementInterface"` - NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` - PowerInterface string `json:"power_interface" copier:"PowerInterface"` - RaidInterface string `json:"raid_interface" copier:"RaidInterface"` - RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` - StorageInterface string `json:"storage_interface" copier:"StorageInterface"` - Traits []string `json:"traits" copier:"Traits"` - Volume []VolumeNode `json:"volume" copier:"Volume"` - Protected bool `json:"protected" copier:"Protected"` - ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` - Conductor string `json:"conductor" copier:"Conductor"` - Owner string `json:"owner" copier:"Owner"` - Lessee string `json:"lessee" copier:"Lessee"` - Shard string `json:"shard" copier:"Shard"` - Description string `json:"description" copier:"Description"` - AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"` - BiosInterface string `json:"bios_interface" copier:"BiosInterface"` - NetworkData NetworkData `json:"network_data" copier:"NetworkData"` - Retired bool `json:"retired" copier:"Retired"` - RetiredReason string `json:"retired_reason" copier:"RetiredReason"` - CreatedAt string `json:"created_at" copier:"CreatedAt"` - InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"` - InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"` - UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` - Uuid string `json:"uuid" copier:"uuid"` - ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type ShowPortDetailsReq struct { - Port_id string `json:"port_id,optional" copier:"port_id"` - Fields string `json:"fields,optional" copier:"fields"` - Platform string `form:"platform,optional" copier:"platform"` -} - -type ShowPortDetailsResp struct { - Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - } `json:"port,optional" copier:"port"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowRouterDetailsReq struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Platform string `form:"platform,optional" copier:"Platform"` -} - -type ShowRouterDetailsResp struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type ShowSecurityGroupReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Fields string `json:"fields,optional" copier:"fields"` - Verbose string `json:"verbose,optional" copier:"verbose"` -} - -type ShowSecurityGroupResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` - Security_group_rules []Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` - } `json:"security_group,optional" copier:"security_group"` -} - -type ShowSecurityGroupRuleReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"` -} - -type ShowSecurityGroupRuleResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group_rule struct { - Direction string `json:"direction,optional" copier:"direction"` - Ethertype string `json:"ethertype,optional" copier:"ethertype"` - Id string `json:"id,optional" copier:"id"` - Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` - Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` - Protocol string `json:"protocol,optional" copier:"protocol"` - Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` - Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` - } `json:"security_group_rule,optional" copier:"security_group_rule"` -} - type ShowServiceReq struct { ProjectId string `path:"projectId"` ServiceId string `path:"serviceId"` @@ -6308,64 +2142,375 @@ type ShowServiceResp struct { ErrorMsg string `json:"ErrorMsg,omitempty"` } -type Spec struct { - Resource struct { - Policy string `json:"policy,optional"` - FlavorId string `json:"flavorId,optional"` - FlavorName string `json:"flavorName,optional"` - NodeCount int32 `json:"nodeCount,optional"` - FlavorDetail FlavorDetail `json:"flavorDetail,optional"` - } `json:"resource"` - LogExportPath struct { - ObsUrl string `json:"obsUrl,optional"` - HostPath string `json:"hostPath,optional"` - } `json:"logExportPath"` - IsHostedLog bool `json:"isHostedLog"` +type QueryServiceConfig struct { + ModelVersion string `json:"modelVersion,omitempty" copier:"ModelVersion"` + FinishedTime string `json:"finishedTime,omitempty" copier:"FinishedTime"` + CustomSpec *CustomSpec `json:"CustomSpec,omitempty" copier:"CustomSpec"` + Envs map[string]string `json:"envs,omitempty" copier:"Envs"` + Specification string `json:"specification,omitempty" copier:"Specification"` + Weight int32 `json:"weight,omitempty" copier:"Weight"` + ModelId string `json:"modelId,omitempty" copier:"ModelId"` + SrcPath string `json:"srcPath,omitempty" copier:"SrcPath"` + ReqUri string `json:"reqUri,omitempty" copier:"ReqUri"` + MappingType string `json:"mappingType,omitempty" copier:"MappingType"` + StartTime string `json:"startTime,omitempty" copier:"StartTime"` + ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` + Nodes []string `json:"nodes,omitempty" copier:"Nodes"` + MappingRule string `json:"mappingRule,omitempty" copier:"MappingRule"` + ModelName string `json:"modelName,omitempty" copier:"ModelName"` + SrcType string `json:"srcType,omitempty" copier:"SrcType"` + DestPath string `json:"destPath,omitempty" copier:"DestPath"` + InstanceCount int32 `json:"instanceCount,omitempty" copier:"InstanceCount"` + Status string `json:"status,omitempty" copier:"Status"` + Scaling bool `json:"scaling,omitempty" copier:"Scaling"` + SupportDebug bool `json:"supportDebug,omitempty" copier:"SupportDebug"` + AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` } -type SpecCtRp struct { - Resource struct { - FlavorId string `json:"flavorId,optional"` - NodeCount int32 `json:"nodeCount,optional"` - Policy string `json:"policy,optional"` - FlavorLabel string `json:"flavorLabel,optional"` - } `json:"resource,optional"` - Volumes []Volumes `json:"volumes,optional"` - LogExportPath struct { - ObsUrl string `json:"obsUrl,optional"` - HostPath string `json:"hostPath,optional"` - } `json:"logExportPath,optional"` +type ListClustersReq struct { + ProjectId string `json:"projectId" copier:"ProjectId"` + ClusterName string `json:"clusterName,optional" copier:"ClusterName"` + Offset int64 `form:"offset,optional"` + Limit int64 `form:"limit,optional"` + SortBy string `json:"sortBy,optional" copier:"SortBy"` + Order string `json:"order,optional" copier:"Order"` + ModelArtsType string `json:"modelartsType,optional"` } -type SpecsCtRq struct { - Resource struct { - FlavorId string `json:"flavorId,optional"` - NodeCount int32 `json:"nodeCount,optional"` - Policy string `json:"policy,optional"` - FlavorLabel string `json:"flavorLabel,optional"` - } `json:"resource,optional"` - Volumes []Volumes `json:"volumes,optional"` - LogExportPath struct { - ObsUrl string `json:"obsUrl,optional"` - HostPath string `json:"hostPath,optional"` - } `json:"logExportPath,optional"` +type ListClustersResp struct { + Resp200 ListClustersResp200 `json:"resp200,omitempty" copier:"Resp200"` + Resp400 ListClustersResp400 `json:"resp400,omitempty" copier:"Resp400"` } -type StartAllByDeployTaskIdReq struct { - Id string `json:"deployTaskId"` +type ListClustersResp200 struct { + Count int32 `json:"count,omitempty" copier:"Count"` + Clusters []Cluster `json:"clusters,omitempty" copier:"Clusters"` } -type StartAllByDeployTaskIdResp struct { +type ListClustersResp400 struct { + ErrorCode string `json:"errorCode,optional" copier:"ErrorCode"` + ErrorMsg string `json:"errorMsg,optional" copier:"ErrorMsg"` } -type StartDeployInstanceReq struct { - AdapterId string `form:"adapterId"` - ClusterId string `form:"clusterId"` - Id string `form:"id"` - InstanceId string `form:"instanceId"` +type ClusterNode struct { + Specification string `json:"specification,omitempty" copier:"Specification"` + Count int32 `json:"count,omitempty" copier:"Count"` + AvailableCount int32 `json:"availableCount,omitempty" copier:"AvailableCount"` } -type StartDeployInstanceResp struct { +type Cluster struct { + ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` + ClusterName string `json:"clusterName,omitempty" copier:"ClusterName"` + Description string `json:"description,omitempty" copier:"Description"` + Tenant string `json:"tenant,omitempty" copier:"Tenant"` + Project string `json:"project,omitempty" copier:"Project"` + Owner string `json:"owner,omitempty" copier:"Owner"` + CreatedAt int32 `json:"createdAt,omitempty" copier:"CreatedAt"` + Status string `json:"status,omitempty" copier:"Status"` + Nodes ClusterNode `json:"nodes,omitempty" copier:"Nodes"` + AllocatableCpuCores float64 `json:"allocatableCpuCores,omitempty" copier:"AllocatableCpuCores"` + AllocatableMemory int64 `json:"allocatableMemory,omitempty" copier:"AllocatableMemory"` + PeriodNum int32 `json:"periodNum,omitempty" copier:"PeriodNum"` + PeriodType string `json:"periodType,omitempty" copier:"PeriodType"` + OrderId string `json:"orderId,omitempty" copier:"OrderId"` +} + +type AlgorithmResponse struct { + MetadataAlRp MetadataAlRp `json:"metadata,optional"` + JobConfigAlRp JobConfigAlRp `json:"jobConfig,optional"` + ResourceRequirementsAlRp []ResourceRequirements `json:"resourceRequirements,optional"` + AdvancedConfigAlRp AdvancedConfigAl `json:"advancedConfig,optional"` +} + +type MetadataAlRp struct { + Id string `json:"id,optional"` + Name string `json:"name,optional"` + Description string `json:"description,optional"` + CreateTime uint64 `json:"createTime,optional"` + WorkspaceId string `json:"workspaceId,optional"` + AiProject string `json:"aiProject,optional"` + UserName string `json:"userName,optional"` + DomainId string `json:"domainId,optional"` + Source string `json:"source,optional"` + ApiVersion string `json:"apiVersion,optional"` + IsValid bool `json:"isValid,optional"` + State string `son:"state,optional"` + Size int32 `json:"size,optional"` + Tags []*TagsAlRp `json:"tags,optional"` + AttrList []string `json:"attrList,optional"` + VersionNum int32 `json:"versionNum,optional"` + UpdateTime uint64 `json:"updateTime,optional"` +} + +type TagsAlRp struct { + Tags map[string]string `json:"tags,optional"` +} + +type JobConfigAlRp struct { + CodeDir string `json:"codeDir,optional"` + BootFile string `json:"bootFile,optional"` + Command string `json:"command,optional"` + ParametersAlRq []ParametersAlRq `json:"parameters,optional"` + ParametersCustomization bool `json:"parametersCustomization,optional"` + InputsAlRq []InputsAlRq `json:"inputs,optional"` + OutputsAl []OutputsAl `json:"outputs,optional"` + EngineAlRq EngineAlRq `json:"engine,optional"` +} + +type ParametersAlRq struct { + Name string `json:"name,optional"` + Description string `json:"description,optional"` + I18NDescription I18NDescription `json:"i18nDescription,optional"` + Value string `json:"value,optional"` + Constraint ConstraintAlRq `json:"constraint,optional"` +} + +type I18NDescription struct { + Language string `json:"language,optional"` + Description string `json:"description,optional"` +} + +type ConstraintAlRq struct { + Type string `son:"type,optional"` + Editable bool `json:"editable,optional"` + Required bool `json:"required,optional"` + Sensitive bool `json:"sensitive,optional"` + ValidType string `json:"validType,optional"` + ValidRange []string `json:"validRange,optional"` +} + +type EngineAlRq struct { + EngineId string `json:"engineId,optional"` + EngineName string `json:"engineName,optional"` + EngineVersion string `json:"engineVersion,optional"` + ImageUrl string `json:"imageUrl,optional"` +} + +type InputsAlRq struct { + Name string `json:"name,optional"` + Description string `json:"description,optional"` + RemoteConstraints []RemoteConstraints `json:"remoteConstraints,optional"` +} + +type OutputsAl struct { + Name string `json:"name,optional"` + Description string `json:"description,optional"` +} + +type ResourceRequirements struct { + Key string `json:"key,optional"` + Value []string `json:"value,optional"` + Operator string `json:"operator,optional"` +} + +type AdvancedConfigAl struct { + AutoSearch AutoSearch `json:"autoSearch,optional"` +} + +type AutoSearch struct { + SkipSearchParams string `json:"skipSearchParams,optional"` + RewardAttrs []RewardAttrs `json:"rewardAttrs,optional"` + SearchParams []SearchParams `json:"searchParams,optional"` + AlgoConfigs []AlgoConfigs `json:"algoConfigs,optional"` +} + +type AlgoConfigs struct { + Name string `json:"name,optional"` + AutoSearchAlgoConfigParameterAlRp []AutoSearchAlgoConfigParameterAlRp `json:"params,optional"` +} + +type AutoSearchAlgoConfigParameterAlRp struct { + Key string `json:"key,optional"` + Value string `json:"value,optional"` + Type string `json:"type,optional"` +} + +type RewardAttrs struct { + Name string `json:"name,optional"` + Mode string `json:"mode,optional"` + Regex string `json:"regex,optional"` +} + +type SearchParams struct { + Name string `json:"name,optional"` + ParamType string `json:"paramType,optional"` + LowerBound string `json:"lowerBound,optional"` + UpperBound string `json:"upperBound,optional"` + DiscretePointsNum string `json:"discretePointsNum,optional"` + DiscreteValues []string `json:"discreteValues,optional"` +} + +type ListAlgorithmsReq struct { + ProjectId string `path:"projectId,optional"` + Offset int32 `form:"offset,optional"` + Limit int32 `form:"limit,optional"` + ModelArtsType string `form:"modelArtsType,optional"` +} + +type ListAlgorithmsResp struct { + Total int32 `json:"total,omitempty"` + Count int32 `json:"count,omitempty"` + Limit int32 `json:"limit,omitempty"` + SortBy string `json:"sortBy,omitempty"` + Order string `json:"order,omitempty"` + Items []*AlgorithmResponse `json:"items,omitempty"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type DeleteAlgorithmReq struct { + ProjectId string `path:"projectId" copier:"ProjectId"` + AlgorithmId string `path:"algorithmId" jcopier:"AlgorithmId"` + ModelArtsType string `form:"modelArtsType,optional"` +} + +type DeleteAlgorithmResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type ShowAlgorithmByUuidReq struct { + ProjectId string `path:"projectId" copier:"ProjectId"` + AlgorithmId string `path:"algorithmId" copier:"AlgorithmId"` + ModelArtsType string `form:"modelartsType,optional"` +} + +type ShowAlgorithmByUuidResp struct { + Metadata *MetadataAlRq `json:"metadata,omitempty" copier:"Metadata"` + JobConfig *JobConfigAl `json:"jobConfig,omitempty" copier:"JobConfig"` + ResourceRequirements []*ResourceRequirements `json:"resourceRequirements,omitempty" copier:"ResourceRequirements"` + AdvancedConfig *AdvancedConfigAl `json:"advancedConfig,omitempty" copier:"AdvancedConfig"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type MetadataAlRq struct { + Id string `json:"id,optional"` + Name string `json:"name,optional"` + Description string `json:"description,optional"` + WorkspaceId string `json:"workspaceId,optional"` + AiProject string `json:"aiProject,optional"` +} + +type JobConfigAl struct { + CodeDir string `json:"codeDir,optional"` + BootFile string `json:"bootFile,optional"` + Command string `json:"command,optional"` + Parameters []ParametersAlRq `json:"parameters,optional"` + ParametersCustomization bool `json:"parametersCustomization,optional"` + Inputs []InputsAlRq `json:"inputs,optional"` + Outputs []OutputsAl `json:"outputs,optional"` + Engine EngineAlRq `json:"engine,optional"` +} + +type ShareInfo struct { +} + +type CreateAlgorithmReq struct { + MetadataCARq *MetadataAlRq `json:"metadata,optional"` + JobConfigCARq *JobConfigAl `json:"jobConfig,optional"` + ResourceRequirementsCARq []*ResourceRequirements `json:"resourceRequirements,optional"` + AdvancedConfigCARq *AdvancedConfigAl `json:"advancedConfig,optional"` + ProjectIdCARq string `path:"projectId"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type CreateAlgorithmResp struct { + MetadataCARp *MetadataAlRp `json:"metadata,omitempty"` + Share_infoCARp *ShareInfo `json:"shareInfo,omitempty"` + JobConfigCARp *JobConfigAl `json:"jobConfig,omitempty"` + ResourceRequirementsCARp []*ResourceRequirements `json:"resourceRequirements,omitempty"` + AdvancedConfigCARp *AdvancedConfigAl `json:"advancedConfig,omitempty"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type DeleteDataSetReq struct { + DatasetId string `path:"datasetId"` + ProjectId string `path:"projectId"` + ModelArtsType string `form:"modelArtsType,optional"` +} + +type DeleteDataSetResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type ListNotebookReq struct { + ProjectId string `json:"projectId" copier:"ProjectId"` + Param ListNotebookParam `json:"param,optional" copier:"Param"` + Platform string `json:"platform,optional"` +} + +type ListNotebookResp struct { + Current int32 `json:"current,omitempty" copier:"Current"` + Data []NotebookResp `json:"data" copier:"Data"` + Pages int32 `json:"pages,omitempty" copier:"Pages"` + Size int32 `json:"size,omitempty" copier:"Size"` + Total int64 `json:"total" copier:"Total"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ListNotebookParam struct { + Feature string `json:"feature,optional" copier:"Feature"` + Limit int32 `json:"limit,optional" copier:"Limit"` + Name string `json:"name,optional" copier:"Name"` + PoolId string `json:"poolId,optional" copier:"PoolId"` + Offset int32 `json:"offset,optional" copier:"Offset"` + Owner string `json:"owner,optional" copier:"Owner"` + SortDir string `json:"sortDir,optional" copier:"SortDir"` + SortKey string `json:"sortKey,optional" copier:"SortKey"` + Status string `json:"status,optional" copier:"Status"` + WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` +} + +type CreateNotebookReq struct { + ProjectId string `json:"projectId" copier:"ProjectId"` + Param CreateNotebookParam `json:"param" copier:"Param"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type CreateNotebookResp struct { + NotebookResp *NotebookResp `json:"notebookResp,omitempty" copier:"NotebookResp"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type CreateNotebookParam struct { + Description string `json:"description,optional" copier:"Description"` + Duration int64 `json:"duration,optional" copier:"Duration"` + Endpoints []EndpointsReq `json:"endpoints,optional" copier:"Endpoints"` + Feature string `json:"feature,optional" copier:"Feature"` + Flavor string `json:"flavor" copier:"Flavor"` + ImageId string `json:"imageId" copier:"ImageId"` + Name string `json:"name" copier:"Name"` + PoolId string `json:"poolId,optional" copier:"PoolId"` + Volume VolumeReq `json:"volume" copier:"Volume"` + WorkspaceId string `json:"workspaceId,optional" copier:"WorkspaceId"` + Hooks CustomHooks `json:"hooks" copier:"Hooks"` + Lease LeaseReq `json:"lease,optional" copier:"Lease"` +} + +type StartNotebookReq struct { + Id string `json:"id" copier:"Id"` + ProjectId string `json:"projectId" copier:"ProjectId"` + Param StartNotebookParam `json:"param" copier:"Param"` + Platform string `json:"platform,optional"` +} + +type StartNotebookResp struct { + NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` } type StartNotebookParam struct { @@ -6373,91 +2518,6 @@ type StartNotebookParam struct { TypeStartNotebook string `json:"type" copier:"TypeStartNotebook"` } -type StartNotebookReq struct { - Id string `json:"id" copier:"Id"` - ProjectId string `json:"projectId" copier:"ProjectId"` - Param struct { - Duration int64 `json:"duration" copier:"Duration"` - TypeStartNotebook string `json:"type" copier:"TypeStartNotebook"` - } `json:"param" copier:"Param"` - Platform string `json:"platform,optional"` -} - -type StartNotebookResp struct { - NotebookResp struct { - ActionProgress []ActionProgress `json:"actionProgress,omitempty" copier:"ActionProgress"` - Description string `json:"description,omitempty" copier:"Description"` - Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"` - FailReason string `json:"failReason,omitempty" copier:"FailReason"` - Flavor string `json:"flavor,omitempty" copier:"Flavor"` - Id string `json:"id,omitempty" copier:"Id"` - Image Image `json:"image,omitempty" copier:"Image"` - Lease Lease `json:"lease,omitempty" copier:"Lease"` - Name string `json:"name,omitempty" copier:"Name"` - Pool Pool `json:"pool,omitempty" copier:"Pool"` - Status string `json:"status,omitempty" copier:"Status"` - Token string `json:"token,omitempty" copier:"Token"` - Url string `json:"url,omitempty" copier:"Url"` - Volume VolumeRes `json:"volume,omitempty" copier:"Volume"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - Feature string `json:"feature,omitempty" copier:"Feature"` - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` // * - Hooks Hooks `json:"hooks,omitempty" copier:"Hooks"` // * - Tags []string `json:"tags,omitempty" copier:"Tags"` // * - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` // * - UserNotebookResp UserNotebookResp `json:"user,omitempty" copier:"UserNotebookResp"` // * - UserId string `json:"userId,omitempty" copier:"UserId"` // * - BillingItems []string `json:"billingItems,omitempty" copier:"BillingItems"` // * - } `json:"notebookResp" copier:"NotebookResp"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type StartServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"action,optional" copier:"Action"` - Start_action string `json:"start_action" copier:"start_action"` - Platform string `form:"platform,optional"` -} - -type StartServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type States struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` -} - -type Status struct { - Phase string `json:"phase"` - SecondaryPhase string `json:"secondaryPhase"` - Duration int32 `json:"duration"` - Tasks []string `json:"tasks"` - StartTime uint64 `json:"startTime"` - TaskStatuses []*TaskStatuses `json:"taskStatuses,omitempty"` -} - -type StopAllByDeployTaskIdReq struct { - Id string `json:"deployTaskId"` -} - -type StopAllByDeployTaskIdResp struct { -} - -type StopDeployInstanceReq struct { - AdapterId string `form:"adapterId"` - ClusterId string `form:"clusterId"` - Id string `form:"id"` - InstanceId string `form:"instanceId"` -} - -type StopDeployInstanceResp struct { -} - type StopNotebookReq struct { Id string `json:"id" copier:"Id"` ProjectId string `json:"projectId" copier:"ProjectId"` @@ -6465,47 +2525,472 @@ type StopNotebookReq struct { } type StopNotebookResp struct { - NotebookResp struct { - ActionProgress []ActionProgress `json:"actionProgress,omitempty" copier:"ActionProgress"` - Description string `json:"description,omitempty" copier:"Description"` - Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"` - FailReason string `json:"failReason,omitempty" copier:"FailReason"` - Flavor string `json:"flavor,omitempty" copier:"Flavor"` - Id string `json:"id,omitempty" copier:"Id"` - Image Image `json:"image,omitempty" copier:"Image"` - Lease Lease `json:"lease,omitempty" copier:"Lease"` - Name string `json:"name,omitempty" copier:"Name"` - Pool Pool `json:"pool,omitempty" copier:"Pool"` - Status string `json:"status,omitempty" copier:"Status"` - Token string `json:"token,omitempty" copier:"Token"` - Url string `json:"url,omitempty" copier:"Url"` - Volume VolumeRes `json:"volume,omitempty" copier:"Volume"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - Feature string `json:"feature,omitempty" copier:"Feature"` - CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` // * - Hooks Hooks `json:"hooks,omitempty" copier:"Hooks"` // * - Tags []string `json:"tags,omitempty" copier:"Tags"` // * - UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` // * - UserNotebookResp UserNotebookResp `json:"user,omitempty" copier:"UserNotebookResp"` // * - UserId string `json:"userId,omitempty" copier:"UserId"` // * - BillingItems []string `json:"billingItems,omitempty" copier:"BillingItems"` // * - } `json:"notebookResp" copier:"NotebookResp"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` + NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` } -type StopServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"action,optional" copier:"Action"` - Stop_action string `json:"stop_action" copier:"stop_action"` - Platform string `form:"platform,optional"` +type GetNotebookStorageReq struct { + InstanceId string `json:"instanceId" copier:"InstanceId"` + ProjectId string `json:"projectId" copier:"ProjectId"` + ModelArtsType string `json:"modelArtsType,optional"` } -type StopServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` +type GetNotebookStorageResp struct { + Current int32 `json:"current" copier:"Current"` + Data []DataVolumesRes `json:"data" copier:"Data"` + Pages int32 `json:"pages" copier:"Pages"` + Size int32 `json:"size" copier:"Size"` + Total int64 `json:"total" copier:"Total"` +} + +type MountNotebookStorageReq struct { + InstanceId string `json:"instanceId" copier:"InstanceId"` + ProjectId string `json:"projectId" copier:"ProjectId"` + Param MountNotebookStorageParam `json:"param" copier:"Param"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type MountNotebookStorageResp struct { + Category string `json:"category" copier:"Category"` + Id string `json:"id" copier:"Id"` + MountPath string `json:"mountPath" copier:"MountPath"` + Status string `json:"status" copier:"Status"` + Uri string `json:"uri" copier:"Uri"` +} + +type MountNotebookStorageParam struct { + Category string `json:"category" copier:"Category"` + MountPath string `json:"mountPath" copier:"MountPath"` + Uri string `json:"uri" copier:"Uri"` +} + +type DataVolumesRes struct { + Category string `json:"category" copier:"Category"` + Id string `json:"id" copier:"Id"` + MountPath string `json:"mountPath" copier:"MountPath"` + Status string `json:"status" copier:"Status"` + Uri string `json:"uri" copier:"Uri"` +} + +type NotebookResp struct { + ActionProgress []ActionProgress `json:"actionProgress,omitempty" copier:"ActionProgress"` + Description string `json:"description,omitempty" copier:"Description"` + Endpoints []EndpointsRes `json:"endpoints,omitempty" copier:"Endpoints"` + FailReason string `json:"failReason,omitempty" copier:"FailReason"` + Flavor string `json:"flavor,omitempty" copier:"Flavor"` + Id string `json:"id,omitempty" copier:"Id"` + Image Image `json:"image,omitempty" copier:"Image"` + Lease Lease `json:"lease,omitempty" copier:"Lease"` + Name string `json:"name,omitempty" copier:"Name"` + Pool Pool `json:"pool,omitempty" copier:"Pool"` + Status string `json:"status,omitempty" copier:"Status"` + Token string `json:"token,omitempty" copier:"Token"` + Url string `json:"url,omitempty" copier:"Url"` + Volume VolumeRes `json:"volume,omitempty" copier:"Volume"` + WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` + Feature string `json:"feature,omitempty" copier:"Feature"` + CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` // * + Hooks Hooks `json:"hooks,omitempty" copier:"Hooks"` // * + Tags []string `json:"tags,omitempty" copier:"Tags"` // * + UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` // * + UserNotebookResp UserNotebookResp `json:"user,omitempty" copier:"UserNotebookResp"` // * + UserId string `json:"userId,omitempty" copier:"UserId"` // * + BillingItems []string `json:"billingItems,omitempty" copier:"BillingItems"` // * +} + +type UserNotebookResp struct { + UserNotebookDomain UserNotebookDomain `json:"domain,omitempty" copier:"UserNotebookDomain"` // * + Id string `json:"id,omitempty" copier:"Id"` // * + Name string `json:"name,omitempty" copier:"Name"` // * +} + +type UserNotebookDomain struct { + Id string `json:"id,omitempty" copier:"Id"` // * + Name string `json:"name,omitempty" copier:"Name"` // * +} + +type Hooks struct { + ContainerHooksResp ContainerHooksResp `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // * +} + +type ContainerHooksResp struct { + PostStart PostStart `json:"postStart,omitempty" copier:"PostStart"` // * + PreStart PreStart `json:"preStart,omitempty" copier:"PreStart"` // * +} + +type PostStart struct { + Mode string `json:"mode,omitempty" copier:"Mode"` // * + Script string `json:"script,omitempty" copier:"Script"` // * + Type string `json:"type,omitempty" copier:"Type"` // * +} + +type PreStart struct { + Mode string `json:"mode,omitempty" copier:"Mode"` // * + Script string `json:"script,omitempty" copier:"Script"` // * + Type string `json:"type,omitempty" copier:"Type"` // * +} + +type ActionProgress struct { + Step int32 `json:"step,omitempty" copier:"Step"` // * + Status string `json:"status,omitempty" copier:"Status"` // * + Description string `json:"description,omitempty" copier:"Description"` // * +} + +type JobProgress struct { + NotebookId string `json:"notebookId" copier:"NotebookId"` + Status string `json:"status,omitempty" copier:"Status"` + Step int32 `json:"step,omitempty" copier:"Step"` + StepDescription string `json:"stepDescription,omitempty" copier:"StepDescription"` +} + +type EndpointsRes struct { + AllowedAccessIps []string `json:"allowedAccessIps,omitempty" copier:"AllowedAccessIps"` + DevService string `json:"devService,omitempty" copier:"DevService"` + SshKeys []string `json:"sshKeys,omitempty" copier:"SshKeys"` +} + +type Image struct { + Arch string `json:"arch,omitempty" copier:"Arch"` + CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` + Description string `json:"description,omitempty" copier:"Description"` + DevServices []string `json:"devServices,omitempty" copier:"DevServices"` + Id string `json:"id,omitempty" copier:"Id"` + Name string `json:"name,omitempty" copier:"Name"` + Namespace string `json:"namespace,omitempty" copier:"Namespace"` + Origin string `json:"origin,omitempty" copier:"Origin"` + ResourceCategories []string `json:"resourceCategories,omitempty" copier:"ResourceCategories"` + ServiceType string `json:"serviceType,omitempty" copier:"ServiceType"` + Size int64 `json:"size,omitempty" copier:"Size"` + Status string `json:"status,omitempty" copier:"Status"` + StatusMessage string `json:"statusMessage,omitempty" copier:"StatusMessage"` + SupportResCategories []string `json:"supportResCategories,omitempty" copier:"SupportResCategories"` + SwrPath string `json:"swrPath,omitempty" copier:"SwrPath"` + Tag string `json:"tag,omitempty" copier:"Tag"` + TypeImage string `json:"type,omitempty" copier:"TypeImage"` + UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` + Visibility string `json:"visibility,omitempty" copier:"Visibility"` + WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` +} + +type Lease struct { + CreateAt int64 `json:"createAt,omitempty" copier:"CreateAt"` + Duration int64 `json:"duration,omitempty" copier:"Duration"` + Enable bool `json:"enable,omitempty" copier:"Enable"` + TypeLease string `json:"type,omitempty" copier:"TypeLease"` + UpdateAt int64 `json:"updateAt,omitempty" copier:"UpdateAt"` +} + +type Pool struct { + Id string `json:"id,omitempty" copier:"Id"` + Name string `json:"name,omitempty" copier:"Name"` +} + +type VolumeRes struct { + Capacity int64 `json:"capacity,omitempty" copier:"Capacity"` + Category string `json:"category,omitempty" copier:"Category"` + MountPath string `json:"mountPath,omitempty" copier:"MountPath"` + Ownership string `json:"ownership,omitempty" copier:"Ownership"` + Status string `json:"status,omitempty" copier:"Status"` +} + +type EndpointsReq struct { + AllowedAccessIps []string `json:"allowedAccessIps" copier:"AllowedAccessIps"` + DevService string `json:"devService" copier:"DevService"` + SshKeys []string `json:"sshKeys" copier:"SshKeys"` +} + +type VolumeReq struct { + Capacity int64 `json:"capacity,optional" copier:"Capacity"` + Category string `json:"category" copier:"Category"` + Ownership string `json:"ownership" copier:"Ownership"` + Uri string `json:"uri,optional" copier:"Uri"` +} + +type CustomHooks struct { + ContainerHooks ContainerHooks `json:"containerHooks" copier:"ContainerHooks"` +} + +type ContainerHooks struct { + PostStart Config `json:"postStart" copier:"PostStart"` + PreStart Config `json:"preStart" copier:"PreStart"` +} + +type Config struct { + Script string `json:"script" copier:"Script"` + TypeConfig string `json:"type" copier:"TypeConfig"` +} + +type LeaseReq struct { + Duration int64 `json:"duration,omitempty" copier:"Duration"` + TypeLeaseReq string `json:"type,omitempty" copier:"TypeLeaseReq"` +} + +type GetVisualizationJobReq struct { + Project_id string `json:"projectId"` + Param GetVisualizationJobParam `json:"param"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type GetVisualizationJobResp struct { + Is_success bool `json:"isSuccess"` + Error_code string `json:"errorCode"` + Error_message string `json:"errorMessage"` + Job_total_count int32 `json:"jobTotalCount"` + Job_count_limit int32 `json:"jobCountLimit"` + Jobs []Jobs `json:"jobs"` + Quotas int32 `json:"quotas"` +} + +type Jobs struct { + Job_name string `json:"jobName"` + Status int32 `json:"status"` + Create_time int64 `json:"createTime"` + Duration int64 `json:"duration"` + Job_desc string `json:"jobDesc"` + Service_url string `json:"serviceUrl"` + Train_url string `json:"trainUrl"` + Job_id string `json:"jobId"` + Resource_id string `json:"resourceId"` +} + +type GetVisualizationJobParam struct { + Status string `json:"status"` + Per_page int32 `json:"perPage"` + Page int32 `json:"page"` + SortBy string `json:"sortBy"` + Order string `json:"order"` + Search_content string `json:"searchContent"` + Workspace_id string `json:"workspaceId"` +} + +type CreateVisualizationJobReq struct { + Project_id string `json:"projectId"` + Param CreateVisualizationJobParam `json:"param"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type CreateVisualizationJobResp struct { + Error_message string `json:"errorMessage"` + Error_code string `json:"errorCode"` + Job_id int64 `json:"jobId"` + Job_name string `json:"jobName"` + Status int32 `json:"status"` + Create_time int64 `json:"createTime"` + Service_url string `json:"serviceUrl"` +} + +type CreateVisualizationJobParam struct { + Job_name string `json:"jobName"` + Job_desc string `json:"jobDesc"` + Train_url string `json:"trainUrl"` + Job_type string `json:"jobType"` + Flavor Flavor `json:"flavor"` + Schedule Schedule `json:"schedule"` +} + +type Flavor struct { + Code string `json:"code"` +} + +type Schedule struct { + Type_schedule string `json:"type"` + Time_unit string `json:"timeUnit"` + Duration int32 `json:"duration"` +} + +type CreateTrainingJobReq struct { + Kind string `json:"kind,optional"` + Metadatas MetadataS `json:"metadata,optional"` + AlgorithmsCtRq AlgorithmsCtRq `json:"algorithm,optional"` + SpecsCtRq SpecsCtRq `json:"spec,optional"` + ProjectId string `path:"projectId"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type CreateTrainingJobResp struct { + Kind string `json:"kind,omitempty"` + Metadatas *MetadataS `json:"metadata,omitempty"` + Status *Status `json:"status,omitempty"` + SpecCtRp *SpecCtRp `json:"spec,omitempty"` + Algorithms *AlgorithmsCtRq `json:"algorithm,omitempty"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type MetadataS struct { + Id string `json:"id,optional"` + Name string `json:"name,optional"` + Description string `json:"description,optional"` + WorkspaceId string `json:"workspaceId,optional"` +} + +type EngineCreateTraining struct { + EngineId string `json:"engineId,optional"` + EngineName string `json:"engineName,optional"` + EngineVersion string `json:"engineVersion,optional"` + ImageUrl string `json:"imageUrl,optional"` +} + +type ConstraintCreateTraining struct { + Type string `json:"type,optional"` + Editable bool `json:"editable,optional"` + Required bool `json:"required,optional"` + Sensitive bool `json:"sensitive,optional"` + ValidType string `json:"validType,optional"` +} + +type ParametersTrainJob struct { + Name string `json:"name,optional"` + Value string `json:"value,optional"` +} + +type PoliciesCreateTraining struct { +} + +type AlgorithmsCtRq struct { + Id string `json:"id,optional"` + Name string `json:"name,optional"` + CodeDir string `json:"codeDir,optional"` + BootFile string `json:"bootFile,optional"` + EngineCreateTraining EngineCreateTraining `json:"engine,optional"` + ParametersTrainJob []ParametersTrainJob `json:"parameters,optional"` + PoliciesCreateTraining PoliciesCreateTraining `json:"policies,optional"` + Command string `json:"command,optional"` + SubscriptionId string `json:"subscriptionId,optional"` + ItemVersionId string `json:"itemVersionId,optional"` + InputTra []InputTra `json:"inputs,optional"` + OutputTra []OutputTra `json:"outputs,optional"` + Environments Environments `json:"environments,optional"` +} + +type Environments struct { +} + +type InputTra struct { + Name string `json:"name,optional"` + AccessMethod string `json:"accessMethod,optional"` + RemoteIn RemoteTra `json:"remoteIn,optional"` +} + +type RemoteTra struct { + DatasetIn DatasetTra `json:"dataSet,optional"` +} + +type DatasetTra struct { + Id string `json:"id,optional"` + Name string `json:"name,optional"` + VersionName string `json:"versionName,optional"` + VersionId string `json:"versionId,optional"` +} + +type OutputTra struct { + Name string `json:"name,optional"` + AccessMethod string `json:"accessMethod,optional"` + PrefetchToLocal string `json:"prefetchToLocal,optional"` + RemoteOut RemoteOut `json:"remoteOut,optional"` +} + +type RemoteOut struct { + Obs ObsTra `json:"obs,optional"` +} + +type ObsTra struct { + ObsUrl string `json:"obsUrl,optional"` +} + +type ResourceCreateTraining struct { + FlavorId string `json:"flavorId,optional"` + NodeCount int32 `json:"nodeCount,optional"` + Policy string `json:"policy,optional"` + FlavorLabel string `json:"flavorLabel,optional"` +} + +type LogExportPathCreateTrainingJob struct { + ObsUrl string `json:"obsUrl,optional"` +} + +type SpecsCtRq struct { + Resource ResourceCreateTraining `json:"resource,optional"` + Volumes []Volumes `json:"volumes,optional"` + LogExportPath LogExportPath `json:"logExportPath,optional"` +} + +type SpecCtRp struct { + Resource ResourceCreateTraining `json:"resource,optional"` + Volumes []Volumes `json:"volumes,optional"` + LogExportPath LogExportPath `json:"logExportPath,optional"` +} + +type LogExportPath struct { + ObsUrl string `json:"obsUrl,optional"` + HostPath string `json:"hostPath,optional"` +} + +type Volumes struct { + Nfs *Nfs `json:"nfs,optional"` +} + +type Nfs struct { + NfsServerPath string `json:"nfsServerPath,optional"` + LocalPath string `json:"localPath,optional"` + ReadOnly bool `json:"readOnly,optional"` +} + +type CenterOverviewResp struct { + CenterNum int32 `json:"totalCenters,optional"` + TaskNum int32 `json:"totalTasks,optional"` + CardNum int32 `json:"totalCards,optional"` + PowerInTops float64 `json:"totalPower,optional"` +} + +type CenterQueueingResp struct { + Current []*CenterQueue `json:"current,optional"` + History []*CenterQueue `json:"history,optional"` +} + +type CenterQueue struct { + Name string `json:"name,optional"` + QueueingNum int32 `json:"num,optional"` +} + +type CenterListResp struct { + List []*AiCenter `json:"centerList,optional"` +} + +type AiCenter struct { + Name string `json:"name,optional"` + StackName string `json:"stack,optional"` + Version string `json:"version,optional"` +} + +type CenterTaskListResp struct { + List []*AiTask `json:"taskList,optional"` +} + +type AiTask struct { + Name string `json:"name,optional"` + Status string `json:"status,optional"` + Cluster string `json:"cluster,optional"` + Card string `json:"card,optional"` + TimeElapsed int32 `json:"elapsed,optional"` +} + +type TrainingTaskStatResp struct { + Running int32 `json:"running"` + Total int32 `json:"total"` +} + +type ChatReq struct { + Id uint `json:"id,string"` + Method string `json:"method,optional"` + ReqData map[string]interface{} `json:"reqData"` +} + +type ChatResult struct { + Resuluts string `json:"results,optional"` } type StorageScreenReq struct { @@ -6523,29 +3008,883 @@ type StorageScreenResp struct { ErrorMsg string `json:"ErrorMsg,omitempty"` } -type SubTaskInfo struct { - Id string `json:"id" db:"id"` - Name string `json:"name" db:"name"` - ClusterId string `json:"clusterId" db:"cluster_id"` - ClusterName string `json:"clusterName" db:"cluster_name"` - Status string `json:"status" db:"status"` - Remark string `json:"remark" db:"remark"` - InferUrl string `json:"inferUrl"` +type AiCenterInfos struct { + Id string `json:"id" copier:"Id"` + Name string `json:"name" copier:"Name"` + Desc string `json:"desc" copier:"Desc"` + Resource string `json:"resource" copier:"Resource"` + TrainJob string `json:"trainJob" copier:"TrainJob"` + ComputeScale int32 `json:"computeScale" copier:"ComputeScale"` + StorageScale int32 `json:"storageScale" copier:"StorageScale"` + Province string `json:"path:province" copier:"Province"` + City string `json:"city" copier:"City"` + CoordinateX int32 `json:"coordinateX" copier:"CoordinateX"` + CoordinateY int32 `json:"coordinateY" copier:"CoordinateY"` + Type int32 `json:"type" copier:"Type"` + Weight int32 `json:"weight" copier:"Weight"` + ConnectionState int32 `json:"connectionState" copier:"ConnectionState"` + BusyState int32 `json:"busyState" copier:"BusyState"` + ImageUrl string `json:"imageUrl" copier:"ImageUrl"` + AccDevices string `json:"accDevices" copier:"AccDevices"` + MarketTime int64 `json:"marketTime" copier:"MarketTime"` + CreatedAt int64 `json:"createdAt" copier:"CreatedAt"` + AccessTime int32 `json:"accessTime" copier:"AccessTime"` + CardRunTime int32 `json:"cardRunTime" copier:"CardRunTime"` + JobCount int32 `json:"jobCount" copier:"JobCount"` } -type SubmitLinkTaskReq struct { - PartId int64 `json:"partId"` - ImageId string `json:"imageId,optional"` - Cmd string `json:"cmd,optional"` - Params []*ParamSl `json:"params,optional"` - Envs []*EnvSl `json:"envs,optional"` - ResourceId string `json:"resourceId,optional"` +type DailyPowerScreenResp struct { + Chart interface{} `json:"chart"` } -type SubmitLinkTaskResp struct { - Success bool `json:"success"` - TaskId string `json:"taskId"` - ErrorMsg string `json:"errorMsg"` +type PerCenterComputerPowersResp struct { + Chart interface{} `json:"chart"` +} + +type UploadImageReq struct { + Name string `json:"name" copier:"name"` +} + +type ImageListResp struct { + Repositories []string `json:"repositories" copier:"repositories"` +} + +type ImageTagsReq struct { + Name string `form:"name"` +} + +type ImageTagsResp struct { + Name string `json:"name"` + Tags []string `json:"tags" copier:"tags"` +} + +type CheckReq struct { + FileMd5 string `path:"fileMd5"` +} + +type CheckResp struct { + Exist bool `json:"exist"` +} + +type Rate struct { +} + +type Absolute struct { + MaxServerMeta int64 `json:"max_server_meta,optional"` + MaxPersonality int64 `json:"max_personality,optional"` + TotalServerGroupsUsed int64 `json:"total_server_groups_used,optional"` + MaxImageMeta int64 `json:"max_image_meta,optional"` + MaxPersonalitySize int64 `json:"max_personality_size,optional"` + MaxTotalKeypairs int64 `json:"max_total_keypairs,optional"` + MaxSecurityGroupRules int64 `json:"max_security_group_rules,optional"` + MaxServerGroups int64 `json:"max_server_groups,optional"` + TotalCoresUsed int64 `json:"total_cores_used,optional"` + TotalRAMUsed int64 `json:"total_ram_used,optional"` + TotalInstancesUsed int64 `json:"total_instances_used,optional"` + MaxSecurityGroups int64 `json:"max_security_groups,optional"` + TotalFloatingIpsUsed int64 `json:"total_floating_ips_used,optional"` + MaxTotalCores int64 `json:"max_total_cores,optional"` + MaxServerGroupMembers int64 `json:"max_server_group_members,optional"` + MaxTotalFloatingIps int64 `json:"max_total_floating_ips,optional"` + TotalSecurityGroupsUsed int64 `json:"total_security_groups_used,optional"` + MaxTotalInstances int64 `json:"max_total_instances,optional"` + MaxTotalRAMSize int64 `json:"max_total_ram_size,optional"` +} + +type Limits struct { + Rate Rate `json:"rate,optional"` + Absolute Absolute `json:"absolute,optional"` +} + +type GetComputeLimitsReq struct { + Platform string `form:"platform,optional"` +} + +type GetComputeLimitsResp struct { + Limits Limits `json:"limits,optional"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type VolumeRate struct { +} + +type VolumeAbsolute struct { + TotalSnapshotsUsed int32 `json:"total_snapshots_used,optional"` + MaxTotalBackups int32 `json:"max_total_backups,optional"` + MaxTotalVolumeGigabytes int32 `json:"max_total_volume_gigabytes,optional"` + MaxTotalSnapshots int32 `json:"max_total_snapshots,optional"` + MaxTotalBackupGigabytes int32 `json:"max_total_backup_gigabytes,optional"` + TotalBackupGigabytesUsed int32 `json:"total_backup_gigabytes_used,optional"` + MaxTotalVolumes int32 `json:"max_total_volumes,optional"` + TotalVolumesUsed int32 `json:"total_volumes_used,optional"` + TotalBackupsUsed int32 `json:"total_backups_used,optional"` + TotalGigabytesUsed int32 `json:"total_gigabytes_used,optional"` +} + +type VolumeLimits struct { + Rate VolumeRate `json:"rate,optional"` + Absolute VolumeAbsolute `json:"absolute,optional"` +} + +type GetVolumeLimitsReq struct { + Platform string `form:"platform,optional"` +} + +type GetVolumeLimitsResp struct { + Limits VolumeLimits `json:"limits,optional"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type OpenstackOverviewReq struct { + Platform string `form:"platform,optional"` +} + +type OpenstackOverviewResp struct { + Data OpenstackOverview `json:"data"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type OpenstackOverview struct { + Max_total_cores int32 `json:"max_total_cores"` + Max_total_ram_size int32 `json:"max_total_ram_size"` + Max_total_volumes int32 `json:"max_total_volumes"` +} + +type ListServersReq struct { + Limit int32 `form:"limit,optional"` + OffSet int32 `form:"offSet,optional"` + Platform string `form:"platform,optional"` +} + +type ListServersResp struct { + TotalNumber uint32 `json:"totalNumber" copier:"TotalNumber"` + Servers []Servers `json:"servers" copier:"Servers"` + Servers_links []Servers_links `json:"serversLinks" copier:"Servers_links"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Servers struct { + Id string `json:"id" copier:"Id"` + Name string `json:"name" copier:"Name"` + Links []Links `json:"links " copier:"Links "` +} + +type Links struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` +} + +type Servers_links struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` +} + +type ListServersDetailedReq struct { + Platform string `form:"platform,optional"` +} + +type ListServersDetailedResp struct { + ServersDetailed []ServersDetailed `json:"servers" copier:"ServersDetailed"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ServersDetailed struct { + Id string `json:"id" copier:"Id"` + Name string `json:"name" copier:"Name"` + OSTaskState uint32 `json:"os_task_state" copier:"OSTaskState"` + Status string `json:"status" copier:"Status"` + VmState string `json:"vm_state" copier:"VmState"` + OS_EXT_SRV_ATTR_Instance_Name string `json:"os_ext_srv_attr_instance_name" copier:"OS_EXT_SRV_ATTR_Instance_Name"` + Created string `json:"created" copier:"Created"` + HostId string `json:"hostId" copier:"HostId"` + Ip string `json:"ip" copier:"Ip"` + Image string `json:"image" copier:"Image"` + Updated string `json:"updated" copier:"Updated"` + Flavor string `json:"flavor" copier:"Flavor"` + Key_name string `json:"key_name" copier:"Key_name"` + Survival_time int32 `json:"survival_time" copier:"Survival_time"` +} + +type GetServersDetailedByIdReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + Platform string `form:"platform,optional"` +} + +type GetServersDetailedByIdResp struct { + Servers ServersDetaileResp `json:"server" copier:"Servers"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ServersDetaileResp struct { + AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` + AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` + Addresses Addresses `json:"addresses" copier:"Addresses"` + Name string `json:"name" copier:"Name"` + ConfigDrive string `json:"config_drive" copier:"ConfigDrive"` + Created string `json:"created" copier:"Created"` + Flavor FlavorDetailed `json:"flavor" copier:"Flavor"` + HostId string `json:"hostId" copier:"HostId"` + Id string `json:"id" copier:"Id"` + Image ImageDetailed `json:"image" copier:"Image"` + KeyName string `json:"key_name" copier:"KeyName"` + Links1 []Links1 `json:"links" copier:"Links1"` + Metadata MetadataDetailed `json:"metadata" copier:"Metadata"` + Status string `json:"status" copier:"Status"` + TenantId string `json:"tenant_id" copier:"TenantId"` + Updated string `json:"updated" copier:"Updated"` + UserId string `json:"user_id" copier:"UserId"` + Fault Fault `json:"fault" copier:"Fault"` + Progress uint32 `json:"progress" copier:"Progress"` + Locked bool `json:"locked" copier:"Locked"` + HostStatus string `json:"host_status" copier:"HostStatus"` + Description string `json:"description" copier:"Description"` + Tags []string `json:"tags" copier:"Tags"` + TrustedImageCertificates string `json:"trusted_image_certificates" copier:"TrustedImageCertificates"` + ServerGroups string `json:"server_groups" copier:"ServerGroups"` + LockedReason string `json:"locked_reason" copier:"LockedReason"` + SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"` +} + +type Addresses struct { + Private Private `json:"private" copier:"private"` +} + +type FlavorDetailed struct { + Id string `json:"id" copier:"Id"` + Links string `json:"links" copier:"Links"` + Vcpus string `json:"vcpus" copier:"Vcpus"` + Ram uint32 `json:"ram" copier:"Ram"` + Disk uint32 `json:"ram" copier:"Disk"` + Dphemeral uint32 `json:"ephemeral" copier:"Dphemeral"` + Swap uint32 `json:"swap" copier:"Swap"` + OriginalName string `json:"OriginalName" copier:"OriginalName"` + ExtraSpecs ExtraSpecs `json:"Extra_specs" copier:"ExtraSpecs"` +} + +type Links1 struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` +} + +type ImageDetailed struct { + Id string `json:"id " copier:"Id"` + Links []Links `json:"links" copier:"Links"` +} + +type MetadataDetailed struct { +} + +type Fault struct { + Code uint32 `json:"code " copier:"Code"` + Created string `json:"created " copier:"Created"` + Message string `json:"message " copier:"Message"` + Details string `json:"details " copier:"Details"` +} + +type Private struct { + Addr string `json:"addr" copier:"Addr"` + Version uint32 `json:"version" copier:"Version"` +} + +type ExtraSpecs struct { + Capabilities string `json:"capabilities" copier:"Capabilities"` +} + +type UpdateServerReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + ServerUpdate ServerUpdate `json:"server_update" copier:"ServerUpdate"` + Platform string `form:"platform,optional"` +} + +type ServerUpdate struct { + Server Server `json:"server" copier:"Server"` +} + +type UpdateServerResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Server ServersDetaileResp `json:"server" copier:"Server"` +} + +type StartServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"action,optional" copier:"Action"` + Start_action string `json:"start_action" copier:"start_action"` + Platform string `form:"platform,optional"` +} + +type StartServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type StopServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"action,optional" copier:"Action"` + Stop_action string `json:"stop_action" copier:"stop_action"` + Platform string `form:"platform,optional"` +} + +type StopServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type RebootServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Reboot Reboot `json:"reboot" copier:"Reboot"` + Platform string `form:"platform,optional"` +} + +type RebootServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type Reboot struct { + Type string `json:"type" copier:"Type"` +} + +type PauseServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Pause_action string `json:"pause_action" copier:"pause_action"` + Platform string `form:"platform,optional"` +} + +type PauseServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type UnpauseServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Unpause_action string `json:"unpause_action" copier:"unpause_action"` + Platform string `form:"platform,optional"` +} + +type UnpauseServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type DeleteServerReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + Platform string `form:"platform,optional"` +} + +type DeleteServerResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type CreateServerReq struct { + Platform string `json:"platform,optional"` + CrServer CrServer `json:"crserver" copier:"CrServer"` +} + +type CrServer struct { + Server Server `json:"server" copier:"Server"` +} + +type CreateServerResp struct { + Server ServerResp `json:"server" copier:"Server"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Server struct { + AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` + Name string `json:"name,optional" copier:"Name"` + FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` + Description string `json:"description,optional" copier:"Description"` + ImageRef string `json:"imageRef,optional" copier:"ImageRef"` + Networks []CreNetwork `json:"networks,optional" copier:"Networks"` + BlockDeviceMappingV2 []Block_device_mapping_v2 `json:"block_device_mapping_v2,optional" copier:"BlockDeviceMappingV2"` + MinCount int32 `json:"min_count,optional" copier:"MinCount"` +} + +type CreNetwork struct { + Uuid string `json:"uuid" copier:"Uuid"` +} + +type Security_groups_server struct { + Name string `json:"name" copier:"Name"` +} + +type Block_device_mapping_v2 struct { + SourceType string `json:"source_type" copier:"SourceType"` + Uuid string `json:"uuid" copier:"Uuid"` + BootIndex string `json:"boot_index" copier:"BootIndex"` + DestinationType string `json:"destination_type" copier:"DestinationType"` + DeleteOnTermination bool `json:"delete_on_termination" copier:"DeleteOnTermination"` +} + +type ServerResp struct { + Id string `json:"id" copier:"Id"` + Links []Links `json:"links" copier:"Links"` + OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` + SecurityGroups []Security_groups_server `json:"security_groups" copier:"SecurityGroups"` + AdminPass string `json:"adminPass" copier:"AdminPass"` +} + +type CreateMulServerReq struct { + CreateMulServer []CreateMulServer `json:"createMulServer,optional"` +} + +type CreateMulServer struct { + Platform string `json:"platform,optional"` + CrServer MulCrServer `json:"crserver" copier:"CrServer"` +} + +type MulCrServer struct { + Server MulServer `json:"server" copier:"Server"` +} + +type MulServer struct { + AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` + Name string `json:"name,optional" copier:"Name"` + FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` + Description string `json:"description,optional" copier:"Description"` + ImageRef string `json:"imageRef,optional" copier:"ImageRef"` + Networks []CreNetwork `json:"networks,optional" copier:"Networks"` + MinCount int32 `json:"min_count,optional" copier:"MinCount"` +} + +type CreateMulServerResp struct { + Server []MulServerResp `json:"server" copier:"Server"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type MulServerResp struct { + Id string `json:"id" copier:"Id"` + Links []Links `json:"links" copier:"Links"` + OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` + SecurityGroups []Security_groups_server `json:"security_groups" copier:"SecurityGroups"` + AdminPass string `json:"adminPass" copier:"AdminPass"` +} + +type RebuildServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `form:"platform,optional"` + Rebuild Rebuild `json:"rebuild" copier:"Rebuild"` +} + +type RebuildServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type Rebuild struct { + ImageRef string `json:"imageRef" copier:"ImageRef"` + AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` + AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` + AdminPass string `json:"adminPass" copier:"AdminPass"` + Name string `json:"name" copier:"Name"` + PreserveEphemeral bool `json:"preserve_ephemeral" copier:"PreserveEphemeral"` + Description string `json:"description" copier:"Description"` + KeyName string `json:"key_name" copier:"KeyName"` + UserData string `json:"user_data" copier:"UserData"` + Hostname string `json:"hostname" copier:"Hostname"` + Metadata MetadataServer `json:"metadata" copier:"Metadata"` + Personality []Personality `json:"personality" copier:"Personality"` + Trusted_image_certificates []Trusted_image_certificates `json:"trusted_image_certificates" copier:"trusted_image_certificates"` +} + +type MetadataServer struct { +} + +type Personality struct { + Path string `json:"path" copier:"Path"` + Contents string `json:"contents" copier:"Contents"` +} + +type Trusted_image_certificates struct { +} + +type ResizeServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `json:"platform,optional"` + Resize Resize `json:"resize" copier:"Resize"` +} + +type ResizeServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type Resize struct { + FlavorRef string `json:"flavorRef" copier:"flavorRef"` +} + +type MigrateServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `json:"platform,optional"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + MigrateAction string `json:"migrate_action,optional" copier:"MigrateAction"` + Migrate Migrate `json:"migrate" copier:"Migrate"` +} + +type MigrateServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type Migrate struct { + Host []map[string]string `json:"host,optional" copier:"host"` +} + +type ShelveServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Shelve_action string `json:"shelve_action" copier:"shelve_action"` + Platform string `form:"platform,optional"` +} + +type ShelveServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type RescueServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `form:"platform,optional"` + Rescue Rescue `json:"rescue" copier:"Rescue"` +} + +type RescueServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type Rescue struct { + AdminPass string `json:"adminPass" copier:"AdminPass"` + RescueImageRef string `json:"rescue_image_ref" copier:"RescueImageRef"` +} + +type UnRescueServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Platform string `form:"platform,optional"` + UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` + Rescue Rescue `json:"rescue" copier:"Rescue"` +} + +type UnRescueServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type ChangeAdministrativePasswordReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Changepassword string `json:"changePassword" copier:"Changepassword"` + Platform string `form:"platform,optional"` + ChangePassword ChangePassword `json:"changepassword" copier:"ChangePassword"` +} + +type ChangeAdministrativePasswordResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type ChangePassword struct { + AdminPass string `json:"adminPass" copier:"AdminPass"` +} + +type SuspendServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Platform string `form:"platform,optional"` + UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` + Rescue Rescue `json:"rescue" copier:"Rescue"` +} + +type SuspendServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type AddSecurityGroupToServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Platform string `form:"platform,optional"` + UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` + AddSecurityGroup AddSecurityGroup `json:"addSecurityGroup" copier:"AddSecurityGroup"` +} + +type AddSecurityGroupToServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type AddSecurityGroup struct { + Name string `json:"name" copier:"Name"` +} + +type RemoveSecurityGroupReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `form:"platform,optional"` + RemoveSecurityGroup RemoveSecurityGroup `json:"removeSecurityGroup" copier:"RemoveSecurityGroup"` +} + +type RemoveSecurityGroupResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type RemoveSecurityGroup struct { + Name string `json:"name" copier:"Name"` +} + +type CreateFlavorReq struct { + Platform string `json:"platform,optional"` + Flavor FlavorServer `json:"flavor" copier:"Flavor"` +} + +type CreateFlavorResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type FlavorServer struct { + Name string `json:"name" copier:"Name"` + Ram uint32 `json:"ram" copier:"Ram"` + Disk uint32 `json:"disk" copier:"disk"` + Vcpus uint32 `json:"vcpus" copier:"vcpus"` + Id string `json:"id" copier:"id"` + Rxtx_factor float64 `json:"rxtx_factor" copier:"rxtx_factor"` + Description string `json:"description" copier:"description"` +} + +type DeleteFlavorReq struct { + Platform string `form:"platform,optional"` + ServerId string `json:"server_id" copier:"ServerId"` + FlavorId string `json:"flavor_id" copier:"FlavorId"` +} + +type DeleteFlavorResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type ListImagesReq struct { + Platform string `form:"platform,optional"` +} + +type ListImagesResp struct { + First string `json:"first" copier:"First"` + Next string `json:"next" copier:"Next"` + Schema string `json:"schema" copier:"Schema"` + Images []Images `json:"images" copier:"Images"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Images struct { + Status string `json:"status" copier:"Status"` + Name string `json:"name" copier:"Name"` + Tags []Tags `json:"tags" copier:"Tags"` + Container_format string `json:"container_format" copier:"Container_format"` + Created_at string `json:"created_at" copier:"Created_at"` + Disk_format string `json:"disk_format" copier:"Disk_format"` + Updated_at string `json:"updated_at" copier:"Updated_at"` + Visibility string `json:"visibility" copier:"Visibility"` + Self string `json:"self" copier:"Self"` + Min_disk uint32 `json:"min_disk" copier:"Min_disk"` + Protected bool `json:"protected" copier:"Protected"` + Id string `json:"id" copier:"Id"` + File string `json:"file" copier:"File"` + Checksum string `json:"checksum" copier:"Checksum"` + Os_hash_algo string `json:"os_hash_algo" copier:"Os_hash_algo"` + Os_hash_value string `json:"os_hash_value" copier:"Os_hash_value"` + Os_hidden string `json:"os_hidden" copier:"Os_hidden"` + Owner string `json:"owner" copier:"Owner"` + Size uint32 `json:"size" copier:"Size"` + Min_ram uint32 `json:"min_ram" copier:"Min_ram"` + Schema string `json:"schema" copier:"Schema"` + Virtual_size int32 `json:"virtual_size" copier:"Virtual_size"` +} + +type Tags struct { +} + +type CreateImageReq struct { + Container_format string `json:"container_format" copier:"Container_format"` + Disk_format string `json:"disk_format" copier:"Disk_format"` + Min_disk int32 `json:"min_disk" copier:"Min_disk"` + Min_ram int32 `json:"min_ram" copier:"Min_ram"` + Name string `json:"name" copier:"Name"` + Protected bool `json:"protected" copier:"Protected"` + Platform string `json:"platform,optional"` + Visibility string `json:"visibility" copier:"Visibility"` +} + +type CreateImageResp struct { + Location string `json:"location" copier:"Location"` + Created_at string `json:"created_at" copier:"Created_at"` + Container_format string `json:"Container_format" copier:"Container_format"` + Disk_format string `json:"disk_format" copier:"Disk_format"` + File string `json:"file" copier:"File"` + Id string `json:"id" copier:"Id"` + Min_disk int32 `json:"min_disk" copier:"Min_disk"` + Min_ram int32 `json:"min_ram" copier:"Min_ram"` + Status string `json:"status" copier:"Status"` + Visibility string `json:"visibility" copier:"Visibility"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type UploadOsImageReq struct { + ImageId string `form:"image_id" copier:"ImageId"` + Platform string `form:"platform,optional"` +} + +type UploadOsImageResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type DeleteImageReq struct { + ImageId string `form:"image_id" copier:"ImageId"` + Platform string `form:"platform,optional"` +} + +type DeleteImageResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type NetworkNum struct { + NetworkNum int32 `json:"networkNum"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ImageNum struct { + ImageNum int32 `json:"imageNum"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ListNetworksReq struct { + Platform string `form:"platform,optional"` +} + +type ListNetworksResp struct { + Networks []Network `json:"networks" copier:"Networks"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Network struct { + AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` + AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` + AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` + CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` + DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` + Id string `json:"id,optional" copier:"Id"` + Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` + Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` + L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` + Mtu int64 `json:"mtu,optional" copier:"Mtu"` + Name string `json:"name,optional" copier:"Name"` + PortSecurityEnabled bool `json:"port_security_enabled,optional" copier:"PortSecurityEnabled"` + ProjectId string `json:"project_id,optional" copier:"ProjectId"` + QosPolicyId string `json:"qos_policy_id,optional" copier:"QosPolicyId"` + RevisionNumber int64 `json:"revision_number,optional" copier:"RevisionNumber"` + Shared bool `json:"shared,optional" copier:"Shared"` + RouterExternal bool `json:"router_external,optional" copier:"RouterExternal"` + Status string `json:"status,optional" copier:"Status"` + Subnets []string `json:"subnets,optional" copier:"Subnets"` + Tags []string `json:"tags,optional" copier:"Tags"` + TenantId string `json:"tenant_id,optional" copier:"TenantId"` + UpdatedAt string `json:"updated_at,optional" copier:"UpdatedAt"` + VlanTransparent bool `json:"vlan_transparent,optional" copier:"VlanTransparent"` + Description string `json:"description,optional" copier:"Description"` + IsDefault bool `json:"is_default,optional" copier:"IsDefault"` +} + +type DeleteNetworkReq struct { + NetworkId string `form:"network_id" copier:"NetworkId"` + Platform string `form:"platform,optional"` +} + +type DeleteNetworkResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type CreateNetworkReq struct { + Network CreateNetwork `json:"network" copier:"Network"` + Platform string `json:"platform,optional"` +} + +type CreateNetworkResp struct { + Network Network `json:"network" copier:"Network"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type CreateNetwork struct { + AdminStateUp bool `json:"admin_state_up" copier:"AdminStateUp"` + Name string `json:"name" copier:"Name"` + Shared bool `json:"shared" copier:"Shared"` +} + +type CreateSubnetReq struct { + Subnet Subnet `json:"subnet" copier:"Subnet"` + Platform string `json:"platform,optional"` +} + +type CreateSubnetResp struct { + Subnet SubnetResp `json:"subnet" copier:"Subnet"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } type Subnet struct { @@ -6586,6 +3925,87 @@ type SubnetResp struct { Updated_at string `json:"updated_at" copier:"Updated_at"` } +type Allocation_pools struct { + Start string `json:"start" copier:"Start"` + End string `json:"end" copier:"End"` +} + +type ShowNetworkDetailsReq struct { + NetworkId string `form:"network_id" copier:"NetworkId"` + Platform string `form:"platform,optional"` +} + +type ShowNetworkDetailsResp struct { + Network Networkdetail `json:"network" copier:"Network"` + Msg string `json:"msg" copier:"Msg"` + Code int32 `json:"code" copier:"Code"` + ErrorMsg string `json:"error_msg" copier:"ErrorMsg"` +} + +type Networkdetail struct { + AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` + AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` + AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` + CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` + DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` + Id string `json:"id" copier:"Id,optional"` + Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` + Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` + L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` + Mtu int64 `json:"mtu" copier:"Mtu"` + Name string `json:"name" copier:"Name"` + PortSecurityEnabled bool `json:"port_security_enabled" copier:"PortSecurityEnabled"` + ProjectId string `json:"project_id" copier:"ProjectId"` + QosPolicyId string `json:"qos_policy_id" copier:"QosPolicyId"` + RevisionNumber int64 `json:"revision_number" copier:"RevisionNumber"` + Shared bool `json:"shared" copier:"Shared"` + Status string `json:"status" copier:"Status"` + Subnets []string `json:"subnets" copier:"Subnets"` + TenantId string `json:"tenant_id" copier:"TenantId"` + VlanTransparent bool `json:"vlan_transparent" copier:"VlanTransparent"` + Description string `json:"description" copier:"Description"` + IsDefault bool `json:"is_default" copier:"IsDefault"` + Tags []string `json:"tags" copier:"Tags"` +} + +type UpdateNetworkReq struct { + NetworkId string `form:"network_id" copier:"NetworkId"` + Network Network `json:"network" copier:"Network"` + Platform string `form:"platform,optional"` +} + +type UpdateNetworkResp struct { + Network Network `json:"network" copier:"Network"` + Msg string `json:"msg" copier:"Msg"` + Code int32 `json:"code" copier:"Code"` + ErrorMsg string `json:"error_msg" copier:"ErrorMsg"` +} + +type BulkCreateNetworksReq struct { + Network []CreateNetwork `json:"network" copier:"Network"` + Platform string `json:"platform,optional"` +} + +type BulkCreateNetworksResp struct { + Network []Network `json:"network" copier:"Network"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListSubnetsReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `form:"platform,optional"` +} + +type ListSubnetsResp struct { + Subnets []Subnets `json:"subnets" copier:"Subnets"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + type Subnets struct { Name string `json:"name,optional" copier:"Name"` Enable_dhcp bool `json:"enable_dhcp,optional" copier:"Enable_dhcp"` @@ -6611,607 +4031,22 @@ type Subnets struct { Updated_at string `json:"updated_at,optional" copier:"updated_at"` } -type SuspendServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Platform string `form:"platform,optional"` - UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` - Rescue struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` - RescueImageRef string `json:"rescue_image_ref" copier:"RescueImageRef"` - } `json:"rescue" copier:"Rescue"` +type Allocation_pool struct { + Start string `json:"start,optional" copier:"start"` + End string `json:"end,optional" copier:"end"` } -type SuspendServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type SyncClusterAlertReq struct { - AlertRecordsMap map[string]interface{} `json:"alertRecordsMap"` -} - -type Tags struct { -} - -type TagsAlRp struct { - Tags map[string]string `json:"tags,optional"` -} - -type TargetRaidConfig struct { -} - -type Task struct { - Id int64 `json:"id"` - Name string `json:"name"` - Status string `json:"status"` - TaskType string `json:"taskType"` - StartTime string `json:"startTime"` - EndTime string `json:"endTime"` - ParticipantStatus string `json:"participantStatus"` - ParticipantId int64 `json:"participantId"` - ParticipantName string `json:"participantName"` -} - -type TaskDetailsResp struct { - Name string `json:"name"` - Description string `json:"description"` - StartTime string `json:"startTime"` - EndTime string `json:"endTime"` - Strategy int64 `json:"strategy"` - SynergyStatus int64 `json:"synergyStatus"` - ClusterInfos []*ClusterInfo `json:"clusterInfos"` - SubTaskInfos []*SubTaskInfo `json:"subTaskInfos"` - TaskTypeDict string `json:"taskTypeDict"` - AdapterTypeDict string `json:"adapterTypeDict"` -} - -type TaskInfo struct { - TaskId int64 `json:"taskId,optional"` - TaskType string `json:"taskType,optional"` - MatchLabels map[string]string `json:"matchLabels"` - ParticipantId int64 `json:"participantId"` - Metadata interface{} `json:"metadata"` -} - -type TaskModel struct { - Id int64 `json:"id,omitempty,string" db:"id"` // id - Name string `json:"name,omitempty" db:"name"` // 作业名称 - Description string `json:"description,omitempty" db:"description"` // 作业描述 - Status string `json:"status,omitempty" db:"status"` // 作业状态 - Strategy int64 `json:"strategy" db:"strategy"` // 策略 - SynergyStatus int64 `json:"synergyStatus" db:"synergy_status"` // 协同状态(0-未协同、1-已协同) - CommitTime string `json:"commitTime,omitempty" db:"commit_time"` // 提交时间 - StartTime string `json:"startTime,omitempty" db:"start_time"` // 开始时间 - EndTime string `json:"endTime,omitempty" db:"end_time"` // 结束运行时间 - RunningTime int64 `json:"runningTime" db:"running_time"` // 已运行时间(单位秒) - YamlString string `json:"yamlString,omitempty" db:"yaml_string"` - Result string `json:"result,omitempty" db:"result"` // 作业结果 - DeletedAt string `json:"deletedAt,omitempty" gorm:"index" db:"deleted_at"` - NsID string `json:"nsId,omitempty" db:"ns_id"` - TenantId string `json:"tenantId,omitempty" db:"tenant_id"` - CreatedTime string `json:"createdTime,omitempty" db:"created_time" gorm:"autoCreateTime"` - UpdatedTime string `json:"updatedTime,omitempty" db:"updated_time"` - AdapterTypeDict string `json:"adapterTypeDict" db:"adapter_type_dict" gorm:"adapter_type_dict"` //适配器类型(对应字典表的值 - TaskTypeDict string `json:"taskTypeDict" db:"task_type_dict" gorm:"task_type_dict"` //任务类型(对应字典表的值 -} - -type TaskSl struct { - TaskId string `json:"taskId"` - TaskName string `json:"taskName"` - TaskStatus string `json:"TaskStatus"` - StartedAt int64 `json:"startedAt"` - CompletedAt int64 `json:"completedAt"` -} - -type TaskStatusResp struct { - Succeeded int `json:"Succeeded"` - Failed int `json:"Failed"` - Running int `json:"Running"` - Saved int `json:"Saved"` -} - -type TaskStatuses struct { - Task string `json:"task,omitempty"` - ExitCode string `json:"exitCode,omitempty"` - Message string `json:"message,omitempty"` -} - -type TaskVm struct { - Image string `json:"image"` - Flavor string `json:"flavor"` - Uuid string `json:"uuid"` - Platform string `json:"platform"` -} - -type TaskYaml struct { - Replicas int64 `yaml:"replicas"` - TaskId int64 `yaml:"taskId"` - NsID string `yaml:"nsID"` - TaskType string `yaml:"taskType"` - ParticipantId int64 `yaml:"participantId"` - MatchLabels map[string]string `yaml:"matchLabels"` - Metadata interface{} `yaml:"metadata"` -} - -type TemplateParam struct { - Id string `json:"id,optional" copier:"Id"` - Name string `json:"name,optional" copier:"Name"` - OperatorParam []OperatorParam `json:"operatorParams,optional" copier:"OperatorParam"` -} - -type TenantInfo struct { - Id int64 `json:"id"` // id - TenantName string `json:"tenantName"` // 租户名称 - TenantDesc string `json:"tenantDesc"` // 描述信息 - Clusters string `json:"clusters"` // 集群名称,用","分割 - Type int64 `json:"type"` // 租户所属(0数算,1超算,2智算) - DeletedFlag int64 `json:"deletedFlag"` // 是否删除 - CreatedBy int64 `json:"createdBy"` // 创建人 - CreateTime string `json:"createdTime"` // 创建时间 - UpdatedBy int64 `json:"updatedBy"` // 更新人 - UpdateTime string `json:"updated_time"` // 更新时间 -} - -type TextToImageInferenceReq struct { - TaskName string `form:"taskName"` - TaskDesc string `form:"taskDesc"` - ModelName string `form:"modelName"` - ModelType string `form:"modelType"` - AiClusterIds []string `form:"aiClusterIds"` -} - -type TextToImageInferenceResp struct { - Result []byte `json:"result"` -} - -type TextToTextInferenceReq struct { - TaskName string `form:"taskName"` - TaskDesc string `form:"taskDesc"` - ModelType string `form:"modelType"` - InstanceId int64 `form:"instanceId"` -} - -type TextToTextInferenceResp struct { -} - -type TrainJob struct { - Name string `json:"name"` - Status string `json:"status"` - ParticipantName string `json:"participantName"` - SynergyStatus string `json:"synergyStatus"` - Strategy int `json:"strategy"` -} - -type TrainingExperimentReference struct { -} - -type TrainingTaskStatResp struct { - Running int32 `json:"running"` - Total int32 `json:"total"` -} - -type Trusted_image_certificates struct { -} - -type UnRescueServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Platform string `form:"platform,optional"` - UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` - Rescue struct { - AdminPass string `json:"adminPass" copier:"AdminPass"` - RescueImageRef string `json:"rescue_image_ref" copier:"RescueImageRef"` - } `json:"rescue" copier:"Rescue"` -} - -type UnRescueServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type UnpauseServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Action []map[string]string `json:"Action,optional" copier:"Action"` - Unpause_action string `json:"unpause_action" copier:"unpause_action"` - Platform string `form:"platform,optional"` -} - -type UnpauseServerResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type UpdateFirewallGroupReq struct { - Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_group,optional" copier:"firewall_group"` - Platform string `form:"platform,optional" copier:"Platform"` - Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` -} - -type UpdateFirewallGroupResp struct { - Firewall_group struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` - Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` - Description string `json:"description,optional" copier:"description"` - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Ports []string `json:"ports,optional" copier:"ports"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Shared bool `json:"shared,optional" copier:"shared"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - } `json:"firewall_group,optional" copier:"firewall_group"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type UpdateFloatingIPReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` - Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details Port_details `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - } `json:"floatingip,optional" copier:"floatingip"` -} - -type UpdateFloatingIPResp struct { - Floatingip struct { - Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` - Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` - Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` - Id string `json:"id,optional" copier:"id"` - Port_id string `json:"port_id,optional" copier:"port_id"` - Router_id string `json:"router_id,optional" copier:"router_id"` - Status string `json:"status,optional" copier:"status"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Description string `json:"description,optional" copier:"description"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Port_details Port_details `json:"port_details,optional" copier:"port_details"` - Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - } `json:"floatingip,omitempty" copier:"floatingip"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type UpdateNetworkReq struct { - NetworkId string `form:"network_id" copier:"NetworkId"` - Network struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id,optional" copier:"Id"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu,optional" copier:"Mtu"` - Name string `json:"name,optional" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled,optional" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id,optional" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id,optional" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number,optional" copier:"RevisionNumber"` - Shared bool `json:"shared,optional" copier:"Shared"` - RouterExternal bool `json:"router_external,optional" copier:"RouterExternal"` - Status string `json:"status,optional" copier:"Status"` - Subnets []string `json:"subnets,optional" copier:"Subnets"` - Tags []string `json:"tags,optional" copier:"Tags"` - TenantId string `json:"tenant_id,optional" copier:"TenantId"` - UpdatedAt string `json:"updated_at,optional" copier:"UpdatedAt"` - VlanTransparent bool `json:"vlan_transparent,optional" copier:"VlanTransparent"` - Description string `json:"description,optional" copier:"Description"` - IsDefault bool `json:"is_default,optional" copier:"IsDefault"` - } `json:"network" copier:"Network"` - Platform string `form:"platform,optional"` -} - -type UpdateNetworkResp struct { - Network struct { - AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` - AvailabilityZoneHints []string `json:"availability_zone_hints,optional" copier:"AvailabilityZoneHints"` - AvailabilityZones []string `json:"availability_zones,optional" copier:"AvailabilityZones"` - CreatedAt string `json:"created_at,optional" copier:"CreatedAt"` - DnsDomain string `json:"dns_domain,optional" copier:"DnsDomain"` - Id string `json:"id,optional" copier:"Id"` - Ipv4AddressScope string `json:"ipv4_address_scope,optional" copier:"Ipv4AddressScope"` - Ipv6AddressScope string `json:"ipv6_address_scope,optional" copier:"Ipv6AddressScope"` - L2Adjacency bool `json:"l2_adjacency,optional" copier:"L2Adjacency"` - Mtu int64 `json:"mtu,optional" copier:"Mtu"` - Name string `json:"name,optional" copier:"Name"` - PortSecurityEnabled bool `json:"port_security_enabled,optional" copier:"PortSecurityEnabled"` - ProjectId string `json:"project_id,optional" copier:"ProjectId"` - QosPolicyId string `json:"qos_policy_id,optional" copier:"QosPolicyId"` - RevisionNumber int64 `json:"revision_number,optional" copier:"RevisionNumber"` - Shared bool `json:"shared,optional" copier:"Shared"` - RouterExternal bool `json:"router_external,optional" copier:"RouterExternal"` - Status string `json:"status,optional" copier:"Status"` - Subnets []string `json:"subnets,optional" copier:"Subnets"` - Tags []string `json:"tags,optional" copier:"Tags"` - TenantId string `json:"tenant_id,optional" copier:"TenantId"` - UpdatedAt string `json:"updated_at,optional" copier:"UpdatedAt"` - VlanTransparent bool `json:"vlan_transparent,optional" copier:"VlanTransparent"` - Description string `json:"description,optional" copier:"Description"` - IsDefault bool `json:"is_default,optional" copier:"IsDefault"` - } `json:"network" copier:"Network"` - Msg string `json:"msg" copier:"Msg"` - Code int32 `json:"code" copier:"Code"` - ErrorMsg string `json:"error_msg" copier:"ErrorMsg"` -} - -type UpdateNetworkSegmentRangesReq struct { - Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` - NetworkSegmentRange struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - } `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` +type DeleteSubnetReq struct { + SubnetId string `json:"subnet_id,optional" copier:"subnetId"` Platform string `form:"platform,optional" copier:"Platform"` } -type UpdateNetworkSegmentRangesResp struct { - NetworkSegmentRange struct { - Id string `json:"id,optional" copier:"id"` - Name string `json:"name,optional" copier:"name"` - Description string `json:"description,optional" copier:"description"` - Shared bool `json:"shared,optional" copier:"shared"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Network_type string `json:"network_type,optional" copier:"network_type"` - Physical_network string `json:"physical_network,optional" copier:"physical_network"` - Minimum uint32 `json:"minimum,optional" copier:"minimum"` - Maximum uint32 `json:"maximum,optional" copier:"maximum"` - Available []uint32 `json:"available,optional" copier:"available"` - Used Used `json:"used,optional" copier:"used"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - } `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` +type DeleteSubnetResp struct { Code int32 `json:"code,omitempty" copier:"Code"` Msg string `json:"msg,omitempty" copier:"Msg"` ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type UpdatePortReq struct { - Port_id string `json:"port_id,optional" copier:"port_id"` - Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - } `json:"port,optional" copier:"port"` - Platform string `form:"platform,optional" copier:"platform"` -} - -type UpdatePortResp struct { - Port struct { - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` - Dns_name string `json:"dns_name,optional" copier:"dns_name"` - Name string `json:"name,optional" copier:"name"` - Network_id string `json:"network_id,optional" copier:"network_id"` - Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` - Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` - Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` - Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` - Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` - Created_at string `json:"created_at,optional" copier:"created_at"` - Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` - Description string `json:"description,optional" copier:"description"` - Device_id string `json:"device_id,optional" copier:"device_id"` - Device_owner string `json:"device_owner,optional" copier:"device_owner"` - Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` - Id string `json:"id,optional" copier:"id"` - Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` - Mac_address string `json:"mac_address,optional" copier:"mac_address"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Security_groups []string `json:"security_groups,optional" copier:"revision_number"` - Status uint32 `json:"status,optional" copier:"revision_number"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` - Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` - } `json:"port,optional" copier:"port"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type UpdateRouterReq struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Platform string `form:"platform,optional" copier:"Platform"` -} - -type UpdateRouterResp struct { - Router struct { - Name string `json:"name,optional" copier:"name"` - External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` - Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` - Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` - Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Description string `json:"description,optional" copier:"description"` - Distributed bool `json:"distributed,optional" copier:"distributed"` - Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` - Ha bool `json:"ha,optional" copier:"ha"` - Id string `json:"id,optional" copier:"id"` - Routers []Routers `json:"routers,optional" copier:"routers"` - Status string `json:"status,optional" copier:"status"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` - } `json:"router,optional" copier:"router"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type UpdateSecurityGroupReq struct { - Platform string `form:"platform,optional" copier:"Platform"` - Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` -} - -type UpdateSecurityGroupResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` - Security_group struct { - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Name string `json:"name,optional" copier:"name"` - Project_id string `json:"project_id,optional" copier:"project_id"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Created_at int64 `json:"created_at,optional" copier:"created_at"` - Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` - Tags []string `json:"tags,optional" copier:"tags"` - Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` - Stateful bool `json:"stateful,optional" copier:"stateful"` - Shared bool `json:"shared,optional" copier:"shared"` - Security_group_rules []Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` - } `json:"security_group,optional" copier:"security_group"` -} - -type UpdateServerReq struct { - ServerId string `form:"server_id" copier:"ServerId"` - ServerUpdate struct { - Server Server `json:"server" copier:"Server"` - } `json:"server_update" copier:"ServerUpdate"` - Platform string `form:"platform,optional"` -} - -type UpdateServerResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Server struct { - AccessIPv4 string `json:"accessIPv4" copier:"AccessIPv4"` - AccessIPv6 string `json:"accessIPv6" copier:"AccessIPv6"` - Addresses Addresses `json:"addresses" copier:"Addresses"` - Name string `json:"name" copier:"Name"` - ConfigDrive string `json:"config_drive" copier:"ConfigDrive"` - Created string `json:"created" copier:"Created"` - Flavor FlavorDetailed `json:"flavor" copier:"Flavor"` - HostId string `json:"hostId" copier:"HostId"` - Id string `json:"id" copier:"Id"` - Image ImageDetailed `json:"image" copier:"Image"` - KeyName string `json:"key_name" copier:"KeyName"` - Links1 []Links1 `json:"links" copier:"Links1"` - Metadata MetadataDetailed `json:"metadata" copier:"Metadata"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` - Fault Fault `json:"fault" copier:"Fault"` - Progress uint32 `json:"progress" copier:"Progress"` - Locked bool `json:"locked" copier:"Locked"` - HostStatus string `json:"host_status" copier:"HostStatus"` - Description string `json:"description" copier:"Description"` - Tags []string `json:"tags" copier:"Tags"` - TrustedImageCertificates string `json:"trusted_image_certificates" copier:"TrustedImageCertificates"` - ServerGroups string `json:"server_groups" copier:"ServerGroups"` - LockedReason string `json:"locked_reason" copier:"LockedReason"` - SecurityGroups []Security_groups `json:"security_groups" copier:"SecurityGroups"` - } `json:"server" copier:"Server"` -} - type UpdateSubnetReq struct { SubnetId string `json:"subnet_id,optional" copier:"subnetId"` Platform string `form:"platform,optional" copier:"Platform"` @@ -7223,162 +4058,930 @@ type UpdateSubnetResp struct { ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type UpdateTenantReq struct { - Tenants []TenantInfo `json:"tenants"` +type CreateNetworkSegmentRangeReq struct { + NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Platform string `json:"platform,optional" copier:"Platform"` } -type UpdateVolumeReq struct { - Volume struct { - Size int32 `json:"size" copier:"Size"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Description string `json:"description" copier:"Description"` - Name string `json:"name" copier:"Name"` - VolumeType string `json:"volume_type" copier:"VolumeType"` - } `json:"volume" copier:"Volume"` - VolumeId string `json:"volume_id" copier:"VolumeId"` - Platform string `form:"platform,optional"` +type CreateNetworkSegmentRangeResp struct { + NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type UpdateVolumeResp struct { - Volume struct { - Size int32 `json:"size" copier:"Size"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Description string `json:"description" copier:"Description"` - Name string `json:"name" copier:"Name"` - VolumeType string `json:"volume_type" copier:"VolumeType"` - } `json:"volume" copier:"Volume"` - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` -} - -type UploadAlgorithmCodeReq struct { - AdapterId string `json:"adapterId"` - ClusterId string `json:"clusterId"` - ResourceType string `json:"resourceType"` - Card string `json:"card"` - TaskType string `json:"taskType"` - Dataset string `json:"dataset"` - Algorithm string `json:"algorithm"` - Code string `json:"code"` -} - -type UploadAlgorithmCodeResp struct { -} - -type UploadImageReq struct { - Name string `json:"name" copier:"name"` -} - -type UploadLinkImageReq struct { - PartId int64 `json:"partId"` - FilePath string `json:"filePath"` -} - -type UploadLinkImageResp struct { - Success bool `json:"success"` - Image *ImageSl `json:"image"` - ErrorMsg string `json:"errorMsg"` -} - -type UploadOsImageReq struct { - ImageId string `form:"image_id" copier:"ImageId"` - Platform string `form:"platform,optional"` -} - -type UploadOsImageResp struct { - Code int32 `json:"code,omitempty" copier:"Code"` - Msg string `json:"msg,omitempty" copier:"Msg"` - ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +type Network_segment_range struct { + Id string `json:"id,optional" copier:"id"` + Name string `json:"name,optional" copier:"name"` + Description string `json:"description,optional" copier:"description"` + Shared bool `json:"shared,optional" copier:"shared"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Network_type string `json:"network_type,optional" copier:"network_type"` + Physical_network string `json:"physical_network,optional" copier:"physical_network"` + Minimum uint32 `json:"minimum,optional" copier:"minimum"` + Maximum uint32 `json:"maximum,optional" copier:"maximum"` + Available []uint32 `json:"available,optional" copier:"available"` + Used Used `json:"used,optional" copier:"used"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` } type Used struct { } -type UserNotebookDomain struct { - Id string `json:"id,omitempty" copier:"Id"` // * - Name string `json:"name,omitempty" copier:"Name"` // * +type ListNetworkSegmentRangesReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `form:"platform,optional"` } -type UserNotebookResp struct { - UserNotebookDomain struct { - Id string `json:"id,omitempty" copier:"Id"` // * - Name string `json:"name,omitempty" copier:"Name"` // * - } `json:"domain,omitempty" copier:"UserNotebookDomain"` // * - Id string `json:"id,omitempty" copier:"Id"` // * - Name string `json:"name,omitempty" copier:"Name"` // * +type ListNetworkSegmentRangesResp struct { + NetworkSegmentRange []Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type Util struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` +type Network_segment_ranges struct { + Id string `json:"id,optional" copier:"id"` + Name string `json:"name,optional" copier:"name"` + Description string `json:"description,optional" copier:"description"` + Shared bool `json:"shared,optional" copier:"shared"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Network_type string `json:"network_type,optional" copier:"network_type"` + Physical_network string `json:"physical_network,optional" copier:"physical_network"` + Minimum uint32 `json:"minimum,optional" copier:"minimum"` + Maximum uint32 `json:"maximum,optional" copier:"maximum"` + Available []uint32 `json:"available,optional" copier:"available"` + Used Used `json:"used,optional" copier:"used"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` } -type VmInfo struct { - ParticipantId int64 `json:"participantId,omitempty"` - TaskId int64 `json:"taskId,omitempty"` - Name string `json:"name,omitempty"` - FlavorRef string `json:"flavor_ref,omitempty"` - ImageRef string `json:"image_ref,omitempty"` - NetworkUuid string `json:"network_uuid,omitempty"` - BlockUuid string `json:"block_uuid,omitempty"` - SourceType string `json:"source_type,omitempty"` - DeleteOnTermination bool `json:"delete_on_termination,omitempty"` - Status string `json:"status,omitempty"` - MinCount string `json:"min_count,omitempty"` - Platform string `json:"platform,omitempty"` - Uuid string `json:"uuid,omitempty"` +type DeleteNetworkSegmentRangesReq struct { + Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` + Platform string `form:"platform,optional"` } -type VmLinks struct { - Href string `json:"href " copier:"Href"` - Rel string `json:"rel" copier:"Rel"` +type DeleteNetworkSegmentRangesResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type VmOption struct { - AdapterId string `json:"adapterId"` - VmClusterIds []string `json:"vmClusterIds"` - Replicas int64 `json:"replicas,optional"` - Name string `json:"name"` - Strategy string `json:"strategy"` - ClusterToStaticWeight map[string]int32 `json:"clusterToStaticWeight"` - MatchLabels map[string]string `json:"matchLabels,optional"` - StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` - CreateMulServer []CreateMulDomainServer `json:"createMulServer,optional"` +type UpdateNetworkSegmentRangesReq struct { + Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` + NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Platform string `form:"platform,optional" copier:"Platform"` } -type VmSecurity_groups_server struct { - Name string `json:"name" copier:"Name"` +type UpdateNetworkSegmentRangesResp struct { + NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type VmTask struct { - Id string `json:"id" copier:"Id"` - Links []VmLinks `json:"links" copier:"Links"` - OSDCFDiskConfig string `json:"OS_DCF_diskConfig" copier:"OSDCFDiskConfig"` - SecurityGroups []VmSecurity_groups_server `json:"security_groups" copier:"SecurityGroups"` - AdminPass string `json:"adminPass" copier:"AdminPass"` +type ShowNetworkSegmentRangeDetailsReq struct { + Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` + Platform string `json:"platform,optional" copier:"Platform"` } -type Volume struct { - Size int32 `json:"size" copier:"Size"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Description string `json:"description" copier:"Description"` - Name string `json:"name" copier:"Name"` - VolumeType string `json:"volume_type" copier:"VolumeType"` +type ShowNetworkSegmentRangeDetailsResp struct { + NetworkSegmentRange Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type VolumeAbsolute struct { - TotalSnapshotsUsed int32 `json:"total_snapshots_used,optional"` - MaxTotalBackups int32 `json:"max_total_backups,optional"` - MaxTotalVolumeGigabytes int32 `json:"max_total_volume_gigabytes,optional"` - MaxTotalSnapshots int32 `json:"max_total_snapshots,optional"` - MaxTotalBackupGigabytes int32 `json:"max_total_backup_gigabytes,optional"` - TotalBackupGigabytesUsed int32 `json:"total_backup_gigabytes_used,optional"` - MaxTotalVolumes int32 `json:"max_total_volumes,optional"` - TotalVolumesUsed int32 `json:"total_volumes_used,optional"` - TotalBackupsUsed int32 `json:"total_backups_used,optional"` - TotalGigabytesUsed int32 `json:"total_gigabytes_used,optional"` +type CreatePortReq struct { + Port Port `json:"port,optional" copier:"port"` + Platform string `json:"platform,optional" copier:"Platform"` +} + +type Port struct { + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` + Dns_name string `json:"dns_name,optional" copier:"dns_name"` + Name string `json:"name,optional" copier:"name"` + Network_id string `json:"network_id,optional" copier:"network_id"` + Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` + Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` + Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` + Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` + Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` + Created_at string `json:"created_at,optional" copier:"created_at"` + Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` + Description string `json:"description,optional" copier:"description"` + Device_id string `json:"device_id,optional" copier:"device_id"` + Device_owner string `json:"device_owner,optional" copier:"device_owner"` + Dns_assignment Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` + Id string `json:"id,optional" copier:"id"` + Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` + Mac_address string `json:"mac_address,optional" copier:"mac_address"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Security_groups []string `json:"security_groups,optional" copier:"revision_number"` + Status uint32 `json:"status,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Updated_at string `json:"updated_at,optional" copier:"updated_at"` + Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` +} + +type Allowed_address_pairs struct { + Ip_address string `json:"ip_address,optional" copier:"ip_address"` + Mac_address string `json:"mac_address,optional" copier:"mac_address"` +} + +type CreatePortResp struct { + Port Port `json:"port,optional" copier:"port"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListPortsReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `form:"platform,optional"` +} + +type ListPortsResp struct { + Ports []PortLists `json:"ports,optional" copier:"ports"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type PortLists struct { + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Allowed_address_pairs []Allowed_address_pairs `json:"allowed_address_pairs,optional" copier:"allowed_address_pairs"` + Created_at string `json:"created_at,optional" copier:"created_at"` + Data_plane_status string `json:"data_plane_status,optional" copier:"data_plane_status"` + Description string `json:"description,optional" copier:"description"` + Device_id string `json:"device_id,optional" copier:"device_id"` + Device_owner string `json:"device_owner,optional" copier:"device_owner"` + Dns_assignment []Dns_assignment `json:"dns_assignment,optional" copier:"dns_assignment"` + Extra_dhcp_opts []Extra_dhcp_opts `json:"extra_dhcp_opts,optional" copier:"extra_dhcp_opts"` + Fixed_ips []Fixed_ips `json:"fixed_ips,optional" copier:"fixed_ips"` + Id string `json:"id,optional" copier:"id"` + Ip_allocation string `json:"ip_allocation,optional" copier:"ip_allocation"` + Mac_address string `json:"mac_address,optional" copier:"mac_address"` + Name string `json:"name,optional" copier:"name"` + Network_id string `json:"network_id,optional" copier:"network_id"` + Port_security_enabled bool `json:"port_security_enabled,optional" copier:"port_security_enabled"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Revision_number uint32 `json:"project_id,optional" copier:"project_id"` + Security_groups []string `json:"security_groups,optional" copier:"security_groups"` + Status string `json:"status,optional" copier:"status"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Updated_at string `json:"updated_at,optional" copier:"updated_at"` + Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` + Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` + Propagate_uplink_status bool `json:"propagate_uplink_status,optional" copier:"propagate_uplink_status"` + Hardware_offload_type string `json:"hardware_offload_type,optional" copier:"hardware_offload_type"` +} + +type Dns_assignment struct { + Hostname string `json:"hostname,optional" copier:"hostname"` + Ip_address string `json:"ip_address,optional" copier:"ip_address"` + Opt_name string `json:"opt_name,optional" copier:"opt_name"` +} + +type Extra_dhcp_opts struct { + Opt_value string `json:"opt_value,optional" copier:"opt_value"` + Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` + Fqdn string `json:"fqdn,optional" copier:"fqdn"` +} + +type Fixed_ips struct { + Ip_address string `json:"ip_address,optional" copier:"ip_address"` + Subnet_id string `json:"subnet_id,optional" copier:"subnet_id"` +} + +type DeletePortReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Platform string `form:"platform,optional" copier:"platform"` +} + +type DeletePortResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type UpdatePortReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Port Port `json:"port,optional" copier:"port"` + Platform string `form:"platform,optional" copier:"platform"` +} + +type UpdatePortResp struct { + Port Port `json:"port,optional" copier:"port"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ShowPortDetailsReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Fields string `json:"fields,optional" copier:"fields"` + Platform string `form:"platform,optional" copier:"platform"` +} + +type ShowPortDetailsResp struct { + Port Port `json:"port,optional" copier:"port"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListRoutersReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `form:"platform,optional"` +} + +type ListRoutersResp struct { + Routers []Routers `json:"routers,optional" copier:"routers"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Routers struct { + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` + Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Description string `json:"description,optional" copier:"description"` + Distributed string `json:"distributed,optional" copier:"distributed"` + External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` + Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` + Ha bool `json:"ha,optional" copier:"ha"` + Id bool `json:"id,optional" copier:"id"` + Name string `json:"name,optional" copier:"name"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Routes []Routes `json:"routes,optional" copier:"routes"` + Status string `json:"status,optional" copier:"status"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` + Tags []string `json:"tags,optional" copier:"tags"` + Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` +} + +type Availability_zone_hints struct { +} + +type External_gateway_info struct { + Enable_snat string `json:"enable_snat,optional" copier:"enable_snat"` + External_fixed_ips []External_fixed_ips `json:"external_fixed_ips,optional" copier:"external_fixed_ips"` + Platform string `json:"platform,optional" copier:"platform"` +} + +type External_fixed_ips struct { + Destination string `json:"destination,optional" copier:"destination"` + Subnet_id string `json:"subnet_id,optional" copier:"subnet_id"` +} + +type Routes struct { + Ip_address string `json:"ip_address,optional" copier:"ip_address"` + Nexthop string `json:"nexthop,optional" copier:"nexthop"` +} + +type Conntrack_helpers struct { + Protocol string `json:"protocol,optional" copier:"protocol"` + Helper string `json:"helper,optional" copier:"helper"` + Port uint32 `json:"port,optional" copier:"port"` +} + +type CreateRouterReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `json:"platform,optional" copier:"Platform"` +} + +type CreateRouterResp struct { + Router Router `json:"router,optional" copier:"router"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Router struct { + Name string `json:"name,optional" copier:"name"` + External_gateway_info External_gateway_info `json:"external_gateway_info,optional" copier:"external_gateway_info"` + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Availability_zone_hints []Availability_zone_hints `json:"availability_zone_hints,optional" copier:"availability_zone_hints"` + Availability_zones []string `json:"availability_zones,optional" copier:"availability_zones"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Description string `json:"description,optional" copier:"description"` + Distributed bool `json:"distributed,optional" copier:"distributed"` + Flavor_id string `json:"flavor_id,optional" copier:"flavor_id"` + Ha bool `json:"ha,optional" copier:"ha"` + Id string `json:"id,optional" copier:"id"` + Routers []Routers `json:"routers,optional" copier:"routers"` + Status string `json:"status,optional" copier:"status"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Service_type_id string `json:"service_type_id,optional" copier:"service_type_id"` + Tags []string `json:"tags,optional" copier:"tags"` + Conntrack_helpers Conntrack_helpers `json:"conntrack_helpers,optional" copier:"conntrack_helpers"` +} + +type UpdateRouterReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `form:"platform,optional" copier:"Platform"` +} + +type UpdateRouterResp struct { + Router Router `json:"router,optional" copier:"router"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ShowRouterDetailsReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `form:"platform,optional" copier:"Platform"` +} + +type ShowRouterDetailsResp struct { + Router Router `json:"router,optional" copier:"router"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type DeleteRouterReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Router_id string `json:"router_id,optional" copier:"router_id"` +} + +type DeleteRouterResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListFloatingIPsReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Limit int32 `json:"limit,optional" copier:"Limit"` + OffSet int32 `json:"offSet,optional" copier:"OffSet"` +} + +type ListFloatingIPsResp struct { + Floatingips []Floatingips `json:"floatingips,omitempty" copier:"floatingips"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Floatingips struct { + Router_id string `json:"router_id,optional" copier:"router_id"` + Description string `json:"description,optional" copier:"description"` + Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` + Dns_name string `json:"dns_name,optional" copier:"dns_name"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` + Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` + Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` + Port_id string `json:"port_id,optional" copier:"port_id"` + Id string `json:"id,optional" copier:"id"` + Status string `json:"status,optional" copier:"status"` + Port_details Port_details `json:"port_details,optional" copier:"port_details"` + Tags []string `json:"tags,optional" copier:"tags"` + Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` + Qos_network_policy_id string `json:"qos_network_policy_id,optional" copier:"qos_network_policy_id"` + Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` +} + +type Port_details struct { + Status string `json:"status,optional" copier:"status"` + Name string `json:"name,optional" copier:"name"` + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Network_id string `json:"network_id,optional" copier:"network_id"` + Device_owner string `json:"device_owner,optional" copier:"device_owner"` + Mac_address string `json:"mac_address,optional" copier:"mac_address"` + Device_id string `json:"device_id,optional" copier:"device_id"` +} + +type Port_forwardings struct { + Protocol string `json:"protocol,optional" copier:"protocol"` + Internal_ip_address string `json:"internal_ip_address,optional" copier:"internal_ip_address"` + Internal_port string `json:"internal_port,optional" copier:"internal_port"` + Internal_port_id string `json:"internal_port_id,optional" copier:"internal_port_id"` + Id string `json:"id,optional" copier:"id"` +} + +type CreateFloatingIPReq struct { + Floatingip Floatingip `json:"floatingip,optional" copier:"floatingip"` + Platform string `json:"platform,optional" copier:"Platform"` +} + +type CreateFloatingIPResp struct { + Floatingip Floatingip `json:"floatingip,omitempty" copier:"floatingip"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Floatingip struct { + Fixed_ip_address string `json:"fixed_ip_address,optional" copier:"fixed_ip_address"` + Floating_ip_address string `json:"floating_ip_address,optional" copier:"floating_ip_address"` + Floating_network_id string `json:"floating_network_id,optional" copier:"floating_network_id"` + Id string `json:"id,optional" copier:"id"` + Port_id string `json:"port_id,optional" copier:"port_id"` + Router_id string `json:"router_id,optional" copier:"router_id"` + Status string `json:"status,optional" copier:"status"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Description string `json:"description,optional" copier:"description"` + Dns_domain string `json:"dns_domain,optional" copier:"dns_domain"` + Dns_name string `json:"dns_name,optional" copier:"dns_name"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` + Port_details Port_details `json:"port_details,optional" copier:"port_details"` + Port_forwardings []Port_forwardings `json:"port_forwardings,optional" copier:"port_forwardings"` + Qos_policy_id string `json:"qos_policy_id,optional" copier:"qos_policy_id"` +} + +type UpdateFloatingIPReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` + Floatingip Floatingip `json:"floatingip,optional" copier:"floatingip"` +} + +type UpdateFloatingIPResp struct { + Floatingip Floatingip `json:"floatingip,omitempty" copier:"floatingip"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type DeleteFloatingIPReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` +} + +type DeleteFloatingIPResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ShowFloatingIPDetailsReq struct { + Platform string `json:"platform,optional" copier:"Platform"` + Floatingip_id string `json:"floatingip_id,optional" copier:"floatingip_id"` +} + +type ShowFloatingIPDetailsResp struct { + Floatingip Floatingip `json:"floatingip,omitempty" copier:"floatingip"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListFirewallGroupsReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Fields string `json:"fields,optional" copier:"fields"` +} + +type ListFirewallGroupsResp struct { + Firewall_groups Firewall_groups `json:"firewall_groups,omitempty" copier:"firewall_groups"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Firewall_groups struct { + AdminStateUp bool `json:"admin_state_up,optional" copier:"AdminStateUp"` + Description string `json:"description,optional" copier:"description"` + Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` + Id string `json:"id,optional" copier:"id"` + Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` + Name string `json:"name,optional" copier:"name"` + Ports []string `json:"ports,optional" copier:"ports"` + Shared bool `json:"shared,optional" copier:"shared"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Status string `json:"status,optional" copier:"status"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type DeleteFirewallGroupReq struct { + Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` + Platform string `form:"platform,optional" copier:"Platform"` +} + +type DeleteFirewallGroupResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type CreateFirewallGroupReq struct { + Firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Platform string `json:"platform,optional" copier:"Platform"` +} + +type CreateFirewallGroupResp struct { + Firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Firewall_group struct { + Admin_state_up bool `json:"admin_state_up,optional" copier:"admin_state_up"` + Egress_firewall_policy_id string `json:"egress_firewall_policy_id,optional" copier:"egress_firewall_policy_id"` + Ingress_firewall_policy_id string `json:"ingress_firewall_policy_id,optional" copier:"ingress_firewall_policy_id"` + Description string `json:"description,optional" copier:"description"` + Id string `json:"id,optional" copier:"id"` + Name string `json:"name,optional" copier:"name"` + Ports []string `json:"ports,optional" copier:"ports"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Shared bool `json:"shared,optional" copier:"shared"` + Status string `json:"status,optional" copier:"status"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type UpdateFirewallGroupReq struct { + Firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` +} + +type UpdateFirewallGroupResp struct { + Firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ShowFirewallGroupDetailsReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_group_id string `json:"firewall_group_id,optional" copier:"firewall_group_id"` +} + +type ShowFirewallGroupDetailsResp struct { + Firewall_group Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type CreateFirewallPolicyReq struct { + Platform string `json:"platform,optional" copier:"Platform"` + Firewall_policy Firewall_policy `json:"firewall_policy,optional" copier:"firewall_policy"` +} + +type CreateFirewallPolicyResp struct { + Firewall_policy Firewall_policy `json:"firewall_policy,optional" copier:"firewall_policy"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Firewall_policy struct { + Name string `json:"name,optional" copier:"name"` + Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` + Audited bool `json:"audited,optional" copier:"audited"` + Description string `json:"description,optional" copier:"description"` + Id string `json:"id,optional" copier:"id"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Shared bool `json:"shared,optional" copier:"shared"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type DeleteFirewallPolicyReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_policy_id string `json:"firewall_policy_id,optional" copier:"firewall_policy_id"` +} + +type DeleteFirewallPolicyResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListFirewallPoliciesReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Fields string `json:"fields,optional" copier:"fields"` +} + +type ListFirewallPoliciesResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Firewall_policies []Firewall_policies `json:"firewall_policies,optional" copier:"firewall_policies"` +} + +type Firewall_policies struct { + Audited bool `json:"audited,optional" copier:"audited"` + Description string `json:"description,optional" copier:"description"` + Firewall_rules []string `json:"firewall_rules,optional" copier:"firewall_rules"` + Id string `json:"id,optional" copier:"id"` + Name string `json:"name,optional" copier:"name"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Shared bool `json:"shared,optional" copier:"shared"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type ShowFirewallPolicyDetailsReq struct { + Platform string `json:"platform,optional" copier:"Platform"` + Firewall_policy_id string `json:"firewall_policy_id,optional" copier:"firewall_policy_id"` +} + +type ShowFirewallPolicyDetailsResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Firewall_policy Firewall_policy `json:"firewall_policy,optional" copier:"firewall_policy"` +} + +type CreateFirewallRuleReq struct { + Platform string `json:"platform,optional" copier:"Platform"` + Firewall_rule Firewall_rule `json:"firewall_rule,optional" copier:"firewall_rule"` +} + +type CreateFirewallRuleResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Firewall_rule Firewall_rule `json:"firewall_rule,optional" copier:"firewall_rule"` +} + +type Firewall_rule struct { + Action string `json:"action,optional" copier:"action"` + Description string `json:"description,optional" copier:"description"` + Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` + Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` + Destination_port string `json:"destination_port,optional" copier:"destination_port"` + Enabled bool `json:"enabled,optional" copier:"enabled"` + Id string `json:"id,optional" copier:"id"` + Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` + Name string `json:"name,optional" copier:"name"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Protocol string `json:"protocol,optional" copier:"protocol"` + Shared bool `json:"shared,optional" copier:"shared"` + Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` + Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` + Source_port string `json:"source_port,optional" copier:"source_port"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type DeleteFirewallRuleReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` +} + +type DeleteFirewallRuleResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListFirewallRulesReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Fields string `json:"fields,optional" copier:"fields"` +} + +type ListFirewallRulesResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Firewall_rules []Firewall_rules `json:"firewall_rules,optional" copier:"firewall_rules"` +} + +type Firewall_rules struct { + Action string `json:"action,optional" copier:"action"` + Description string `json:"description,optional" copier:"description"` + Destination_ip_address string `json:"destination_ip_address,optional" copier:"destination_ip_address"` + Destination_firewall_group_id string `json:"destination_firewall_group_id,optional" copier:"destination_firewall_group_id"` + Destination_port string `json:"destination_port,optional" copier:"destination_port"` + Enabled bool `json:"enabled,optional" copier:"enabled"` + Id string `json:"id,optional" copier:"id"` + Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` + Name string `json:"name,optional" copier:"name"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Protocol string `json:"protocol,optional" copier:"protocol"` + Shared bool `json:"shared,optional" copier:"shared"` + Source_firewall_group_id string `json:"source_firewall_group_id,optional" copier:"source_firewall_group_id"` + Source_ip_address string `json:"source_ip_address,optional" copier:"source_ip_address"` + Source_port string `json:"source_port,optional" copier:"source_port"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` +} + +type ShowFirewallRuleDetailsReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` +} + +type ShowFirewallRuleDetailsResp struct { + Firewall_rule Firewall_rule `json:"firewall_rule,optional" copier:"firewall_rule"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListSecurityGroupsReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Fields string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` +} + +type ListSecurityGroupsResp struct { + Security_groups Security_groups `json:"security_groups,optional" copier:"security_groups"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Security_groups struct { + Id string `json:"id,optional" copier:"id"` + Description string `json:"description,optional" copier:"description"` + Name string `json:"name,optional" copier:"name"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Stateful bool `json:"stateful,optional" copier:"stateful"` + Shared bool `json:"shared,optional" copier:"shared"` +} + +type CreateSecurityGroupReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` +} + +type CreateSecurityGroupResp struct { + Security_group Security_group `json:"security_group,optional" copier:"security_group"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Security_group struct { + Id string `json:"id,optional" copier:"id"` + Description string `json:"description,optional" copier:"description"` + Name string `json:"name,optional" copier:"name"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Stateful bool `json:"stateful,optional" copier:"stateful"` + Shared bool `json:"shared,optional" copier:"shared"` + Security_group_rules []Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` +} + +type Security_group_rules struct { + Direction string `json:"direction,optional" copier:"direction"` + Ethertype string `json:"ethertype,optional" copier:"ethertype"` + Id string `json:"id,optional" copier:"id"` + Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` + Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` + Protocol string `json:"protocol,optional" copier:"protocol"` + Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` + Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` + Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Stateful bool `json:"stateful,optional" copier:"stateful"` + Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` +} + +type DeleteSecurityGroupReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` +} + +type DeleteSecurityGroupResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type UpdateSecurityGroupReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` +} + +type UpdateSecurityGroupResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group Security_group `json:"security_group,optional" copier:"security_group"` +} + +type ShowSecurityGroupReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` + Fields string `json:"fields,optional" copier:"fields"` + Verbose string `json:"verbose,optional" copier:"verbose"` +} + +type ShowSecurityGroupResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group Security_group `json:"security_group,optional" copier:"security_group"` +} + +type ListSecurityGroupRulesReq struct { + Platform string `form:"platform,optional" copier:"Platform"` +} + +type ListSecurityGroupRulesResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group_rules Security_group_rules `json:"security_group_rules,optional" copier:"security_group_rules"` +} + +type CreateSecurityGroupRuleReq struct { + Platform string `json:"platform,optional" copier:"Platform"` +} + +type CreateSecurityGroupRuleResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group_rule Security_group_rule `json:"security_group_rule,optional" copier:"security_group_rule"` +} + +type Security_group_rule struct { + Direction string `json:"direction,optional" copier:"direction"` + Ethertype string `json:"ethertype,optional" copier:"ethertype"` + Id string `json:"id,optional" copier:"id"` + Port_range_max int64 `json:"port_range_max,optional" copier:"port_range_max"` + Port_range_min int64 `json:"port_range_min,optional" copier:"port_range_min"` + Protocol string `json:"protocol,optional" copier:"protocol"` + Remote_group_id string `json:"remote_group_id,optional" copier:"remote_group_id"` + Remote_ip_prefix string `json:"remote_ip_prefix,optional" copier:"remote_ip_prefix"` + Security_group_id string `json:"security_group_id,optional" copier:"security_group_id"` + Project_id string `json:"project_id,optional" copier:"project_id"` + Created_at int64 `json:"created_at,optional" copier:"created_at"` + Updated_at int64 `json:"updated_at,optional" copier:"updated_at"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Tags []string `json:"tags,optional" copier:"tags"` + Tenant_id string `json:"tenant_id,optional" copier:"tenant_id"` + Stateful bool `json:"stateful,optional" copier:"stateful"` + Belongs_to_default_sg bool `json:"belongs_to_default_sg,optional" copier:"belongs_to_default_sg"` +} + +type ShowSecurityGroupRuleReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"` +} + +type ShowSecurityGroupRuleResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group_rule Security_group_rule `json:"security_group_rule,optional" copier:"security_group_rule"` +} + +type DeleteSecurityGroupRuleReq struct { + Platform string `form:"platform,optional" copier:"Platform"` + Security_group_rule_id string `json:"security_group_rule_id,optional" copier:"security_group_rule_id"` +} + +type DeleteSecurityGroupRuleResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` + Security_group_rule Security_group_rule `json:"security_group_rule,optional" copier:"security_group_rule"` +} + +type ListVolumesDetailReq struct { + Platform string `form:"platform,optional"` +} + +type ListVolumesDetailResp struct { + VolumeDetail []VolumeDetail `json:"volumes" copier:"VolumeDetail"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` } type VolumeDetail struct { @@ -7401,63 +5004,37 @@ type VolumeDetail struct { Consumes_quota bool `json:"consumes_quota" copier:"consumes_quota"` } -type VolumeDetailed struct { - CreatedAt string `json:"created_at" copier:"CreatedAt"` - Id string `json:"id" copier:"Id"` - AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` - Encrypted bool `json:"encrypted" copier:"Encrypted"` - Name string `json:"name" copier:"Name"` +type DeleteVolumeReq struct { + VolumeId string `form:"volume_id" copier:"VolumeId"` + Cascade bool `json:"cascade" copier:"Cascade"` + Force bool `json:"force" copier:"force"` + Platform string `form:"platform,optional"` +} + +type DeleteVolumeResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type CreateVolumeReq struct { + Volume Volume `json:"volume" copier:"Volume"` + Platform string `json:"platform,optional"` +} + +type CreateVolumeResp struct { + Volume VolumeResp `json:"volume" copier:"Volume"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type Volume struct { Size int32 `json:"size" copier:"Size"` - Status string `json:"status" copier:"Status"` - TenantId string `json:"tenant_id" copier:"TenantId"` - Updated string `json:"updated" copier:"Updated"` - UserId string `json:"user_id" copier:"UserId"` + AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` Description string `json:"description" copier:"Description"` - Multiattach bool `json:"multiattach" copier:"Multiattach"` - Bootable string `json:"bootable" copier:"Bootable"` + Name string `json:"name" copier:"Name"` VolumeType string `json:"volume_type" copier:"VolumeType"` - Count int32 `json:"count" copier:"Count"` - SharedTargets bool `json:"shared_targets" copier:"SharedTargets"` - ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` -} - -type VolumeLimits struct { - Rate VolumeRate `json:"rate,optional"` - Absolute struct { - TotalSnapshotsUsed int32 `json:"total_snapshots_used,optional"` - MaxTotalBackups int32 `json:"max_total_backups,optional"` - MaxTotalVolumeGigabytes int32 `json:"max_total_volume_gigabytes,optional"` - MaxTotalSnapshots int32 `json:"max_total_snapshots,optional"` - MaxTotalBackupGigabytes int32 `json:"max_total_backup_gigabytes,optional"` - TotalBackupGigabytesUsed int32 `json:"total_backup_gigabytes_used,optional"` - MaxTotalVolumes int32 `json:"max_total_volumes,optional"` - TotalVolumesUsed int32 `json:"total_volumes_used,optional"` - TotalBackupsUsed int32 `json:"total_backups_used,optional"` - TotalGigabytesUsed int32 `json:"total_gigabytes_used,optional"` - } `json:"absolute,optional"` -} - -type VolumeNode struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` -} - -type VolumeRate struct { -} - -type VolumeReq struct { - Capacity int64 `json:"capacity,optional" copier:"Capacity"` - Category string `json:"category" copier:"Category"` - Ownership string `json:"ownership" copier:"Ownership"` - Uri string `json:"uri,optional" copier:"Uri"` -} - -type VolumeRes struct { - Capacity int64 `json:"capacity,omitempty" copier:"Capacity"` - Category string `json:"category,omitempty" copier:"Category"` - MountPath string `json:"mountPath,omitempty" copier:"MountPath"` - Ownership string `json:"ownership,omitempty" copier:"Ownership"` - Status string `json:"status,omitempty" copier:"Status"` } type VolumeResp struct { @@ -7480,125 +5057,440 @@ type VolumeResp struct { ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` } -type VolumeType struct { - Name string `json:"name" copier:"Name"` - Description string `json:"description" copier:"Description"` - ExtraSpecs struct { - Capabilities string `json:"capabilities" copier:"Capabilities"` - } `json:"extra_specs" copier:"ExtraSpecs"` - Id string `json:"id" copier:"Id"` - IsPublic bool `json:"is_public" copier:"IsPublic"` +type ListVolumeTypesReq struct { + Platform string `form:"platform,optional"` +} + +type ListVolumeTypesResp struct { + VolumeTypes []Volume_types `json:"volume_types" copier:"VolumeTypes"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } type Volume_types struct { - Description string `json:"description" copier:"Description"` - Id string `json:"id" copier:"Id"` - IsPublic bool `json:"is_public" copier:"IsPublic"` - Name string `json:"name" copier:"Name"` - OsVolumeTypeAccessIsPublic bool `json:"os_volume_type_access_is_public" copier:"OsVolumeTypeAccessIsPublic"` - QosSpecsId string `json:"qos_specs_id" copier:"QosSpecsId"` - ExtraSpecs struct { - Capabilities string `json:"capabilities" copier:"Capabilities"` - } `json:"extra_specs" copier:"ExtraSpecs"` + Description string `json:"description" copier:"Description"` + Id string `json:"id" copier:"Id"` + IsPublic bool `json:"is_public" copier:"IsPublic"` + Name string `json:"name" copier:"Name"` + OsVolumeTypeAccessIsPublic bool `json:"os_volume_type_access_is_public" copier:"OsVolumeTypeAccessIsPublic"` + QosSpecsId string `json:"qos_specs_id" copier:"QosSpecsId"` + ExtraSpecs Extra_specs `json:"extra_specs" copier:"ExtraSpecs"` } -type Volumes struct { - Nfs *Nfs `json:"nfs,optional"` +type Extra_specs struct { + Capabilities string `json:"capabilities" copier:"Capabilities"` +} + +type UpdateVolumeReq struct { + Volume Volume `json:"volume" copier:"Volume"` + VolumeId string `json:"volume_id" copier:"VolumeId"` + Platform string `form:"platform,optional"` +} + +type UpdateVolumeResp struct { + Volume Volume `json:"volume" copier:"Volume"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type GetVolumeDetailedByIdReq struct { + VolumeId string `form:"volume_id" copier:"VolumeId"` + Platform string `form:"platform,optional"` +} + +type GetVolumeDetailedByIdResp struct { + Volume VolumeDetailed `json:"volume" copier:"Volume"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type VolumeDetailed struct { + CreatedAt string `json:"created_at" copier:"CreatedAt"` + Id string `json:"id" copier:"Id"` + AvailabilityZone string `json:"availability_zone" copier:"AvailabilityZone"` + Encrypted bool `json:"encrypted" copier:"Encrypted"` + Name string `json:"name" copier:"Name"` + Size int32 `json:"size" copier:"Size"` + Status string `json:"status" copier:"Status"` + TenantId string `json:"tenant_id" copier:"TenantId"` + Updated string `json:"updated" copier:"Updated"` + UserId string `json:"user_id" copier:"UserId"` + Description string `json:"description" copier:"Description"` + Multiattach bool `json:"multiattach" copier:"Multiattach"` + Bootable string `json:"bootable" copier:"Bootable"` + VolumeType string `json:"volume_type" copier:"VolumeType"` + Count int32 `json:"count" copier:"Count"` + SharedTargets bool `json:"shared_targets" copier:"SharedTargets"` + ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` +} + +type CreateVolumeTypeReq struct { + VolumeType VolumeType `json:"volume_type" copier:"VolumeType"` + Platform string `json:"platform,optional"` +} + +type CreateVolumeTypeResp struct { + VolumeType VolumeType `json:"volume_type" copier:"VolumeType"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type VolumeType struct { + Name string `json:"name" copier:"Name"` + Description string `json:"description" copier:"Description"` + ExtraSpecs ExtraSpecs `json:"extra_specs" copier:"ExtraSpecs"` + Id string `json:"id" copier:"Id"` + IsPublic bool `json:"is_public" copier:"IsPublic"` +} + +type DeleteVolumeTypeReq struct { + VolumeTypeId string `json:"volume_type_id" copier:"VolumeTypeId"` + Platform string `form:"platform,optional"` +} + +type DeleteVolumeTypeResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + +type ListVolumesReq struct { + ProjectId string `json:"project_id" copier:"ProjectId"` + AllTenants string `json:"all_tenants" copier:"AllTenants"` + Sort string `json:"sort" copier:"Sort"` + Limit int32 `json:"limit" copier:"Limit"` + Offset int32 `json:"offset" copier:"Offset"` + Marker string `json:"marker" copier:"Marker"` + WithCount bool `json:"with_count" copier:"WithCount"` + CreatedAt string `json:"created_at" copier:"CreatedAt"` + ConsumesQuota bool `json:"consumes_quota" copier:"ConsumesQuota"` + UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` + Platform string `form:"platform,optional"` +} + +type ListVolumesResp struct { + Volumes []VolumesList `json:"volumes" copier:"Volumes"` + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } type VolumesList struct { Id string `json:"id" copier:"Id"` - Links struct { - Href string `json:"href " copier:"Href"` - Rel string `json:"rel" copier:"Rel"` - } `json:"links" copier:"Links"` - Name string `json:"name" copier:"Name"` + Links Links `json:"links" copier:"Links"` + Name string `json:"name" copier:"Name"` } -type WorkPath struct { - Name string `json:"name,optional" copier:"name"` - OutputPath string `json:"outputPath,optional" copier:"OutputPath"` - Path string `json:"path,optional" copier:"Path"` - Type string `json:"type,optional" copier:"type"` - VersionId string `json:"versionId,optional" copier:"VersionId"` - VersionName string `json:"versionName,optional" copier:"VersionName"` +type ListFlavorsDetailReq struct { + Platform string `form:"platform,optional"` } -type AdapterInfoNameReq struct { - AdapterId string `form:"adapterId,optional"` +type ListFlavorsDetailResp struct { + Flavor []Flavors `json:"flavors" copier:"Flavor"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` } -type AdapterInfoNameReqResp struct { +type Flavors struct { + Name string `json:"name" copier:"name"` + Description string `json:"description" copier:"description"` + Id string `json:"id" copier:"id"` + Disk int32 `json:"disk" copier:"disk"` + Ephemeral uint32 `json:"ephemeral" copier:"ephemeral"` + Original_name string `json:"original_name" copier:"original_name"` + Ram int32 `json:"ram" copier:"ram"` + Swap int32 `json:"swap" copier:"swap"` + Vcpus int32 `json:"vcpus" copier:"vcpus"` + Rxtx_factor float32 `json:"rxtx_factor" copier:"rxtx_factor"` + Os_flavor_access_is_public bool `json:"os_flavor_access_is_public" copier:"os_flavor_access_is_public"` +} + +type ListNodesReq struct { + Platform string `form:"platform,optional"` + Limit int64 `json:"limit" copier:"Limit"` + Marker string `json:"marker" copier:"Marker"` + SortDir string `json:"sort_dir" copier:"SortDir"` + SortKey string `json:"sort_key" copier:"SortKey"` + InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` + Maintenance bool `json:"maintenance" copier:"Maintenance"` + Associated bool `json:"associated" copier:"Associated"` + ProvisionState string `json:"provision_state" copier:"ProvisionState"` + Sharded bool `json:"sharded" copier:"Sharded"` + Driver string `json:"driver" copier:"Driver"` + ResourceClass string `json:"resource_class" copier:"ResourceClass"` + ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` + Conductor string `json:"conductor" copier:"Conductor"` + Fault string `json:"fault" copier:"Fault"` + Owner string `json:"owner" copier:"Owner"` + Lessee string `json:"lessee" copier:"Lessee"` + Shard []string `json:"shard" copier:"Shard"` + Detail bool `json:"detail" copier:"Detail"` + ParentNode string `json:"parent_node" copier:"ParentNode"` + IncludeChildren string `json:"include_children" copier:"IncludeChildren"` +} + +type ListNodesResp struct { + Nodes []Nodes `json:"nodes" copier:"Nodes"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Nodes struct { + InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` + Links []Links `json:"links" copier:"Links"` + Maintenance bool `json:"maintenance" copier:"Maintenance"` + Name string `json:"name" copier:"Name"` + PowerState string `json:"power_state" copier:"PowerState"` + ProvisionState string `json:"provision_state" copier:"ProvisionState"` + Uuid string `json:"uuid" copier:"Uuid"` +} + +type CreateNodeReq struct { + Platform string `json:"platform,optional"` + Name string `json:"name" copier:"Name"` + Driver string `json:"driver" copier:"Driver"` + DriverInfo DriverInfo `json:"driver_info" copier:"DriverInfo"` + ResourceClass string `json:"resource_class" copier:"ResourceClass"` + BootInterface string `json:"boot_interface" copier:"BootInterface"` + ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` + ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` + DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` + InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` + ManagementInterface string `json:"inspect_interface" copier:"ManagementInterface"` + NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` + RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` + StorageInterface string `json:"storage_interface" copier:"StorageInterface"` + Uuid string `json:"uuid" copier:"Uuid"` + VendorInterface string `json:"vendor_interface" copier:"VendorInterface"` + Owner string `json:"owner" copier:"Owner"` + Description string `json:"description" copier:"Description"` + Lessee string `json:"lessee" copier:"Lessee"` + Shard string `json:"shard" copier:"Shard"` + Properties Properties `json:"properties" copier:"Properties"` + AutomatedClean bool `json:"automated_clean" copier:"AutomatedClean"` + BiosInterface string `json:"bios_interface" copier:"BiosInterface"` + ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` + InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` + Maintenance bool `json:"maintenance" copier:"Maintenance"` + MaintenanceReason bool `json:"maintenance_reason" copier:"MaintenanceReason"` + NetworkData NetworkData `json:"network_data" copier:"NetworkData"` + Protected bool `json:"protected" copier:"Protected"` + ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` + Retired bool `json:"retired" copier:"Retired"` + RetiredReason string `json:"retired_reason" copier:"RetiredReason"` +} + +type DriverInfo struct { +} + +type Properties struct { +} + +type NetworkData struct { +} + +type CreateNodeResp struct { + AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"` + Name string `json:"name" copier:"name"` + PowerState string `json:"power_state" copier:"PowerState"` + TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"` + ProvisionState string `json:"provision_state" copier:"ProvisionState"` + TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"` + Maintenance bool `json:"maintenance" copier:"Maintenance"` + MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"` + Fault string `json:"fault" copier:"Fault"` + LastError string `json:"last_error" copier:"LastError"` + Reservation string `json:"reservation" copier:"Reservation"` + Driver string `json:"driver" copier:"Driver"` + DriverInfo Driver_info `json:"driver_info" copier:"DriverInfo"` + DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"` + Properties Properties `json:"properties" copier:"Properties"` + InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"` + InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` + ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` + Extra Extra `json:"extra" copier:"Extra"` + ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"` + RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"` + TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"` + CleanStep CleanStep `json:"clean_step" copier:"CleanStep"` + DeployStep DeployStep `json:"clean_step" copier:"DeployStep"` + Links []Links `json:"links" copier:"Links"` + Ports []Ports `json:"ports" copier:"Ports"` + Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"` + States []States `json:"states" copier:"States"` + ResourceClass string `json:"resource_class" copier:"ResourceClass"` + BootInterface string `json:"boot_interface" copier:"BootInterface"` + ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` + DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` + ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` + InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` + ManagementInterface string `json:"management_interface" copier:"ManagementInterface"` + NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` + PowerInterface string `json:"power_interface" copier:"PowerInterface"` + RaidInterface string `json:"raid_interface" copier:"RaidInterface"` + RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` + StorageInterface string `json:"storage_interface" copier:"StorageInterface"` + Traits []string `json:"traits" copier:"Traits"` + Volume []VolumeNode `json:"volume" copier:"Volume"` + Protected bool `json:"protected" copier:"Protected"` + ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` + Conductor string `json:"conductor" copier:"Conductor"` + Owner string `json:"owner" copier:"Owner"` + Lessee string `json:"lessee" copier:"Lessee"` + Shard string `json:"shard" copier:"Shard"` + Description string `json:"description" copier:"Description"` + AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"` + BiosInterface string `json:"bios_interface" copier:"BiosInterface"` + NetworkData NetworkData `json:"network_data" copier:"NetworkData"` + Retired bool `json:"retired" copier:"Retired"` + RetiredReason string `json:"retired_reason" copier:"RetiredReason"` + CreatedAt string `json:"created_at" copier:"CreatedAt"` + InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"` + InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"` + UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` + Uuid string `json:"uuid" copier:"uuid"` + ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type Driver_info struct { + Ipmi_password string `json:"ipmi_password" copier:"ipmi_password"` + Ipmi_username string `json:"ipmi_username" copier:"ipmi_username"` +} + +type DriverInternalInfo struct { +} + +type InstanceInfo struct { +} + +type Extra struct { +} + +type RaidConfig struct { +} + +type TargetRaidConfig struct { +} + +type CleanStep struct { +} + +type DeployStep struct { +} + +type Ports struct { + Href string `json:"href" copier:"href"` + Rel string `json:"rel" copier:"rel"` +} + +type Portgroups struct { + Href string `json:"href" copier:"href"` + Rel string `json:"rel" copier:"rel"` +} + +type States struct { + Href string `json:"href" copier:"href"` + Rel string `json:"rel" copier:"rel"` +} + +type VolumeNode struct { + Href string `json:"href" copier:"href"` + Rel string `json:"rel" copier:"rel"` +} + +type DeleteNodeReq struct { + Platform string `json:"platform,optional"` + NodeIdent string `json:"node_ident" copier:"NodeIdent"` +} + +type DeleteNodeResp struct { Code int32 `json:"code,omitempty"` Msg string `json:"msg,omitempty"` ErrorMsg string `json:"errorMsg,omitempty"` - InfoList struct { - Type string `json:"type,omitempty"` - ResourceType string `json:"resource_type,omitempty"` - TName string `json:"name,omitempty"` - InfoName string `json:"info_name,omitempty"` - } `json:"infoList,omitempty"` } -type AdapterInfoReq struct { - ClusterId string `form:"clusterId"` +type ShowNodeDetailsReq struct { + NodeIdent string `json:"node_ident" copier:"NodeIdent"` + Fields []Fields `json:"fields" copier:"Fields"` + Platform string `json:"platform,optional"` } -type AdapterInfoResp struct { - Name string `json:"name"` - Version string `json:"version"` +type Fields struct { } -type AlertListReq struct { - AlertType string `form:"alertType"` - AdapterId string `form:"adapterId,optional"` - ClusterId string `form:"clusterId,optional"` -} - -type AlertListResp struct { - AlertMap map[string]interface{} `json:"alertMap"` -} - -type AsynCommitAiTaskReq struct { - Name string `json:"name,optional"` - AdapterIds []string `json:"adapterIds,optional"` - ClusterIds []string `json:"clusterIds,optional"` - Strategy string `json:"strategy,optional"` - StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` - Replicas int64 `json:"replicas,optional"` - ImageId string `json:"imageId,optional"` - Command string `json:"command,optional"` - FlavorId string `json:"flavorId,optional"` - Status string `json:"status,optional"` - ClusterId int64 `json:"clusterId,optional"` - AdapterId string `json:"adapterId,optional"` -} - -type AsynCommitAiTaskResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - TaskId int64 `json:"taskId"` -} - -type CancelJobReq struct { - ClusterId int64 `form:"clusterId"` - JobId string `form:"jobId"` -} - -type CenterResourcesResp struct { - CentersIndex []CenterIndex `json:"centersIndex"` -} - -type CheckReq struct { - FileMd5 string `path:"fileMd5"` -} - -type CheckResp struct { - Exist bool `json:"exist"` -} - -type CloudListResp struct { - Clouds []Cloud `json:"clouds"` +type ShowNodeDetailsResp struct { + AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"` + Name string `json:"name" copier:"name"` + PowerState string `json:"power_state" copier:"PowerState"` + TargetPowerState string `json:"target_power_state" copier:"TargetPowerState"` + ProvisionState string `json:"provision_state" copier:"ProvisionState"` + TargetProvisionState string `json:"target_provision_state" copier:"TargetProvisionState"` + Maintenance bool `json:"maintenance" copier:"Maintenance"` + MaintenanceReason string `json:"maintenance_reason" copier:"MaintenanceReason"` + Fault string `json:"fault" copier:"Fault"` + LastError string `json:"last_error" copier:"LastError"` + Reservation string `json:"reservation" copier:"Reservation"` + Driver string `json:"driver" copier:"Driver"` + DriverInfo Driver_info `json:"driver_info" copier:"DriverInfo"` + DriverInternalInfo DriverInternalInfo `json:"driver_internal_info" copier:"DriverInternalInfo"` + Properties Properties `json:"properties" copier:"Properties"` + InstanceInfo InstanceInfo `json:"instance_info" copier:"InstanceInfo"` + InstanceUuid string `json:"instance_uuid" copier:"InstanceUuid"` + ChassisUuid string `json:"chassis_uuid" copier:"ChassisUuid"` + Extra Extra `json:"extra" copier:"Extra"` + ConsoleEnabled bool `json:"console_enabled" copier:"ConsoleEnabled"` + RaidConfig RaidConfig `json:"raid_config" copier:"RaidConfig"` + TargetRaidConfig TargetRaidConfig `json:"target_raid_config" copier:"TargetRaidConfig"` + CleanStep CleanStep `json:"clean_step" copier:"CleanStep"` + DeployStep DeployStep `json:"clean_step" copier:"DeployStep"` + Links []Links `json:"links" copier:"Links"` + Ports []Ports `json:"ports" copier:"Ports"` + Portgroups []Portgroups `json:"portgroups" copier:"Portgroups"` + States []States `json:"states" copier:"States"` + ResourceClass string `json:"resource_class" copier:"ResourceClass"` + BootInterface string `json:"boot_interface" copier:"BootInterface"` + ConsoleInterface string `json:"console_interface" copier:"ConsoleInterface"` + DeployInterface string `json:"deploy_interface" copier:"DeployInterface"` + ConductorGroup string `json:"conductor_group" copier:"ConductorGroup"` + InspectInterface string `json:"inspect_interface" copier:"InspectInterface"` + ManagementInterface string `json:"management_interface" copier:"ManagementInterface"` + NetworkInterface string `json:"network_interface" copier:"NetworkInterface"` + PowerInterface string `json:"power_interface" copier:"PowerInterface"` + RaidInterface string `json:"raid_interface" copier:"RaidInterface"` + RescueInterface string `json:"rescue_interface" copier:"RescueInterface"` + StorageInterface string `json:"storage_interface" copier:"StorageInterface"` + Traits []string `json:"traits" copier:"Traits"` + Volume []VolumeNode `json:"volume" copier:"Volume"` + Protected bool `json:"protected" copier:"Protected"` + ProtectedReason string `json:"protected_reason" copier:"ProtectedReason"` + Conductor string `json:"conductor" copier:"Conductor"` + Owner string `json:"owner" copier:"Owner"` + Lessee string `json:"lessee" copier:"Lessee"` + Shard string `json:"shard" copier:"Shard"` + Description string `json:"description" copier:"Description"` + AutomatedClean string `json:"automated_clean" copier:"AutomatedClean"` + BiosInterface string `json:"bios_interface" copier:"BiosInterface"` + NetworkData NetworkData `json:"network_data" copier:"NetworkData"` + Retired bool `json:"retired" copier:"Retired"` + RetiredReason string `json:"retired_reason" copier:"RetiredReason"` + CreatedAt string `json:"created_at" copier:"CreatedAt"` + InspectionFinishedAt string `json:"inspection_finished_at" copier:"InspectionFinishedAt"` + InspectionStartedAt string `json:"inspection_started_at" copier:"InspectionStartedAt"` + UpdatedAt string `json:"updated_at" copier:"UpdatedAt"` + Uuid string `json:"uuid" copier:"uuid"` + ProvisionUpdatedAt string `json:"provision_updated_at" copier:"ProvisionUpdatedAt"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` } type ClusterInfoReq struct { @@ -7614,240 +5506,404 @@ type ClusterInfoResp struct { TaskFailedNum int `json:"taskFailedNum"` } -type ClusterSumReq struct { +type ControllerMetricsReq struct { + Metrics []string `form:"metrics"` + ParticipantId int64 `form:"participantId"` + Pod string `form:"pod,optional"` + WorkloadName string `form:"workloadName,optional"` + Steps string `form:"steps"` + Start string `form:"start"` + End string `form:"end"` + Level string `form:"level,optional"` } -type ClusterSumReqResp struct { - PodSum int `json:"podSum,omitempty"` - VmSum int `json:"vmSum,omitempty"` - AdapterSum int `json:"AdapterSum,omitempty"` - TaskSum int `json:"TaskSum,omitempty"` -} - -type ClustersLoadReq struct { - ClusterName string `form:"clusterName"` -} - -type ClustersLoadResp struct { - Data interface{} `json:"data"` -} - -type CommitHpcTaskReq struct { - 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"` -} - -type CommitHpcTaskResp struct { - TaskId int64 `json:"taskId"` - Code int32 `json:"code"` - Msg string `json:"msg"` -} - -type CommitTaskReq struct { - Name string `json:"name"` - NsID string `json:"nsID"` - Replicas int64 `json:"replicas,optional"` - MatchLabels map[string]string `json:"matchLabels,optional"` - YamlList []string `json:"yamlList"` - ClusterName string `json:"clusterName"` -} - -type CommitVmTaskReq struct { - Name string `json:"name"` - AdapterIds []string `json:"adapterIds,optional"` - ClusterIds []string `json:"clusterIds"` - Strategy string `json:"strategy"` - StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` - MinCount int64 `json:"min_count,optional"` - ImageRef int64 `json:"imageRef,optional"` - FlavorRef int64 `json:"flavorRef,optional"` - Uuid int64 `json:"uuid,optional"` - Replicas int64 `json:"replicas,optional"` - VmName string `json:"vm_name,optional"` -} - -type CommitVmTaskResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` -} - -type CpResp struct { - POpsAtFp16 float32 `json:"pOpsAtFp16"` +type RegisterClusterReq struct { + Name string `form:"name"` // 名称 + Address string `form:"address"` // 地址 + Token string `form:"token"` // 数算集群token + MetricsUrl string `form:"metricsUrl"` //监控url } type DeleteClusterReq struct { Name string `form:"name"` // 名称 } -type DeleteTaskReq struct { - Id int64 `path:"id"` -} - -type GetClusterByIdReq struct { - ClusterId int32 `path:"clusterId"` -} - -type GetClusterByIdResp struct { - ClusterInfo struct { - Id string `json:"id,omitempty" db:"id"` - AdapterId string `json:"adapterId,omitempty" db:"adapter_id"` - Name string `json:"name,omitempty" db:"name"` - Nickname string `json:"nickname,omitempty" db:"nickname"` - Description string `json:"description,omitempty" db:"description"` - Server string `json:"server,omitempty" db:"server"` - MonitorServer string `json:"monitorServer,omitempty" db:"monitor_server"` - Username string `json:"username,omitempty" db:"username"` - Password string `json:"password,omitempty" db:"password"` - Token string `json:"token,omitempty" db:"token"` - Ak string `json:"ak,omitempty" db:"ak"` - Sk string `json:"sk,omitempty" db:"sk"` - Region string `json:"region,omitempty" db:"region"` - ProjectId string `json:"projectId,omitempty" db:"project_id"` - Version string `json:"version,omitempty" db:"version"` - Label string `json:"label,omitempty" db:"label"` - OwnerId string `json:"ownerId,omitempty" db:"owner_id"` - AuthType string `json:"authType,omitempty" db:"auth_type"` - ProducerDict string `json:"producerDict,omitempty" db:"producer_dict"` - RegionDict string `json:"regionDict,omitempty" db:"region_dict"` - Location string `json:"location,omitempty" db:"location"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` - Environment string `json:"environment,omitempty" db:"environment"` - WorkDir string `json:"workDir,omitempty" db:"work_dir"` - } `json:"clusterInfo"` -} - -type GetClusterListReq struct { - Id int64 `form:"id"` -} - -type GetClusterListResp struct { - Clusters []ClusterInfo `json:"clusters"` -} - -type GetRegionResp struct { - Code int32 `json:"code"` +type CloudResp struct { + Code string `json:"code"` Msg string `json:"msg"` - Data struct { - RegionSum int64 `json:"regionSum"` - SoftStackSum int64 `json:"softStackSum"` - } `json:"data"` + Data string `json:"data"` } -type HpcAdapterSummaryReq struct { +type TenantInfo struct { + Id int64 `json:"id"` // id + TenantName string `json:"tenantName"` // 租户名称 + TenantDesc string `json:"tenantDesc"` // 描述信息 + Clusters string `json:"clusters"` // 集群名称,用","分割 + Type int64 `json:"type"` // 租户所属(0数算,1超算,2智算) + DeletedFlag int64 `json:"deletedFlag"` // 是否删除 + CreatedBy int64 `json:"createdBy"` // 创建人 + CreateTime string `json:"createdTime"` // 创建时间 + UpdatedBy int64 `json:"updatedBy"` // 更新人 + UpdateTime string `json:"updated_time"` // 更新时间 } -type HpcAdapterSummaryResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data []HPCAdapterSummary `json:"data"` +type UpdateTenantReq struct { + Tenants []TenantInfo `json:"tenants"` } -type HpcJobReq struct { +type ControllerMetricsResp struct { + Data interface{} `json:"data"` } -type HpcJobResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data []Job `json:"data"` +type ApplyReq struct { + YamlString string `json:"yamlString" copier:"yamlString"` } -type HpcOverViewReq struct { +type DeleteReq struct { + YamlString string `json:"yamlString" copier:"yamlString"` } -type HpcOverViewResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data struct { - AdapterCount int32 `json:"adapterCount"` - StackCount int32 `json:"stackCount"` - ClusterCount int32 `json:"clusterCount"` - TaskCount int32 `json:"taskCount"` - } `json:"data"` +type ApplyResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + DataSet []DataSet `json:"dataSet,omitempty"` } -type HpcResourceReq struct { +type DeleteResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + Data string `json:"data,omitempty"` } -type HpcResourceResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data struct { - 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"` - } `json:"data"` +type DataSet struct { + ApiVersion int32 `json:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty"` + Name string `json:"name,omitempty"` + NameSpace string `json:"nameSpace,omitempty"` } -type ImageListResp struct { - Repositories []string `json:"repositories" copier:"repositories"` +type CloudListResp struct { + Clouds []Cloud `json:"clouds"` } -type ImageTagsReq struct { - Name string `form:"name"` +type Cloud struct { + Id int64 `json:"id"` // id + TaskId int64 `json:"taskId"` // 任务id + ParticipantId int64 `json:"participantId"` // 集群静态信息id + ApiVersion string `json:"apiVersion"` + Name string `json:"name"` // 名称 + Namespace string `json:"namespace"` // 命名空间 + Kind string `json:"kind"` // 种类 + Status string `json:"status"` // 状态 + StartTime string `json:"startTime"` // 开始时间 + RunningTime int64 `json:"runningTime"` // 运行时长 + CreatedBy int64 `json:"createdBy"` // 创建人 + CreateTime string `json:"createdTime"` // 创建时间 + Result string `json:"result"` } -type ImageTagsResp struct { - Name string `json:"name"` - Tags []string `json:"tags" copier:"tags"` +type UploadLinkImageReq struct { + PartId int64 `json:"partId"` + FilePath string `json:"filePath"` } -type JobTotalResp struct { - AllCardRunTime float64 `json:"allCardRunTime"` - AllJobCount float64 `json:"allJobCount"` - AllJobRunTime float64 `json:"allJobRunTime"` - TrainJobs []TrainJob `json:"trainJobs"` +type UploadLinkImageResp struct { + Success bool `json:"success"` + Image *ImageSl `json:"image"` + ErrorMsg string `json:"errorMsg"` } -type ListCenterResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data struct { - TotalCount int `json:"totalCount"` - Centers []Center `json:"centers"` - } `json:"data"` +type ImageSl struct { + ImageId string `json:"imageId"` + ImageName string `json:"imageName"` + ImageStatus string `json:"imageStatus"` } -type ListClusterReq struct { - CenterId int32 `path:"centerId"` +type GetLinkImageListReq struct { + PartId int64 `json:"partId"` } -type ListClusterResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data struct { - TotalCount int `json:"totalCount"` - Clusters []ComputeCluster `json:"clusters"` - } `json:"data"` +type GetLinkImageListResp struct { + Success bool `json:"success"` + Images []*ImageSl `json:"images"` + ErrorMsg string `json:"errorMsg"` } -type ListRegionResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data []Region `json:"data"` +type DeleteLinkImageReq struct { + PartId int64 `json:"partId"` + ImageId string `json:"imageId"` +} + +type DeleteLinkImageResp struct { + Success bool `json:"success"` + ErrorMsg string `json:"errorMsg"` +} + +type SubmitLinkTaskReq struct { + PartId int64 `json:"partId"` + ImageId string `json:"imageId,optional"` + Cmd string `json:"cmd,optional"` + Params []*ParamSl `json:"params,optional"` + Envs []*EnvSl `json:"envs,optional"` + ResourceId string `json:"resourceId,optional"` +} + +type EnvSl struct { + Key string `json:"key"` + Val string `json:"value"` +} + +type ParamSl struct { + Key string `json:"key"` + Val string `json:"value"` +} + +type SubmitLinkTaskResp struct { + Success bool `json:"success"` + TaskId string `json:"taskId"` + ErrorMsg string `json:"errorMsg"` +} + +type GetLinkTaskReq struct { + PartId int64 `json:"partId"` + TaskId string `json:"taskId"` +} + +type GetLinkTaskResp struct { + Success bool `json:"success"` + Task *TaskSl `json:"task"` + ErrorMsg string `json:"errorMsg"` +} + +type DeleteLinkTaskReq struct { + PartId int64 `json:"partId"` + TaskId string `json:"taskId"` +} + +type DeleteLinkTaskResp struct { + Success bool `json:"success"` + ErrorMsg string `json:"errorMsg"` +} + +type TaskSl struct { + TaskId string `json:"taskId"` + TaskName string `json:"taskName"` + TaskStatus string `json:"TaskStatus"` + StartedAt int64 `json:"startedAt"` + CompletedAt int64 `json:"completedAt"` +} + +type GetParticipantsReq struct { +} + +type GetParticipantsResp struct { + Success bool `json:"success"` + Participants []*ParticipantSl `json:"participant"` +} + +type GetResourceSpecsReq struct { + PartId int64 `json:"partId"` +} + +type GetResourceSpecsResp struct { + Success bool `json:"success"` + ResourceSpecs []*ResourceSpecSl `json:"resourceSpecs"` + ErrorMsg string `json:"errorMsg"` +} + +type ResourceSpecSl struct { + ParticipantId int64 `json:"participantId"` + ParticipantName string `json:"participantName"` + SpecName string `json:"specName"` + SpecId string `json:"specId"` + SpecPrice float64 `json:"specPrice"` +} + +type ParticipantSl struct { + ParticipantId int64 `json:"id"` + ParticipantName string `json:"name"` + ParticipantType string `json:"type"` +} + +type ScheduleReq struct { + AiOption *AiOption `json:"aiOption,optional"` +} + +type ScheduleResp struct { + Results []*ScheduleResult `json:"results"` +} + +type ScheduleResult struct { + ClusterId string `json:"clusterId"` + TaskId string `json:"taskId"` + Card string `json:"card"` + Strategy string `json:"strategy"` + JobId string `json:"jobId"` + Replica int32 `json:"replica"` + Msg string `json:"msg"` +} + +type ScheduleOverviewResp struct { +} + +type AiOption struct { + TaskName string `json:"taskName"` + AdapterId string `json:"adapterId"` + AiClusterIds []string `json:"aiClusterIds"` + ResourceType string `json:"resourceType"` + ComputeCard string `json:"card"` + Tops float64 `json:"Tops,optional"` + TaskType string `json:"taskType"` + Datasets string `json:"datasets"` + Algorithm string `json:"algorithm"` + Strategy string `json:"strategy"` + StaticWeightMap map[string]int32 `json:"staticWeightMap,optional"` + Params []string `json:"params,optional"` + Envs []string `json:"envs,optional"` + Cmd string `json:"cmd,optional"` + Replica int32 `json:"replicas"` +} + +type AiResourceTypesResp struct { + ResourceTypes []string `json:"resourceTypes"` +} + +type AiTaskTypesResp struct { + TaskTypes []string `json:"taskTypes"` +} + +type AiDatasetsReq struct { + AdapterId string `path:"adapterId"` +} + +type AiDatasetsResp struct { + Datasets []string `json:"datasets"` +} + +type AiStrategyResp struct { + Strategies []string `json:"strategies"` +} + +type AiAlgorithmsReq struct { + AdapterId string `path:"adapterId"` + ResourceType string `path:"resourceType"` + TaskType string `path:"taskType"` + Dataset string `path:"dataset"` +} + +type AiAlgorithmsResp struct { + Algorithms []string `json:"algorithms"` +} + +type AiJobLogReq struct { + AdapterId string `path:"adapterId"` + ClusterId string `path:"clusterId"` + TaskId string `path:"taskId"` + InstanceNum string `path:"instanceNum"` +} + +type AiJobLogResp struct { + Log string `json:"log"` +} + +type AiTaskDb struct { + Id string `json:"id,omitempty" db:"id"` + TaskId string `json:"taskId,omitempty" db:"task_id"` + AdapterId string `json:"adapterId,omitempty" db:"adapter_id"` + ClusterId string `json:"clusterId,omitempty" db:"cluster_id"` + Name string `json:"name,omitempty" db:"name"` + Replica string `json:"replica,omitempty" db:"replica"` + ClusterTaskId string `json:"clusterTaskId,omitempty" db:"c_task_id"` + Strategy string `json:"strategy,omitempty" db:"strategy"` + Status string `json:"status,omitempty" db:"status"` + Msg string `json:"msg,omitempty" db:"msg"` + CommitTime string `json:"commitTime,omitempty" db:"commit_time"` + StartTime string `json:"startTime,omitempty" db:"start_time"` + EndTime string `json:"endTime,omitempty" db:"end_time"` +} + +type DownloadAlgorithmCodeReq struct { + AdapterId string `form:"adapterId"` + ClusterId string `form:"clusterId"` + ResourceType string `form:"resourceType"` + Card string `form:"card"` + TaskType string `form:"taskType"` + Dataset string `form:"dataset"` + Algorithm string `form:"algorithm"` +} + +type DownloadAlgorithmCodeResp struct { + Code string `json:"code"` +} + +type UploadAlgorithmCodeReq struct { + AdapterId string `json:"adapterId"` + ClusterId string `json:"clusterId"` + ResourceType string `json:"resourceType"` + Card string `json:"card"` + TaskType string `json:"taskType"` + Dataset string `json:"dataset"` + Algorithm string `json:"algorithm"` + Code string `json:"code"` +} + +type UploadAlgorithmCodeResp struct { +} + +type GetComputeCardsByClusterReq struct { + AdapterId string `path:"adapterId"` + ClusterId string `path:"clusterId"` +} + +type GetComputeCardsByClusterResp struct { + Cards []string `json:"cards"` +} + +type GetClusterBalanceByIdReq struct { + AdapterId string `path:"adapterId"` + ClusterId string `path:"clusterId"` +} + +type GetClusterBalanceByIdResp struct { + Balance float64 `json:"balance"` +} + +type CreateAlertRuleReq struct { + CLusterId string `json:"clusterId"` + ClusterName string `json:"clusterName"` + Name string `json:"name"` + PromQL string `json:"promQL"` + Duration string `json:"duration"` + Annotations string `json:"annotations,optional"` + AlertLevel string `json:"alertLevel"` + AlertType string `json:"alertType"` +} + +type DeleteAlertRuleReq struct { + Id int64 `form:"id"` + ClusterName string `form:"clusterName"` + Name string `form:"name"` +} + +type AlertRulesReq struct { + AlertType string `form:"alertType"` + AdapterId string `form:"adapterId,optional"` + ClusterId string `form:"clusterId,optional"` +} + +type AlertRulesResp struct { + AlertRules []AlertRule `json:"alertRules"` +} + +type AlertRule struct { + Id int64 `json:"id"` + ClusterName string `json:"clusterName"` + Name string `json:"name"` + AlertType string `json:"alertType"` + PromQL string `json:"promQL"` + Duration string `json:"duration"` + Annotations string `json:"annotations"` + AlertLevel string `json:"alertLevel"` } type NodesLoadTopReq struct { @@ -7861,91 +5917,18 @@ type NodesLoadTopResp struct { Msg string `json:"msg"` } -type PageTaskReq struct { - Name string `form:"name,optional"` - PageInfo +type AlertListReq struct { + AlertType string `form:"alertType"` + AdapterId string `form:"adapterId,optional"` + ClusterId string `form:"clusterId,optional"` } -type ParticipantListResp struct { - Participants []Participant `json:"participants"` +type AlertListResp struct { + AlertMap map[string]interface{} `json:"alertMap"` } -type RemoteResp struct { - Code int `json:"code"` - Message string `json:"message"` - Data interface{} `json:"data"` -} - -type RemoveSecurityGroupReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `form:"platform,optional"` - RemoveSecurityGroup struct { - Name string `json:"name" copier:"Name"` - } `json:"removeSecurityGroup" copier:"RemoveSecurityGroup"` -} - -type RemoveSecurityGroupResp struct { - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` - Code int32 `json:"code,omitempty"` -} - -type ScheduleSituationResp struct { - Nodes []NodeRegion `json:"nodes"` - Links []Link `json:"links"` - Categories []Category `json:"categories"` -} - -type ScheduleTaskByYamlReq struct { - Name string `yaml:"name"` - Description string `yaml:"description"` - TenantId int64 `yaml:"tenantId"` - NsID string `yaml:"nsID"` - Tasks []TaskYaml `yaml:"tasks"` -} - -type ScheduleTaskByYamlResp struct { - TaskId int64 `json:"taskId"` -} - -type ScheduleTaskReq struct { - Name string `json:"name"` - Synergy string `json:"synergy"` - Description string `json:"description"` - Strategy string `json:"strategy"` - Tasks []TaskInfo `json:"tasks"` -} - -type SyncClusterLoadReq struct { - ClusterLoadRecords []ClusterLoadRecord `json:"clusterLoadRecords"` -} - -type TaskDetailReq struct { - TaskId int64 `path:"taskId"` -} - -type TaskDetailResp struct { - CpuCores float64 `json:"cpuCores"` - CpuRate float64 `json:"cpuRate"` - CpuLimit float64 `json:"cpuLimit"` - GpuCores float64 `json:"gpuCores"` - GpuRate float64 `json:"gpuRate"` - GpuLimit float64 `json:"gpuLimit"` - MemoryTotal float64 `json:"memoryTotal"` - MemoryRate float64 `json:"memoryRate"` - MemoryLimit float64 `json:"memoryLimit"` -} - -type TaskListReq struct { - PageNum int `form:"pageNum"` - PageSize int `form:"pageSize"` -} - -type TaskListResp struct { - TotalCount int64 `json:"totalCount"` // 任务总数 - NormalCount int64 `json:"normalCount"` // 正常任务数 - AlarmCount int64 `json:"alarmCount"` // 任务告警数 - Tasks []Task `json:"tasks"` +type SyncClusterAlertReq struct { + AlertRecordsMap map[string]interface{} `json:"alertRecordsMap"` } type TaskNumReq struct { @@ -7958,3 +5941,257 @@ type TaskNumResp struct { History int `json:"history"` Failed int `json:"failed"` } + +type AdapterInfoReq struct { + ClusterId string `form:"clusterId"` +} + +type AdapterInfoResp struct { + Name string `json:"name"` + Version string `json:"version"` +} + +type ScheduleSituationResp struct { + Nodes []NodeRegion `json:"nodes"` + Links []Link `json:"links"` + Categories []Category `json:"categories"` +} + +type NodeRegion struct { + Id string `json:"id"` + Name string `json:"name"` + Category int `json:"category"` + Value int `json:"value"` +} + +type Link struct { + Source string `json:"source"` + Target string `json:"target"` +} + +type Category struct { + Name string `json:"name"` +} + +type DeployInstance struct { + Id string `json:"id"` + DeployTaskId string `json:"deployTaskId"` + InstanceId string `json:"instanceId"` + InstanceName string `json:"instanceName"` + AdapterId string `json:"adapterId"` + AdapterName string `json:"adapterName"` + ClusterId string `json:"clusterId"` + ClusterName string `json:"clusterName"` + ModelName string `json:"modelName"` + ModelType string `json:"modelType"` + InferCard string `json:"inferCard"` + Status string `json:"status"` + CreateTime string `json:"createTime"` + UpdateTime string `json:"updateTime"` + ClusterType string `json:"clusterType"` +} + +type ModelTypesResp struct { + ModelTypes []string `json:"types"` +} + +type ModelNamesReq struct { + Type string `form:"type"` +} + +type ModelNamesResp struct { + ModelNames []string `json:"models"` +} + +type InstanceCenterReq struct { + InstanceType int32 `form:"instance_type"` + InstanceClass string `form:"instance_class,optional"` + InstanceName string `form:"instance_name,optional"` +} + +type InstanceCenterResp struct { + InstanceCenterList []InstanceCenterList `json:"instanceCenterList" copier:"InstanceCenterList"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + TotalCount int `json:"totalCount"` +} + +type InstanceCenterList struct { + LogoPath string `json:"logo_path"` + InstanceName string `json:"instance_name"` + InstanceType int32 `json:"instance_type"` + InstanceClass string `json:"instance_class"` + InstanceClassChinese string `json:"instance_class_chinese"` + Description string `json:"description"` + Version string `json:"version"` +} + +type ImageInferenceReq struct { + TaskName string `form:"taskName"` + TaskDesc string `form:"taskDesc"` + ModelType string `form:"modelType"` + InstanceIds []int64 `form:"instanceIds"` + Strategy string `form:"strategy,,optional"` + StaticWeightMap map[string]map[string]int32 `form:"staticWeightMap,optional"` + Replica int32 `form:"replicas,optional"` +} + +type ImageInferenceResp struct { + InferResults []*ImageResult `json:"result"` +} + +type ImageResult struct { + ClusterId string `json:"clusterId"` + ClusterName string `json:"clusterName"` + ImageName string `json:"imageName"` + Card string `json:"card"` + ImageResult string `json:"imageResult"` +} + +type InferenceTaskDetailReq struct { + TaskId int64 `form:"taskId"` +} + +type InferenceTaskDetailResp struct { + InferenceResults []InferenceResult `json:"data"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` +} + +type InferenceResult struct { + ImageName string `json:"imageName"` + TaskName string `json:"taskName"` + TaskAiName string `json:"taskAiName"` + Result string `json:"result"` + Card string `json:"card"` + ClusterName string `json:"clusterName"` +} + +type TextToTextInferenceReq struct { + TaskName string `form:"taskName"` + TaskDesc string `form:"taskDesc"` + ModelType string `form:"modelType"` + InstanceId int64 `form:"instanceId"` +} + +type TextToTextInferenceResp struct { +} + +type TextToImageInferenceReq struct { + TaskName string `form:"taskName"` + TaskDesc string `form:"taskDesc"` + ModelName string `form:"modelName"` + ModelType string `form:"modelType"` + AiClusterIds []string `form:"aiClusterIds"` +} + +type TextToImageInferenceResp struct { + Result []byte `json:"result"` +} + +type DeployInstanceListReq struct { + PageInfo +} + +type DeployInstanceListResp struct { + PageResult +} + +type StartDeployInstanceReq struct { + AdapterId string `form:"adapterId"` + ClusterId string `form:"clusterId"` + Id string `form:"id"` + InstanceId string `form:"instanceId"` +} + +type StartDeployInstanceResp struct { +} + +type StopDeployInstanceReq struct { + AdapterId string `form:"adapterId"` + ClusterId string `form:"clusterId"` + Id string `form:"id"` + InstanceId string `form:"instanceId"` +} + +type StopDeployInstanceResp struct { +} + +type DeployInstanceStatReq struct { +} + +type DeployInstanceStatResp struct { + Running int32 `json:"running"` + Total int32 `json:"total"` +} + +type InferenceTaskStatReq struct { +} + +type InferenceTaskStatResp struct { + Running int32 `json:"running"` + Total int32 `json:"total"` +} + +type StartAllByDeployTaskIdReq struct { + Id string `json:"deployTaskId"` +} + +type StartAllByDeployTaskIdResp struct { +} + +type StopAllByDeployTaskIdReq struct { + Id string `json:"deployTaskId"` +} + +type StopAllByDeployTaskIdResp struct { +} + +type GetRunningInstanceReq struct { + Id string `form:"deployTaskId"` + AdapterId string `form:"adapterId"` +} + +type GetRunningInstanceResp struct { + List interface{} `json:"list"` +} + +type GetDeployTasksByTypeReq struct { + ModelType string `form:"modelType"` +} + +type GetDeployTasksByTypeResp struct { + List interface{} `json:"list"` +} + +type CreateDeployTaskReq struct { + TaskName string `form:"taskName"` + TaskDesc string `form:"taskDesc"` + ModelName string `form:"modelName"` + ModelType string `form:"modelType"` + AdapterClusterMap map[string][]string `form:"adapterClusterMap"` +} + +type CreateDeployTaskResp struct { +} + +type GetAdaptersByModelReq struct { + ModelName string `form:"modelName"` + ModelType string `form:"modelType"` +} + +type GetAdaptersByModelResp struct { + Adapters []*AdapterAvail `json:"adapters"` +} + +type AdapterAvail struct { + AdapterId string `json:"adapterId"` + AdapterName string `json:"adapterName"` + Clusters []*ClusterAvail `json:"clusters"` +} + +type ClusterAvail struct { + ClusterId string `json:"clusterId"` + ClusterName string `json:"clusterName"` +}