diff --git a/api/desc/core/pcm-core.api b/api/desc/core/pcm-core.api index b09d28fb..6392a3aa 100644 --- a/api/desc/core/pcm-core.api +++ b/api/desc/core/pcm-core.api @@ -417,28 +417,8 @@ type ( } ) - //jccSchedule容器集群资源监控 > start -type ClusterMetrics struct { - Code int `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data []MetricResult `json:"data,omitempty"` -} -type MetricResult struct { - MetricName string `json:"metric_name, omitempty"` - MetricData MetricData `json:"data, omitempty"` -} - -type MetricData struct { - Result []map[string]interface{} `json:"result"` - ResultType string `json:"resultType"` -} - -type ResultData struct { - Status string `json:"status"` - Data MetricData `json:"data"` -} type NodeAssetsResp { NodeAssets []NodeAsset `json:"nodeAssets"` diff --git a/api/desc/pcm.api b/api/desc/pcm.api index 41f9ecee..a3d292a1 100644 --- a/api/desc/pcm.api +++ b/api/desc/pcm.api @@ -11,18 +11,18 @@ import ( "schedule/pcm-schedule.api" ) -info( - title: "pcm api service" - desc: "type desc here" - author: "type author here" - email: "type email here" +info ( + title: "pcm api service" + desc: "type desc here" + author: "type author here" + email: "type email here" version: "type version here" ) //core端接口 -@server( +@server ( prefix: pcm/v1 - group : core + group: core ) service pcm { @doc "查询P端服务列表" @@ -81,10 +81,6 @@ service pcm { @handler getGeneralInfoHandler get /core/getGeneralInfo returns (GiResp) - @doc "查询各域资源信息" - @handler listDomainResourceHandler - get /core/listDomainResource returns (DomainResourceResp) - @doc "查询控制面板配置信息" @handler getResourcePanelConfigHandler get /core/getResourcePanelConfigHandler returns (ResourcePanelConfigResp) @@ -103,7 +99,7 @@ service pcm { @doc "Center Resources top3" @handler centerResourcesHandler - get /core/centerResources returns (centerResourcesResp) + get /core/centerResources returns (centerResourcesResp) @doc "Synchronize Cluster Load Information" @handler syncClusterLoadHandler @@ -112,12 +108,16 @@ service pcm { @doc "metrics" @handler metricsHandler get /core/metrics + + @doc "alert rules" + @handler alertRulesHandler + get /core/alert/rules } //hpc二级接口 -@server( +@server ( prefix: pcm/v1 - group : hpc + group: hpc ) service pcm { @doc "提交超算任务" @@ -138,9 +138,9 @@ service pcm { } //cloud二级接口 -@server( +@server ( prefix: pcm/v1 - group : cloud + group: cloud ) service pcm { @doc "云算任务列表" @@ -174,13 +174,12 @@ service pcm { @doc "Obtain cluster list information according to adapterId" @handler getClusterListHandler get /core/clusterList (getClusterListReq) returns (getClusterListResp) - } //智算二级接口 -@server( +@server ( prefix: pcm/v1 - group : ai + group: ai ) service pcm { @doc "查询数据集列表" @@ -268,7 +267,6 @@ service pcm { get /ai/ListClusters (ListClustersReq) returns (ListClustersResp) /******************Notebook Method start*************************/ - @doc "查询notebook列表" @handler listNotebookHandler get /ai/listNotebook (ListNotebookReq) returns (ListNotebookResp) @@ -292,39 +290,42 @@ service pcm { @doc "挂载notebook存储" @handler mountNotebookStorageHandler post /ai/mountNotebookStorage (MountNotebookStorageReq) returns (MountNotebookStorageResp) - /******************Notebook Method end*************************/ + /******************Notebook Method end*************************/ /******************Visualization Job Method start*************************/ @doc "获取虚拟化任务" @handler getVisualizationJobHandler get /ai/getVisualizationJob (GetVisualizationJobReq) returns (GetVisualizationJobResp) + @doc "创建虚拟化任务" @handler createVisualizationJobHandler post /ai/CreateVisualizationJob (CreateVisualizationJobReq) returns (CreateVisualizationJobResp) - /******************Visualization Job Method start*************************/ +/******************Visualization Job Method start*************************/ } //screen接口 -@server( +@server ( prefix: pcm/v1 - group : storage + group: storage ) service pcm { @doc "存储概览" @handler screenStorageHandler get /storage/screenStorage (StorageScreenReq) returns (StorageScreenResp) + @doc "日常算力查询" @handler dailyPowerScreenHandler get /storage/dailyPowerScreen (DailyPowerScreenReq) returns (DailyPowerScreenResp) + @doc "算力中心算力情况" @handler perCenterComputerPowersHandler get /storage/perCenterComputerPowers (PerCenterComputerPowersReq) returns (PerCenterComputerPowersResp) } //镜像接口 -@server( +@server ( prefix: pcm/v1 - group : image + group: image ) service pcm { @doc "镜像上传" @@ -349,9 +350,9 @@ service pcm { } //openstack 接口 -@server( +@server ( prefix: pcm/v1 - group : vm + group: vm ) service pcm { @doc "openstack计算中心概览" @@ -740,11 +741,10 @@ service pcm { } //存算联动 接口 -@server( +@server ( prefix: pcm/v1 - group : storelink + group: storelink ) - service pcm { @handler UploadLinkImageHandler post /storelink/uploadImage (UploadLinkImageReq) returns (UploadLinkImageResp) @@ -772,9 +772,9 @@ service pcm { } // 接口 -@server( +@server ( prefix: pcm/v1 - group : apps + group: apps ) service pcm { @doc "应用列表" @@ -815,11 +815,10 @@ service pcm { } // 接口 -@server( +@server ( prefix: pcm/v1 - group : adapters + group: adapters ) - service pcm { @handler AdaptersListHandler get /adapter/list (AdapterQueryReq) returns (PageResult) @@ -858,11 +857,10 @@ service pcm { get /adapter/clusterSum (clusterSumReq) returns (clusterSumReqResp) } -@server( +@server ( prefix: pcm/v1 - group : schedule + group: schedule ) - service pcm { @handler ScheduleGetAiResourceTypesHandler get /schedule/ai/getResourceTypes returns (AiResourceTypesResp) @@ -880,11 +878,10 @@ service pcm { post /schedule/submit (ScheduleReq) returns (ScheduleResp) } -@server( +@server ( prefix: pcm/v1 - group : dictionary + group: dictionary ) - service pcm { @handler GetDict get /dict/:id (CId) returns (DictResp) @@ -918,4 +915,5 @@ service pcm { @handler ListDictItemByCode get /dictItem/code/:dictCode (DictCodeReq) returns (PageResult) -} \ No newline at end of file +} + diff --git a/api/internal/config/config.go b/api/internal/config/config.go index 3debd22e..5ead1aa5 100644 --- a/api/internal/config/config.go +++ b/api/internal/config/config.go @@ -49,7 +49,11 @@ type Config struct { Password string } SnowflakeConf SnowflakeConf - PromUrl string + Monitoring Monitoring +} +type Monitoring struct { + PromUrl string + AlertUrl string } // SnowflakeConf 雪花算法机器id配置 diff --git a/api/internal/handler/core/alertruleshandler.go b/api/internal/handler/core/alertruleshandler.go new file mode 100644 index 00000000..fb7af106 --- /dev/null +++ b/api/internal/handler/core/alertruleshandler.go @@ -0,0 +1,21 @@ +package core + +import ( + "net/http" + + "github.com/zeromicro/go-zero/rest/httpx" + "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/logic/core" + "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc" +) + +func AlertRulesHandler(svcCtx *svc.ServiceContext) http.HandlerFunc { + return func(w http.ResponseWriter, r *http.Request) { + l := core.NewAlertRulesLogic(r.Context(), svcCtx) + err := l.AlertRules() + if err != nil { + httpx.ErrorCtx(r.Context(), w, err) + } else { + httpx.Ok(w) + } + } +} diff --git a/api/internal/handler/routes.go b/api/internal/handler/routes.go index 6822d544..c88ee63a 100644 --- a/api/internal/handler/routes.go +++ b/api/internal/handler/routes.go @@ -24,15 +24,334 @@ import ( func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { server.AddRoutes( []rest.Route{ + { + Method: http.MethodPost, + Path: "/adapter/cluster/create", + Handler: adapters.CreateClusterHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/adapter/cluster/delete", + Handler: adapters.DeleteClusterHandler(serverCtx), + }, { Method: http.MethodGet, - Path: "/core/participantList", - Handler: core.ParticipantListHandler(serverCtx), + Path: "/adapter/cluster/get", + Handler: adapters.GetClusterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/cluster/list", + Handler: adapters.ClusterListHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/adapter/cluster/update", + Handler: adapters.UpdateClusterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/clusterSum", + Handler: adapters.GetClusterSumHandler(serverCtx), }, { Method: http.MethodPost, - Path: "/core/scheduleTaskByYaml", - Handler: core.ScheduleTaskByYamlHandler(serverCtx), + Path: "/adapter/create", + Handler: adapters.CreateAdapterHandler(serverCtx), + }, + { + Method: http.MethodDelete, + Path: "/adapter/delete", + Handler: adapters.DeleteAdapterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/get", + Handler: adapters.GetAdapterHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/list", + Handler: adapters.AdaptersListHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/adapter/relation", + Handler: adapters.GetAdapterRelationHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/adapter/update", + Handler: adapters.UpdateAdapterHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + 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), + }, + { + Method: http.MethodGet, + Path: "/ai/GetExportTasksOfDataset/:projectId/:datasetId", + Handler: ai.GetExportTasksOfDatasetHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/GetListTrainingJobs/:projectId", + Handler: ai.GetListTrainingJobsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListAlgorithms/:projectId", + Handler: ai.ListAlgorithmsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/ai/ListClusters", + Handler: ai.ListClustersHandler(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/createDataSet/:projectId", + Handler: ai.CreateDataSetHandler(serverCtx), + }, + { + 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/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), + }, + { + Method: http.MethodGet, + Path: "/ai/listNotebook", + Handler: ai.ListNotebookHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/mountNotebookStorage", + Handler: ai.MountNotebookStorageHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/startNotebook", + Handler: ai.StartNotebookHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/ai/stopNotebook", + Handler: ai.StopNotebookHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodDelete, + Path: "/apps/deleteApp", + Handler: apps.DeleteAppByAppNameHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/apps/distribute/:appName", + Handler: apps.AppDetailHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/apps/getAppByAppName/:appName", + Handler: apps.GetAppByAppNameHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/apps/list", + Handler: apps.AppListHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/apps/pauseApp", + Handler: apps.PauseAppByAppNameHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/apps/pods/:appName", + Handler: apps.AppPodsHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/apps/restartApp", + Handler: apps.RestartAppByAppNameHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/apps/startApp", + Handler: apps.StartAppByAppNameHandler(serverCtx), + }, + { + Method: http.MethodPut, + Path: "/apps/updateApp", + Handler: apps.UpdateAppByAppNameHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + 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), + }, + { + Method: http.MethodGet, + Path: "/cloud/noticeTenant", + Handler: cloud.NoticeTenantHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/registerCluster", + Handler: cloud.RegisterClusterHandler(serverCtx), + }, + { + Method: http.MethodPost, + Path: "/cloud/updateTenant", + Handler: cloud.UpdateTenantHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/clusterList", + Handler: cloud.GetClusterListHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/task/list", + Handler: cloud.CloudListHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ + { + Method: http.MethodGet, + Path: "/core/alert/rules", + Handler: core.AlertRulesHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/assets", + Handler: core.NodeAssetsHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/centerResources", + Handler: core.CenterResourcesHandler(serverCtx), }, { Method: http.MethodPost, @@ -51,13 +370,28 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/core/taskList", - Handler: core.TaskListHandler(serverCtx), + Path: "/core/getComputilityStatistics", + Handler: core.GetComputilityStatisticsHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/core/taskDetail/:taskId", - Handler: core.TaskDetailHandler(serverCtx), + Path: "/core/getComputingPower", + Handler: core.GetComputingPowerHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getGeneralInfo", + Handler: core.GetGeneralInfoHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getRegion", + Handler: core.GetRegionHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/getResourcePanelConfigHandler", + Handler: core.GetResourcePanelConfigHandler(serverCtx), }, { Method: http.MethodGet, @@ -74,11 +408,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/core/listCluster/:centerId", Handler: core.ListClusterHandler(serverCtx), }, - { - Method: http.MethodGet, - Path: "/core/getRegion", - Handler: core.GetRegionHandler(serverCtx), - }, { Method: http.MethodGet, Path: "/core/listRegion", @@ -86,23 +415,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/core/getComputingPower", - Handler: core.GetComputingPowerHandler(serverCtx), + Path: "/core/metrics", + Handler: core.MetricsHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/core/getGeneralInfo", - Handler: core.GetGeneralInfoHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/core/listDomainResource", - Handler: core.ListDomainResourceHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/core/getResourcePanelConfigHandler", - Handler: core.GetResourcePanelConfigHandler(serverCtx), + Path: "/core/participantList", + Handler: core.ParticipantListHandler(serverCtx), }, { Method: http.MethodPut, @@ -110,19 +429,9 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: core.PutResourcePanelConfigHandler(serverCtx), }, { - Method: http.MethodGet, - 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/scheduleTaskByYaml", + Handler: core.ScheduleTaskByYamlHandler(serverCtx), }, { Method: http.MethodPost, @@ -131,8 +440,74 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/core/metrics", - Handler: core.MetricsHandler(serverCtx), + Path: "/core/taskDetail/:taskId", + Handler: core.TaskDetailHandler(serverCtx), + }, + { + Method: http.MethodGet, + Path: "/core/taskList", + Handler: core.TaskListHandler(serverCtx), + }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []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"), @@ -147,13 +522,13 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { }, { Method: http.MethodGet, - Path: "/hpc/listJob", - Handler: hpc.ListJobHandler(serverCtx), + Path: "/hpc/listHistoryJob", + Handler: hpc.ListHistoryJobHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/hpc/listHistoryJob", - Handler: hpc.ListHistoryJobHandler(serverCtx), + Path: "/hpc/listJob", + Handler: hpc.ListJobHandler(serverCtx), }, { Method: http.MethodGet, @@ -166,239 +541,11 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { 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: "/cloud/noticeTenant", - Handler: cloud.NoticeTenantHandler(serverCtx), - }, - { - Method: http.MethodPost, - Path: "/cloud/updateTenant", - Handler: cloud.UpdateTenantHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/core/clusterList", - Handler: cloud.GetClusterListHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - 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), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodGet, - Path: "/storage/screenStorage", - Handler: storage.ScreenStorageHandler(serverCtx), - }, - { - 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.MethodPost, - Path: "/upload", - Handler: image.UploadHandler(serverCtx), - }, { Method: http.MethodPost, Path: "/chunk", Handler: image.ChunkHandler(serverCtx), }, - { - Method: http.MethodGet, - Path: "/image/list", - Handler: image.ImageListHandler(serverCtx), - }, { Method: http.MethodGet, Path: "/dataSet/check/:fileMd5", @@ -409,491 +556,15 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Path: "/dataSet/upload", Handler: image.UploadDataSetHandler(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/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), + Path: "/image/list", + Handler: image.ImageListHandler(serverCtx), }, { Method: http.MethodPost, - Path: "/vm/createServer", - Handler: vm.CreateServerHandler(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), + Path: "/upload", + Handler: image.UploadHandler(serverCtx), }, }, rest.WithPrefix("/pcm/v1"), @@ -901,189 +572,26 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { 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: "/apps/list", - Handler: apps.AppListHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/apps/distribute/:appName", - Handler: apps.AppDetailHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/apps/pods/:appName", - Handler: apps.AppPodsHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/apps/getAppByAppName/:appName", - Handler: apps.GetAppByAppNameHandler(serverCtx), - }, - { - Method: http.MethodDelete, - Path: "/apps/deleteApp", - Handler: apps.DeleteAppByAppNameHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/apps/updateApp", - Handler: apps.UpdateAppByAppNameHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/apps/restartApp", - Handler: apps.RestartAppByAppNameHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/apps/pauseApp", - Handler: apps.PauseAppByAppNameHandler(serverCtx), - }, - { - Method: http.MethodPut, - Path: "/apps/startApp", - Handler: apps.StartAppByAppNameHandler(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", - Handler: adapters.DeleteAdapterHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/adapter/get", - Handler: adapters.GetAdapterHandler(serverCtx), - }, - { - Method: http.MethodGet, - 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/cluster/get", - Handler: adapters.GetClusterHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/adapter/relation", - Handler: adapters.GetAdapterRelationHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/adapter/clusterSum", - Handler: adapters.GetClusterSumHandler(serverCtx), - }, - }, - rest.WithPrefix("/pcm/v1"), - ) - - server.AddRoutes( - []rest.Route{ - { - Method: http.MethodGet, - Path: "/schedule/ai/getResourceTypes", - Handler: schedule.ScheduleGetAiResourceTypesHandler(serverCtx), - }, - { - Method: http.MethodGet, - Path: "/schedule/ai/getTaskTypes", - Handler: schedule.ScheduleGetAiTaskTypesHandler(serverCtx), - }, { Method: http.MethodGet, Path: "/schedule/ai/getDatasets", Handler: schedule.ScheduleGetDatasetsHandler(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.MethodPost, Path: "/schedule/submit", @@ -1097,58 +605,550 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { []rest.Route{ { Method: http.MethodGet, - Path: "/dict/:id", - Handler: dictionary.GetDictHandler(serverCtx), + Path: "/storage/dailyPowerScreen", + Handler: storage.DailyPowerScreenHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/dicts", - Handler: dictionary.ListDictHandler(serverCtx), + Path: "/storage/perCenterComputerPowers", + Handler: storage.PerCenterComputerPowersHandler(serverCtx), }, { - Method: http.MethodPost, - Path: "/dict", - Handler: dictionary.AddDictHandler(serverCtx), + Method: http.MethodGet, + Path: "/storage/screenStorage", + Handler: storage.ScreenStorageHandler(serverCtx), }, + }, + rest.WithPrefix("/pcm/v1"), + ) + + server.AddRoutes( + []rest.Route{ { - Method: http.MethodPut, - Path: "/dict", - Handler: dictionary.EditDictHandler(serverCtx), + Method: http.MethodDelete, + Path: "/storelink/deleteImage", + Handler: storelink.DeleteLinkImageHandler(serverCtx), }, { Method: http.MethodDelete, - Path: "/dict/:id", - Handler: dictionary.DeleteDictHandler(serverCtx), + Path: "/storelink/deleteTask", + Handler: storelink.DeleteLinkTaskHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/dictItem/:id", - Handler: dictionary.GetDictItemHandler(serverCtx), + Path: "/storelink/getImageList", + Handler: storelink.GetLinkImageListHandler(serverCtx), }, { Method: http.MethodGet, - Path: "/dictItems", - Handler: dictionary.ListDictItemHandler(serverCtx), + 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: "/dictItem", - Handler: dictionary.AddDictItemHandler(serverCtx), + Path: "/storelink/submitTask", + Handler: storelink.SubmitLinkTaskHandler(serverCtx), }, { - Method: http.MethodPut, - Path: "/dictItem", - Handler: dictionary.EditDictItemHandler(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), + }, + { + 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/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: "/dictItem/:id", - Handler: dictionary.DeleteDictItemHandler(serverCtx), + 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), + }, + { + 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), }, { Method: http.MethodGet, - Path: "/dictItem/code/:dictCode", - Handler: dictionary.ListDictItemByCodeHandler(serverCtx), + 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/getServersDetailedById", + Handler: vm.GetServersDetailedByIdHandler(serverCtx), + }, + { + 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), + }, + { + 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), + }, + { + 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), + }, + { + 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), }, }, rest.WithPrefix("/pcm/v1"), diff --git a/api/internal/logic/core/alertruleslogic.go b/api/internal/logic/core/alertruleslogic.go new file mode 100644 index 00000000..e5275dc3 --- /dev/null +++ b/api/internal/logic/core/alertruleslogic.go @@ -0,0 +1,33 @@ +package core + +import ( + "context" + "github.com/prometheus/alertmanager/api/v2/client/alert" + + "github.com/zeromicro/go-zero/core/logx" + "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc" +) + +type AlertRulesLogic struct { + logx.Logger + ctx context.Context + svcCtx *svc.ServiceContext +} + +func NewAlertRulesLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AlertRulesLogic { + return &AlertRulesLogic{ + Logger: logx.WithContext(ctx), + ctx: ctx, + svcCtx: svcCtx, + } +} + +func (l *AlertRulesLogic) AlertRules() error { + // todo: add your logic here and delete this line + alerts, err := l.svcCtx.AlertClient.Alert.GetAlerts(&alert.GetAlertsParams{}) + if err != nil { + return err + } + println(alerts.Error()) + return nil +} diff --git a/api/internal/logic/core/listdomainresourcelogic.go b/api/internal/logic/core/listdomainresourcelogic.go deleted file mode 100644 index cc4fe7bd..00000000 --- a/api/internal/logic/core/listdomainresourcelogic.go +++ /dev/null @@ -1,261 +0,0 @@ -/* - - Copyright (c) [2023] [pcm] - [pcm-coordinator] is licensed under Mulan PSL v2. - You can use this software according to the terms and conditions of the Mulan PSL v2. - You may obtain a copy of Mulan PSL v2 at: - http://license.coscl.org.cn/MulanPSL2 - THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, - EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, - MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - See the Mulan PSL v2 for more details. - -*/ - -package core - -import ( - "context" - "fmt" - "github.com/shopspring/decimal" - "github.com/zeromicro/go-zero/core/logx" - "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/svc" - "gitlink.org.cn/JointCloud/pcm-coordinator/api/internal/types" - "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/models" - "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils" - "gitlink.org.cn/JointCloud/pcm-coordinator/pkg/utils/httputils" - "k8s.io/apimachinery/pkg/util/json" - "math" - "strconv" -) - -type ListDomainResourceLogic struct { - logx.Logger - ctx context.Context - svcCtx *svc.ServiceContext -} - -func NewListDomainResourceLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ListDomainResourceLogic { - return &ListDomainResourceLogic{ - Logger: logx.WithContext(ctx), - ctx: ctx, - svcCtx: svcCtx, - } -} - -func (l *ListDomainResourceLogic) ListDomainResource() (resp *types.DomainResourceResp, err error) { - //TODO 域信息查询数算集群监控 - resp = &types.DomainResourceResp{} - var domainResourceModel []models.DomainResource - sqlStr := "select * from `joint_domain`.domain_cluster" - l.svcCtx.DbEngin.Raw(sqlStr).Scan(&domainResourceModel) - utils.Convert(domainResourceModel, &resp.DomainResourceList) - metrics := &types.ClusterMetrics{} - //获取指定集群监控数据 - for i := 0; i < len(resp.DomainResourceList); i++ { - url := fmt.Sprintf("%s/api/v1/resource/getClusterMetrics?clusterName=%s", l.svcCtx.Config.JccScheduleUrl, resp.DomainResourceList[i].ClusterName) - bytes, err := httputils.HttpGet("GET", url) - if err != nil { - logx.WithContext(l.ctx).Errorf("获取云算指定集群监控数据 err: %s", err.Error()) - return nil, err - } - json.Unmarshal(bytes, metrics) - if metrics.Code == 200 { - //fmt.Print(metrics) - for _, metricResult := range metrics.Data { - //集群内存已使用 - if metricResult.MetricName == "cluster_memory_usage_wo_cache" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1 / (1024 * 1024 * 1024)).Round(2).Float64() - resp.DomainResourceList[i].MemoryUsage = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群内存总量 - if metricResult.MetricName == "cluster_memory_total" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1 / (1024 * 1024 * 1024)).Round(2).Float64() - resp.DomainResourceList[i].MemoryTotal = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群cpu已使用 - if metricResult.MetricName == "cluster_cpu_usage" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1).Round(2).Float64() - resp.DomainResourceList[i].CpuUsage = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群cpu总核数 - if metricResult.MetricName == "cluster_cpu_total" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1).Round(2).Float64() - resp.DomainResourceList[i].CpuTotal = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群容器节点已使用数量 - if metricResult.MetricName == "cluster_pod_running_count" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1).Round(2).Float64() - resp.DomainResourceList[i].NodeUsage = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群容器节点总量 - if metricResult.MetricName == "cluster_pod_quota" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1).Round(2).Float64() - resp.DomainResourceList[i].NodeTotal = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群磁盘已使用 - if metricResult.MetricName == "cluster_disk_size_usage" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1 / (1000 * 1000 * 1000)).Round(2).Float64() - resp.DomainResourceList[i].DiskUsage = v2 - } else { - continue - } - } - } else { - continue - } - } - //集群磁盘总量 - if metricResult.MetricName == "cluster_disk_size_capacity" { - format, ok := metricResult.MetricData.Result[0]["values"].([]interface{}) - if ok { - for _, val := range format { - f, ok := val.([]interface{}) - if ok { - value, _ := f[1].(string) - v1, err := strconv.ParseFloat(value, 32) - if err != nil { - continue - } - v2, _ := decimal.NewFromFloat(v1 / (1000 * 1000 * 1000)).Round(2).Float64() - resp.DomainResourceList[i].DiskTotal = v2 - } else { - continue - } - } - } else { - continue - } - } - if resp.DomainResourceList[i].CpuUsage != 0 && resp.DomainResourceList[i].CpuTotal != 0 { - resp.DomainResourceList[i].Cpu = math.Ceil((resp.DomainResourceList[i].CpuUsage / resp.DomainResourceList[i].CpuTotal) * 10000 / 100.00) - } - if resp.DomainResourceList[i].NodeUsage != 0 && resp.DomainResourceList[i].NodeTotal != 0 { - resp.DomainResourceList[i].NodeCount = math.Ceil((resp.DomainResourceList[i].NodeUsage / resp.DomainResourceList[i].NodeTotal) * 10000 / 100.00) - } - if resp.DomainResourceList[i].DiskUsage != 0 && resp.DomainResourceList[i].DiskTotal != 0 { - resp.DomainResourceList[i].Disk = math.Ceil((resp.DomainResourceList[i].DiskUsage / resp.DomainResourceList[i].DiskTotal) * 10000 / 100.00) - } - if resp.DomainResourceList[i].MemoryUsage != 0 && resp.DomainResourceList[i].MemoryTotal != 0 { - resp.DomainResourceList[i].Memory = math.Ceil((resp.DomainResourceList[i].MemoryUsage / resp.DomainResourceList[i].MemoryTotal) * 10000 / 100.00) - } - resp.DomainResourceList[i].DomainName = resp.DomainResourceList[i].Description - resp.DomainResourceList[i].ResourceType = "云算" - resp.DomainResourceList[i].Stack = "kubernetes" - } - } - } - return resp, nil -} diff --git a/api/internal/svc/servicecontext.go b/api/internal/svc/servicecontext.go index e96cf601..f03d211c 100644 --- a/api/internal/svc/servicecontext.go +++ b/api/internal/svc/servicecontext.go @@ -21,6 +21,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3/s3manager" "github.com/docker/docker/client" "github.com/go-redis/redis/v8" + alert "github.com/prometheus/alertmanager/api/v2/client" "github.com/robfig/cron/v3" "github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/zrpc" @@ -62,6 +63,7 @@ type ServiceContext struct { MonitorClient map[int64]tracker.Prometheus ParticipantRpc participantservice.ParticipantService PromClient tracker.Prometheus + AlertClient *alert.AlertmanagerAPI } func NewServiceContext(c config.Config) *ServiceContext { @@ -73,7 +75,13 @@ func NewServiceContext(c config.Config) *ServiceContext { DisableSSL: aws.Bool(false), //是否禁用https,这里表示不禁用,即使用HTTPS S3ForcePathStyle: aws.Bool(true), //使用路径样式而非虚拟主机样式,区别请参考:https://docs.aws.amazon.com/AmazonS3/latest/dev/VirtualHosting.html }) - promClient, err := tracker.NewPrometheus(c.PromUrl) + promClient, err := tracker.NewPrometheus(c.Monitoring.PromUrl) + if err != nil { + logx.Errorf("InitPrometheus err: %v", err) + panic("InitSnowflake err") + } + + alertClient := tracker.NewAlertClient(c.Monitoring.AlertUrl) if err != nil { logx.Errorf("InitPrometheus err: %v", err) panic("InitSnowflake err") @@ -135,5 +143,6 @@ func NewServiceContext(c config.Config) *ServiceContext { Downloader: downloader, Uploader: uploader, PromClient: promClient, + AlertClient: alertClient, } } diff --git a/api/internal/types/types.go b/api/internal/types/types.go index 014a10ea..308f2147 100644 --- a/api/internal/types/types.go +++ b/api/internal/types/types.go @@ -1,217 +1,258 @@ // Code generated by goctl. DO NOT EDIT. package types -type GetRegionResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data RegionNum `json:"data"` +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 RegionNum struct { - RegionSum int64 `json:"regionSum"` - SoftStackSum int64 `json:"softStackSum"` +type AccOtJobInfo struct { + AccRunSec int32 `json:"accRunSec" copier:"AccRunSec"` + AccCardRunSec float32 `json:"accCardRunSec" copier:"AccCardRunSec"` + AccOtJobNum int32 `json:"accOtJobNum" copier:"AccOtJobNum"` } -type CenterResourcesResp struct { - CentersIndex []CenterIndex `json:"centersIndex"` +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 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 AdapterCreateReq struct { + Id string `json:"id,optional" db:"id"` + Name string `json:"name"` + Type string `json:"type"` + Nickname string `json:"nickname"` + Version string `json:"version"` + Server string `json:"server"` } -type SyncClusterLoadReq struct { - ClusterLoadRecords []ClusterLoadRecord `json:"clusterLoadRecords"` +type AdapterDelReq struct { + Id string `form:"id,optional" db:"id"` } -type ClusterLoadRecord struct { - AdapterId int64 `json:"adapterId"` - ClusterName string `json:"clusterName"` - CpuAvail float64 `json:"cpuAvail"` - CpuTotal float64 `json:"cpuTotal"` - CpuUtilisation float64 `json:"cpuUtilisation"` - MemoryAvail float64 `json:"memoryAvail"` - MemoryUtilisation float64 `json:"memoryUtilisation"` - MemoryTotal float64 `json:"memoryTotal"` - DiskAvail float64 `json:"diskAvail"` - DiskTotal float64 `json:"diskTotal"` - DiskUtilisation float64 `json:"diskUtilisation"` +type AdapterInfo struct { + Id string `json:"id,omitempty" db:"id"` + Name string `json:"name,omitempty" db:"name"` + Type string `json:"type,omitempty" db:"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 GetClusterListReq struct { - Id int64 `form:"id"` +type AdapterListResp struct { + List []AdapterInfo `json:"list,omitempty"` } -type GetClusterListResp struct { - Clusters []ClusterInfo `json:"clusters"` +type AdapterQueryReq struct { + Id string `form:"id,optional" db:"id"` + Name string `form:"name,optional"` + Type string `form:"type,optional"` + Nickname string `form:"nickname,optional"` + Version string `form:"version,optional"` + Server string `form:"server,optional"` + PageInfo } -type ListRegionResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data []Region `json:"data"` +type AdapterRelation struct { + Id string `json:"id,omitempty" db:"id"` + Name string `json:"name,omitempty" db:"name"` + Type string `json:"type,omitempty" db:"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 Region struct { - RegionName string `json:"RegionName"` // 域名 - SoftStack string `json:"SoftStack"` // 软件栈 - SlurmNum int64 `json:"SlurmNum"` // 超算域适配slurm数量 - AdaptorInterfaceSum int64 `json:"AdaptorInterfaceSum"` // 适配接口数量 - RunningJobs int64 `json:"runningJobs"` +type AdapterRelationResp struct { + List []*ClusterRelationInfo `json:"list,omitempty"` } -type DeleteTaskReq struct { - Id int64 `path:"id"` +type AdapterReq struct { + Id string `json:"id,optional" db:"id"` + Name string `json:"name,optional"` + Type string `json:"type,optional"` + Nickname string `json:"nickname,optional"` + Version string `json:"version,optional"` + Server string `json:"server,optional"` } -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 AdapterResp struct { + Data AdapterInfo `json:"data,omitempty"` } -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"` - NsID string `json:"nsID"` - Replicas int64 `json:"replicas,optional"` - MatchLabels map[string]string `json:"matchLabels,optional"` - Server []ServerCommit `json:"server,optional"` - Platform string `json:"platform,optional"` -} - -type ServerCommit struct { - AllCardRunTime string `json:"allCardRunTime"` - FlavorRef string `json:"flavorRef,optional"` - Name string `json:"name,optional"` - ImageRef string `json:"imageRef,optional"` - AccessIPv4 string `json:"accessIPv4,optional"` - AccessIPv6 string `json:"accessIPv6,optional"` - AdminPass string `json:"adminPass,optional"` - Availability_zone string `json:"availability_zone,optional"` - Key_name string `json:"key_name,optional"` - Hostname string `json:"hostname,optional"` - Host string `json:"host,optional"` - Networks []Networks `json:"networks,optional"` -} - -type Networks struct { - Uuid string `json:"uuid,optional"` - Port string `json:"port,optional"` - Fixed_ip string `json:"fixed_ip,optional"` - Tag string `json:"tag,optional"` -} - -type Block_device_mapping_v2Commit struct { - Uuid string `json:"uuid,optional"` -} - -type CommitVmTaskResp 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 { +type AddSecurityGroup struct { Name string `json:"name" copier:"Name"` } -type ScheduleTaskByYamlResp struct { - TaskId int64 `json:"taskId"` +type AddSecurityGroupToServerReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Action []map[string]string `json:"Action,optional" copier:"Action"` + Platform string `json:"platform,optional"` + UnRescue_action string `json:"UnRescue_action" copier:"UnRescue_action"` + AddSecurityGroup AddSecurityGroup `json:"addSecurityGroup" copier:"AddSecurityGroup"` } -type ScheduleTaskReq struct { - Name string `json:"name"` - Synergy string `json:"synergy"` - Description string `json:"description"` - Strategy string `json:"strategy"` - Tasks []TaskInfo `json:"tasks"` +type AddSecurityGroupToServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` } -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 Addresses struct { + Private Private `json:"private" copier:"private"` } -type JobTotalResp struct { - AllCardRunTime float64 `json:"allCardRunTime"` - AllJobCount float64 `json:"allJobCount"` - AllJobRunTime float64 `json:"allJobRunTime"` - TrainJobs []TrainJob `json:"trainJobs"` +type AdvancedConfigAl struct { + AutoSearch AutoSearch `json:"autoSearch,optional"` } -type TrainJob struct { - Name string `json:"name"` - Status string `json:"status"` - ParticipantName string `json:"participantName"` - SynergyStatus string `json:"synergyStatus"` - Strategy int `json:"strategy"` +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 TaskListReq struct { - PageNum int `form:"pageNum"` - PageSize int `form:"pageSize"` +type AiDatasetsResp struct { + Datasets []string `json:"datasets"` } -type TaskListResp struct { - TotalCount int64 `json:"totalCount"` // 任务总数 - NormalCount int64 `json:"normalCount"` // 正常任务数 - AlarmCount int64 `json:"alarmCount"` // 任务告警数 - Tasks []Task `json:"tasks"` +type AiOption struct { + ResourceType string `json:"resourceType"` + TaskType string `json:"taskType"` + Datasets string `json:"datasets"` + Strategy string `json:"strategy"` } -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 AiResourceTypesResp struct { + ResourceTypes []string `json:"resourceTypes"` } -type TaskDetailReq struct { - TaskId int64 `path:"taskId"` +type AiStrategyResp struct { + Strategies []string `json:"strategies"` } -type TaskDetailResp struct { +type AiTaskTypesResp struct { + TaskTypes []string `json:"taskTypes"` +} + +type AlgoConfigs struct { + Name string `json:"name,optional"` + AutoSearchAlgoConfigParameterAlRp []AutoSearchAlgoConfigParameterAlRp `json:"params,optional"` +} + +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 AlgorithmResponse struct { + MetadataAlRp MetadataAlRp `json:"metadata,optional"` + JobConfigAlRp JobConfigAlRp `json:"jobConfig,optional"` + ResourceRequirementsAlRp []ResourceRequirements `json:"resourceRequirements,optional"` + AdvancedConfigAlRp AdvancedConfigAl `json:"advancedConfig,optional"` +} + +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 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 { CpuCores float64 `json:"cpuCores"` CpuRate float64 `json:"cpuRate"` CpuLimit float64 `json:"cpuLimit"` @@ -223,15 +264,110 @@ type TaskDetailResp struct { MemoryLimit float64 `json:"memoryLimit"` } -type ListCenterResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - Data CenterData `json:"data"` +type AppListReq struct { + NsID string `form:"nsID"` } -type CenterData struct { - TotalCount int `json:"totalCount"` - Centers []Center `json:"centers"` +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 Block_device_mapping_v2Commit struct { + Uuid string `json:"uuid,optional"` +} + +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 Center struct { @@ -277,333 +413,77 @@ type Center struct { HubCode int64 `json:"hubCode"` } -type ListClusterReq struct { - CenterId int32 `path:"centerId"` +type CenterData struct { + TotalCount int `json:"totalCount"` + Centers []Center `json:"centers"` } -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 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 ClusterMetrics struct { - Code int `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data []MetricResult `json:"data,omitempty"` -} - -type MetricResult struct { - MetricName string `json:"metric_name, omitempty"` - MetricData MetricData `json:"data, omitempty"` -} - -type MetricData struct { - Result []map[string]interface{} `json:"result"` - ResultType string `json:"resultType"` -} - -type ResultData struct { - Status string `json:"status"` - Data MetricData `json:"data"` -} - -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 { +type CenterIndex 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"` + Cpu string `json:"cpu"` + Memory string `json:"memory"` + Storage string `json:"storage"` + CenterType string `json:"centerType"` } -type AppListReq struct { - NsID string `form:"nsID"` +type ChangeAdministrativePasswordReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Changepassword string `json:"changePassword" copier:"Changepassword"` + Platform string `json:"platform,optional"` + ChangePassword ChangePassword `json:"changepassword" copier:"ChangePassword"` } -type AppListResp struct { - Apps []App `json:"apps"` //应用列表 +type ChangeAdministrativePasswordResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` } -type Replica struct { - ClusterName string `json:"clusterName"` - Replica int32 `json:"replica"` +type ChangePassword struct { + AdminPass string `json:"adminPass" copier:"AdminPass"` } -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 CleanStep struct { } -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 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"` // 创建人 + CreatedTime string `json:"createdTime"` // 创建时间 + Result string `json:"result"` } -type AppDetailReq struct { - Name string `path:"appName"` - NsID string `form:"nsID"` +type CloudResp struct { + Code string `json:"code"` + Msg string `json:"msg"` + Data string `json:"data"` } -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"` - Nickname string `form:"nickname,optional"` - Version string `form:"version,optional"` - Server string `form:"server,optional"` - PageInfo -} - -type AdapterReq struct { - Id string `json:"id,optional" db:"id"` - Name string `json:"name,optional"` - Type string `json:"type,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"` - 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"` - 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 { - Data AdapterInfo `json:"data,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"` - 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"` - PageInfo +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 ClusterCreateReq struct { @@ -629,6 +509,15 @@ type ClusterCreateReq struct { RegionDict string `json:"regionDict,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"` @@ -653,25 +542,28 @@ type ClusterInfo struct { CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` } -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 ClusterSumReq struct { +type ClusterLoadRecord struct { + AdapterId int64 `json:"adapterId"` + ClusterName string `json:"clusterName"` + CpuAvail float64 `json:"cpuAvail"` + CpuTotal float64 `json:"cpuTotal"` + CpuUtilisation float64 `json:"cpuUtilisation"` + MemoryAvail float64 `json:"memoryAvail"` + MemoryUtilisation float64 `json:"memoryUtilisation"` + MemoryTotal float64 `json:"memoryTotal"` + DiskAvail float64 `json:"diskAvail"` + DiskTotal float64 `json:"diskTotal"` + DiskUtilisation float64 `json:"diskUtilisation"` } -type ClusterSumReqResp struct { - ClusterSum int `json:"ClusterSum,omitempty"` - AdapterSum int `json:"AdapterSum,omitempty"` - TaskSum int `json:"TaskSum,omitempty"` +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 ClusterRelationInfo struct { @@ -703,593 +595,68 @@ type ClusterRelationInfo struct { CCreateTime string `json:"cCreateTime,omitempty" db:"created_time" gorm:"autoCreateTime"` } -type DictInfo 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" db:"type"` - Status string `json:"status,omitempty" db:"status"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` -} - -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"` +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"` PageInfo } -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 ClusterResp struct { + List ClusterInfo `json:"list,omitempty"` } -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 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 Dicts struct { - List []DictInfo `json:"list,omitempty"` +type ComputilityStatistics struct { + DomainSum int64 `json:"domainSum"` //域总数 + TotalComputility float64 `json:"totalComputility"` //算力总和 + ClusterNum int64 `json:"clusterNum"` //集群总数 } -type DictItemInfo struct { - Id string `json:"id,omitempty"` - DictId string `json:"dictId,omitempty"` - ItemText string `json:"itemText,omitempty"` - ItemValue string `json:"itemValue,omitempty"` - Description string `json:"description,omitempty"` - SortOrder string `json:"sortOrder,omitempty"` - Type string `json:"type,omitempty" db:"type"` - ParentId string `json:"parentId,omitempty"` - Status string `json:"status,omitempty" db:"status"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` +type ComputilityStatisticsResp struct { + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` + ComputilityStatistics ComputilityStatistics `json:"data"` //容器节点已使用 } -type DictItemReq struct { - Id string `form:"id,optional"` - DictId string `form:"dictId,optional"` - ItemText string `form:"itemText,optional"` - ItemValue string `form:"itemValue,optional"` - Description string `form:"description,optional"` - SortOrder string `form:"sortOrder,optional"` - Type string `form:"type,optional"` - ParentId string `form:"parentId,optional"` - Status string `form:"status,optional"` - PageInfo +type Config struct { + Script string `json:"script" copier:"Script"` + TypeConfig string `json:"type" copier:"TypeConfig"` } -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"` - Type string `json:"type,optional"` - ParentId string `json:"parentId,optional"` - Status string `json:"status,optional"` -} - -type DictItemResp struct { - Id string `json:"id,omitempty"` - DictId string `json:"dictId,omitempty"` - ItemText string `json:"itemText,omitempty"` - ItemValue string `json:"itemValue,omitempty"` - Description string `json:"description,omitempty"` - SortOrder string `json:"sortOrder,omitempty"` - Type string `json:"type,omitempty"` - ParentId string `json:"parentId,omitempty"` - Status string `json:"status,omitempty"` - CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` - DictInfo *DictInfo `json:"dictInfo,omitempty"` -} - -type DictItems struct { - List []DictItemInfo `json:"list,omitempty"` -} - -type DictCodeReq struct { - DictCode string `path:"dictCode"` -} - -type CId struct { - Id string `path:"id":"id,omitempty" validate:"required"` -} - -type CIds struct { - Ids []string `json:"ids,omitempty" validate:"required"` -} - -type FId struct { - Id string `form:"id":"id,omitempty" validate:"required"` -} - -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 Job struct { - SlurmVersion string `json:"slurmVersion"` - Name string `json:"name"` - JobStartTime string `json:"JobStartTime"` - JobRunTime string `json:"JobRunTime"` - StateofJob string `json:"StateofJob"` -} - -type CommitHpcTaskReq struct { - Name string `json:"name"` // paratera:jobName - Description string `json:"description,optional"` - TenantId int64 `json:"tenantId,optional"` - TaskId int64 `json:"taskId,optional"` - ParticipantId int64 `json:"participantId,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"` - StdOutFile string `json:"stdOutFile,optional"` - StdErrFile string `json:"stdErrFile,optional"` - StdInput string `json:"stdInput,optional"` - Environment map[string]string `json:"environment,optional"` -} - -type CommitHpcTaskResp struct { - TaskId int64 `json:"taskId"` -} - -type ListJobReq struct { -} - -type ListJobResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - RecordCount int32 `json:"recordCount"` - Jobs []Job `json:"jobInfos"` -} - -type HistoryJob struct { - SlurmVersion string `json:"slurmVersion"` - Name string `json:"name"` - JobStartTime string `json:"JobStartTime"` - JobRunTime string `json:"JobRunTime"` - StateofJob string `json:"StateofJob"` -} - -type ListHistoryJobReq struct { -} - -type ListHistoryJobResp struct { - Code int32 `json:"code"` - Msg string `json:"msg"` - RecordCount int32 `json:"recordCount"` - HistoryJobs []HistoryJob `json:"jobInfoDbs"` -} - -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 { - ProjectId string `path:"projectId"` - DatasetId string `path:"datasetId"` - ImportPath string `json:"importPath"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type ImportTaskDataResp struct { - TaskId string `json:"taskId,omitempty"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - 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"` - DatasetId string `json:"datasetId,omitempty"` - ImportPath string `json:"importPath,omitempty"` - ImportType int32 `json:"importType,omitempty"` - TotalSampleCount uint32 `json:"totalSampleCount,omitempty"` - ImportedSampleCount uint32 `json:"importedSampleCount,omitempty"` - AnnotatedSampleCount uint32 `json:"annotatedSampleCount,omitempty"` - TotalSubSampleCount uint32 `json:"totalSubSampleCount,omitempty"` - ImportedSubSampleCount uint32 `json:"importedSubSampleCount,omitempty"` - TotalFileSize uint32 `json:"totalFileSize,omitempty"` - FinishedFileCount uint32 `json:"finishedFileCount,omitempty"` - FinishedFileSize uint32 `json:"finishedFileSize,omitempty"` - TotalFileCount uint32 `json:"totalFileCount,omitempty"` - CreateTime uint32 `json:"createTime,omitempty"` - ElapsedTime uint32 `json:"elapsedTime,omitempty"` - AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"` -} - -type Annotations struct { - JobTemplate string `json:"jobTemplate"` - KeyTask string `json:"keyTask"` -} - -type TrainingExperimentReference struct { -} - -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 CPUUsage struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` -} - -type MemUsage struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` -} - -type Util struct { - Average int32 `json:"average"` - Max int32 `json:"max"` - Min int32 `json:"min"` -} - -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 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 { @@ -1301,476 +668,6 @@ type Constraint struct { 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 Remote `json:"remote"` - RemoteConstraints []RemoteConstraints `json:"remoteConstraints"` -} - -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 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 Policies struct { -} - -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 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 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 Engine `json:"engine"` - LocalCodeDir string `json:"localCodeDir"` - WorkingDir string `json:"workingDir"` - Environments []map[string]string `json:"environments"` -} - -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 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 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 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 Scheduler struct { - Duration int32 `json:"duration,optional" copier:"Duration"` - TimeUnit string `json:"timeUnit,optional" copier:"TimeUnit"` - Type string `json:"type,optional" copier:"Type"` -} - -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 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 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 ListServicesReq struct { - ProjectId string `path:"projectId"` - Limit int32 `form:"limit,optional"` - Offset int32 `form:"offSet,optional"` - ModelArtsType string `form:"modelArtsType,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 ListServices struct { - FailedTimes uint32 `json:"failedTimes,omitempty" copier:"FailedTimes"` - Owner string `json:"owner,omitempty" copier:"Owner"` - DueTime int32 `json:"dueTime,omitempty" copier:"DueTime"` - FinishedTime int32 `json:"finishedTime,omitempty" copier:"FinishedTime"` - InferType string `json:"inferType,omitempty" copier:"InferType"` - ServiceName string `json:"serviceName,omitempty" copier:"ServiceName"` - Description string `json:"description,omitempty" copier:"Description"` - Project string `json:"project,omitempty" copier:"Project"` - InvocationTimes uint32 `json:"invocationTimes,omitempty" copier:"InvocationTimes"` - PublishAt uint32 `json:"publishAt,omitempty" copier:"PublishAt"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - Scheduler []*Scheduler `json:"scheduler,omitempty" copier:"Scheduler"` - StartTime int32 `json:"startTime,omitempty" copier:"StartTime"` - OperationTime string `json:"operationTime,omitempty" copier:"OperationTime"` - IsShared bool `json:"isShared,omitempty" copier:"IsShared"` - ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` - Progress int32 `json:"progress,omitempty" copier:"Progress"` - SharedCount int32 `json:"sharedCount,omitempty" copier:"SharedCount"` - Tenant string `json:"tenant,omitempty" copier:"Tenant"` - Status string `json:"status,omitempty" copier:"Status"` - IsOpenedSampleCollection string `json:"isOpenedSampleCollection,omitempty" copier:"IsOpenedSampleCollection"` - TransitionAt int32 `json:"transitionAt,omitempty" copier:"TransitionAt"` - IsFree bool `json:"isFree,omitempty" copier:"IsFree"` - AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` -} - -type ShowServiceReq struct { - ProjectId string `path:"projectId"` - ServiceId string `path:"serviceId"` - ModelArtsType string `json:"modelartsType,optional"` -} - -type ShowServiceResp struct { - FailedTimes uint32 `json:"failedTimes,omitempty" copier:"FailedTimes"` - Owner string `json:"owner,omitempty" copier:"Owner"` - DueTime int32 `json:"dueTime,omitempty" copier:"DueTime"` - FinishedTime int32 `json:"finishedTime,omitempty" copier:"FinishedTime"` - InferType string `json:"inferType,omitempty" copier:"InferType"` - ServiceName string `json:"serviceName,omitempty" copier:"ServiceName"` - Description string `json:"description,omitempty" copier:"Description"` - Project string `json:"project,omitempty" copier:"Project"` - InvocationTimes uint32 `json:"invocationTimes,omitempty" copier:"InvocationTimes"` - PublishAt uint32 `json:"publishAt,omitempty" copier:"PublishAt"` - WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` - Scheduler []Scheduler `json:"scheduler,omitempty" copier:"Scheduler"` - StartTime int32 `json:"startTime,omitempty" copier:"StartTime"` - OperationTime string `json:"operationTime,omitempty" copier:"OperationTime"` - IsShared bool `json:"isShared,omitempty" copier:"IsShared"` - ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` - Progress int32 `json:"progress,omitempty" copier:"Progress"` - SharedCount int32 `json:"sharedCount,omitempty" copier:"SharedCount"` - Tenant string `json:"tenant,omitempty" copier:"Tenant"` - Status string `json:"status,omitempty" copier:"Status"` - IsOpenedSampleCollection string `json:"isOpenedSampleCollection,omitempty" copier:"IsOpenedSampleCollection"` - TransitionAt int32 `json:"transitionAt,omitempty" copier:"TransitionAt"` - IsFree bool `json:"isFree,omitempty" copier:"IsFree"` - AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` - ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` - VpcId string `json:"vpcId,omitempty" copier:"VpcId"` - SubnetNetworkId string `json:"subnetNetworkId,omitempty" copier:"SubnetNetworkId"` - SecurityGroupId string `json:"securityGroupId,omitempty" copier:"SecurityGroupId"` - Config []QueryServiceConfig `json:"config,omitempty" copier:"Config"` - AccessAddress string `json:"accessAddress,omitempty" copier:"AccessAddress"` - BindAccessAddress string `json:"bindAccessAddress,omitempty" copier:"BindAccessAddress"` - UpdateTime string `json:"updateTime,omitempty" copier:"UpdateTime"` - DebugUrl string `json:"debugUrl,omitempty" copier:"DebugUrl"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -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 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 ListClustersResp200 `json:"resp200,omitempty" copier:"Resp200"` - Resp400 ListClustersResp400 `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 ClusterNode struct { - Specification string `json:"specification,omitempty" copier:"Specification"` - Count int32 `json:"count,omitempty" copier:"Count"` - AvailableCount int32 `json:"availableCount,omitempty" copier:"AvailableCount"` -} - -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"` @@ -1780,134 +677,41 @@ type ConstraintAlRq struct { 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 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 InputsAlRq struct { - Name string `json:"name,optional"` - Description string `json:"description,optional"` - RemoteConstraints []RemoteConstraints `json:"remoteConstraints,optional"` +type ContainerHooks struct { + PostStart Config `json:"postStart" copier:"PostStart"` + PreStart Config `json:"preStart" copier:"PreStart"` } -type OutputsAl struct { - Name string `json:"name,optional"` - Description string `json:"description,optional"` +type ContainerHooksResp struct { + PostStart PostStart `json:"postStart,omitempty" copier:"PostStart"` // * + PreStart PreStart `json:"preStart,omitempty" copier:"PreStart"` // * } -type ResourceRequirements struct { - Key string `json:"key,optional"` - Value []string `json:"value,optional"` - Operator string `json:"operator,optional"` +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 AdvancedConfigAl struct { - AutoSearch AutoSearch `json:"autoSearch,optional"` +type ControllerMetricsResp struct { + Data interface{} `json:"data"` } -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 CreNetwork struct { + Uuid string `json:"uuid" copier:"Uuid"` } type CreateAlgorithmReq struct { @@ -1930,1156 +734,75 @@ type CreateAlgorithmResp struct { 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"` - ModelArtsType string `json:"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 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"` - ModelArtsType string `json:"modelArtsType,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 { - Duration int64 `json:"duration" copier:"Duration"` - TypeStartNotebook string `json:"type" copier:"TypeStartNotebook"` -} - -type StopNotebookReq struct { - Id string `json:"id" copier:"Id"` - ProjectId string `json:"projectId" copier:"ProjectId"` - ModelArtsType string `json:"modelArtsType,optional"` -} - -type StopNotebookResp struct { - NotebookResp NotebookResp `json:"notebookResp" copier:"NotebookResp"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -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 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 StorageScreenReq struct { -} - -type StorageScreenResp struct { - TotalSize int32 `json:"totalSize" copier:"TotalSize"` - AiCenterInfos []AiCenterInfos `json:"aiCenterInfos" copier:"AiCenterInfos"` - StorageUsed float32 `json:"storageUsed" copier:"StorageUsed"` - StorageUsing float32 `json:"storageUsing" copier:"StorageUsing"` - UsageRate float32 `json:"usageRate" copier:"UsageRate"` - UsingRate float32 `json:"usingRate" copier:"UsingRate"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -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 DailyPowerScreenReq struct { -} - -type DailyPowerScreenResp struct { - TotalSize int32 `json:"totalSize" copier:"TotalSize"` - DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type DailyComputerPowers struct { - Date string `json:"date" copier:"Date"` - ComputerPower float32 `json:"computerPower" copier:"ComputerPower"` -} - -type PerCenterComputerPowersReq struct { -} - -type PerCenterComputerPowersResp struct { - TotalSize int32 `json:"totalSize" copier:"TotalSize"` - PerCenterComputerPowers []PerCenterComputerPowers `json:"perCenterComputerPowers" copier:"PerCenterComputerPowers"` - AccOtJobInfo AccOtJobInfo `json:"accOtJobInfo" copier:"AccOtJobInfo"` - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"ErrorMsg,omitempty"` -} - -type PerCenterComputerPowers struct { - CenterName string `json:"centerName" copier:"CenterName"` - ComputerPower float32 `json:"computerPower" copier:"ComputerPower"` - JobCount int32 `json:"jobCount" copier:"JobCount"` - CenterId string `json:"centerId" copier:"CenterId"` -} - -type AccOtJobInfo struct { - AccRunSec int32 `json:"accRunSec" copier:"AccRunSec"` - AccCardRunSec float32 `json:"accCardRunSec" copier:"AccCardRunSec"` - AccOtJobNum int32 `json:"accOtJobNum" copier:"AccOtJobNum"` -} - -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 `json:"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 `json:"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 ListServersReq struct { - Limit int32 `form:"limit,optional"` - OffSet int32 `form:"offSet,optional"` - Platform string `json:"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 `json:"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"` - Key_name string `json:"key_name" copier:"key_name"` - Locked bool `json:"locked" copier:"locked"` - Name string `json:"name" copier:"name"` - Progress uint32 `json:"progress" copier:"progress"` - Status string `json:"status" copier:"status"` - Tenant_id string `json:"tenant_id" copier:"tenant_id"` - Updated string `json:"updated" copier:"updated"` - User_id string `json:"user_id" copier:"user_id"` -} - -type GetServersDetailedByIdReq struct { - ServerId string `form:"server_id" copier:"ServerId"` - Platform string `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"platform,optional"` -} - -type DeleteServerResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - ErrorMsg string `json:"errorMsg,omitempty"` -} - -type CreateServerReq struct { - Server Server `json:"server" copier:"Server"` - Platform string `json:"platform,optional"` -} - -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 { - Name string `json:"name,optional" copier:"Name"` - FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` - 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"` -} - -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 RebuildServerReq struct { - ServerId string `json:"server_id" copier:"ServerId"` - Platform string `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 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 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 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 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 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 CreateFlavorReq struct { @@ -3093,69 +816,16 @@ type CreateFlavorResp struct { 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 CreateFloatingIPReq struct { + Floatingip Floatingip `json:"floatingip,optional" copier:"floatingip"` + Platform string `json:"platform,optional" copier:"Platform"` } -type DeleteFlavorReq struct { - Platform string `json:"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 { - Limit int32 `form:"limit,optional"` - Platform string `json:"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 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 CreateImageReq struct { @@ -3185,90 +855,10 @@ type CreateImageResp struct { ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` } -type UploadOsImageReq struct { - ImageId string `form:"image_id" copier:"ImageId"` - Platform string `json:"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 `json:"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 `json:"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:",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 `json:"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 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 { @@ -3283,195 +873,6 @@ type CreateNetworkResp struct { 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 { - 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"` -} - -type SubnetResp 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"` -} - -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 `json:"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 `json:"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 `json:"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"` - NetworkId string `json:"network_id,optional" copier:"NetworkId"` - SegmentId string `json:"segment_id,optional" copier:"SegmentId"` - ProjectId string `json:"project_id,optional" copier:"ProjectId"` - TenantId string `json:"tenant_id,optional" copier:"TenantId"` - DnsNameservers string `json:"dns_nameservers,optional" copier:"DnsNameservers"` - Dns_publish_fixed_ip bool `json:"dns_publish_fixed_ip,optional" copier:"dns_publish_fixed_ip"` - Allocation_pools []Allocation_pool `json:"allocation_pools,optional" copier:"allocation_pools"` - Host_routes []string `json:"host_routes,optional" copier:"host_routes"` - Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` - Gateway_ip string `json:"gateway_ip,optional" copier:"gateway_ip"` - Cidr string `json:"cidr,optional" copier:"cidr"` - Id string `json:"id,optional" copier:"id"` - Description string `json:"description,optional" copier:"description"` - Ipv6_address_mode string `json:"ipv6_address_mode,optional" copier:"ipv6_address_mode"` - Ipv6_ra_mode string `json:"ipv6_ra_mode,optional" copier:"ipv6_ra_mode"` - Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` - Service_types []string `json:"service_types,optional" copier:"service_types"` - Subnetpool_id string `json:"subnetpool_id,optional" copier:"subnetpool_id"` - Tags []string `json:"tags,optional" copier:"tags"` - Updated_at string `json:"updated_at,optional" copier:"updated_at"` -} - -type Allocation_pool struct { - Start string `json:"start,optional" copier:"start"` - End string `json:"end,optional" copier:"end"` -} - -type DeleteSubnetReq struct { - SubnetId string `json:"subnet_id,optional" copier:"subnetId"` - Platform string `json:"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 UpdateSubnetReq struct { - SubnetId string `json:"subnet_id,optional" copier:"subnetId"` - Platform string `json:"platform,optional" copier:"Platform"` -} - -type UpdateSubnetResp struct { - 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 Network_segment_range `json:"network_segment_range,optional" copier:"NetworkSegmentRange"` Platform string `json:"platform,optional" copier:"Platform"` @@ -3484,1187 +885,6 @@ type CreateNetworkSegmentRangeResp struct { 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 ListNetworkSegmentRangesReq struct { - Limit int32 `json:"limit,optional"` - OffSet int32 `json:"offSet,optional"` - Platform string `json:"platform,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 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 DeleteNetworkSegmentRangesReq struct { - Network_segment_range_id string `json:"network_segment_range_id,optional" copier:"network_segment_range_id"` - Platform string `json:"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 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 `json:"platform,optional" copier:"Platform"` -} - -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 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 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 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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 { - Created_at string `json:"created_at" copier:"created_at"` - Id string `json:"id" copier:"id"` - Availability_zone string `json:"availability_zone" copier:"availability_zone"` - Encrypted bool `json:"encrypted" copier:"encrypted"` - Name string `json:"name" copier:"name"` - Size int32 `json:"size" copier:"size"` - Status string `json:"status" copier:"status"` - Tenant_id string `json:"tenant_id" copier:"tenant_id"` - Updated string `json:"Updated" copier:"updated"` - User_id string `json:"User_id" copier:"user_id"` - Description string `json:"description" copier:"description"` - Multiattach bool `json:"multiattach" copier:"multiattach"` - Bootable bool `json:"bootable" copier:"bootable"` - Volume_type string `json:"volume_type" copier:"volume_type"` - Count int32 `json:"count" copier:"Count"` - Shared_targets bool `json:"shared_targets" copier:"shared_targets"` - Consumes_quota bool `json:"consumes_quota" copier:"consumes_quota"` -} - -type DeleteVolumeReq struct { - VolumeId string `form:"volume_id" copier:"VolumeId"` - Cascade bool `json:"cascade" copier:"Cascade"` - Force bool `json:"force" copier:"force"` - Platform string `json:"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"` - 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 VolumeResp 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"` -} - -type ListVolumeTypesReq struct { - Platform string `json:"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 Extra_specs `json:"extra_specs" copier:"ExtraSpecs"` -} - -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 `json:"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 `json:"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 `json:"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 `json:"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 Links `json:"links" copier:"Links"` - Name string `json:"name" copier:"Name"` -} - -type ListFlavorsDetailReq struct { - Platform string `json:"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 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 `json:"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"` @@ -4700,15 +920,6 @@ type CreateNodeReq struct { 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"` @@ -4775,50 +986,441 @@ type CreateNodeResp struct { 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 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 DriverInternalInfo struct { +type CreateNotebookReq struct { + ProjectId string `json:"projectId" copier:"ProjectId"` + Param CreateNotebookParam `json:"param" copier:"Param"` + ModelArtsType string `json:"modelArtsType,optional"` } -type InstanceInfo struct { +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 Extra struct { +type CreatePortReq struct { + Port Port `json:"port,optional" copier:"port"` + Platform string `json:"platform,optional" copier:"Platform"` } -type RaidConfig struct { +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 TargetRaidConfig struct { +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 CleanStep struct { +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 DeployStep struct { +type CreateRouterReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `json:"platform,optional" copier:"Platform"` } -type Ports struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` +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 Portgroups struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` +type CreateSecurityGroupReq struct { + Platform string `json:"platform,optional" copier:"Platform"` + Firewall_rule_id string `json:"firewall_rule_id,optional" copier:"firewall_rule_id"` } -type States struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` +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 VolumeNode struct { - Href string `json:"href" copier:"href"` - Rel string `json:"rel" copier:"rel"` +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 CreateServerReq struct { + Server Server `json:"server" copier:"Server"` + Platform string `json:"platform,optional"` +} + +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 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 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 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 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 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 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 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 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 CustomHooks struct { + ContainerHooks ContainerHooks `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 DailyComputerPowers struct { + Date string `json:"date" copier:"Date"` + ComputerPower float32 `json:"computerPower" copier:"ComputerPower"` +} + +type DailyPowerScreenReq struct { +} + +type DailyPowerScreenResp struct { + TotalSize int32 `json:"totalSize" copier:"TotalSize"` + DailyComputerPowers []DailyComputerPowers `json:"dailyComputerPowers" copier:"DailyComputerPowers"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +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 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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 `json:"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 { @@ -4832,15 +1434,2674 @@ type DeleteNodeResp struct { ErrorMsg string `json:"errorMsg,omitempty"` } +type DeletePortReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Platform string `json:"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 `json:"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 `json:"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 `json:"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 DeleteServerReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + Platform string `json:"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 `json:"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 `json:"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 `json:"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 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 DictInfo 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" db:"type"` + Status string `json:"status,omitempty" db:"status"` + CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` +} + +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"` + Type string `json:"type,optional"` + ParentId string `json:"parentId,optional"` + Status string `json:"status,optional"` +} + +type DictItemInfo struct { + Id string `json:"id,omitempty"` + DictId string `json:"dictId,omitempty"` + ItemText string `json:"itemText,omitempty"` + ItemValue string `json:"itemValue,omitempty"` + Description string `json:"description,omitempty"` + SortOrder string `json:"sortOrder,omitempty"` + Type string `json:"type,omitempty" db:"type"` + ParentId string `json:"parentId,omitempty"` + Status string `json:"status,omitempty" db:"status"` + CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` +} + +type DictItemReq struct { + Id string `form:"id,optional"` + DictId string `form:"dictId,optional"` + ItemText string `form:"itemText,optional"` + ItemValue string `form:"itemValue,optional"` + Description string `form:"description,optional"` + SortOrder string `form:"sortOrder,optional"` + Type string `form:"type,optional"` + ParentId string `form:"parentId,optional"` + Status string `form:"status,optional"` + PageInfo +} + +type DictItemResp struct { + Id string `json:"id,omitempty"` + DictId string `json:"dictId,omitempty"` + ItemText string `json:"itemText,omitempty"` + ItemValue string `json:"itemValue,omitempty"` + Description string `json:"description,omitempty"` + SortOrder string `json:"sortOrder,omitempty"` + Type string `json:"type,omitempty"` + ParentId string `json:"parentId,omitempty"` + Status string `json:"status,omitempty"` + CreateTime string `json:"createTime,omitempty" db:"created_time" gorm:"autoCreateTime"` + DictInfo *DictInfo `json:"dictInfo,omitempty"` +} + +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 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 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 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 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 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 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 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 Fields struct { +} + +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 Billing `json:"billing"` + Attributes Attributes `json:"attributes"` + FlavorInfo FlavorInfo `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 ExtraSpecs `json:"Extra_specs" copier:"ExtraSpecs"` +} + +type FlavorInfo struct { + CPU CPU `json:"cpu"` + Gpu Gpu `json:"gpu"` + Memory Memory `json:"memory"` + Disk Disk `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 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 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 GetComputeLimitsReq struct { + Platform string `json:"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 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 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 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 GetServersDetailedByIdReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + Platform string `json:"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 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 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 GetVolumeDetailedByIdReq struct { + VolumeId string `form:"volume_id" copier:"VolumeId"` + Platform string `json:"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 GetVolumeLimitsReq struct { + Platform string `json:"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 GiResp struct { + CpuNum int32 `json:"cpuNum,optional"` + MemoryInGib int32 `json:"memoryInGib,optional"` + StorageInGib int32 `json:"storageInGib,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 HistoryJob struct { + SlurmVersion string `json:"slurmVersion"` + Name string `json:"name"` + JobStartTime string `json:"JobStartTime"` + JobRunTime string `json:"JobRunTime"` + StateofJob string `json:"StateofJob"` +} + +type Hooks struct { + ContainerHooksResp ContainerHooksResp `json:"containerHooks,omitempty" copier:"ContainerHooksResp"` // * +} + +type I18NDescription struct { + Language string `json:"language,optional"` + Description string `json:"description,optional"` +} + +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 ImageDetailed struct { + Id string `json:"id " copier:"Id"` + Links []Links `json:"links" copier:"Links"` +} + +type ImageNum struct { + ImageNum int32 `json:"imageNum"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` +} + +type ImageSl struct { + ImageId string `json:"imageId"` + ImageName string `json:"imageName"` + ImageStatus string `json:"imageStatus"` +} + +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 ImportTaskDataReq struct { + ProjectId string `path:"projectId"` + DatasetId string `path:"datasetId"` + ImportPath string `json:"importPath"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type ImportTaskDataResp struct { + TaskId string `json:"taskId,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"` + DatasetId string `json:"datasetId,omitempty"` + ImportPath string `json:"importPath,omitempty"` + ImportType int32 `json:"importType,omitempty"` + TotalSampleCount uint32 `json:"totalSampleCount,omitempty"` + ImportedSampleCount uint32 `json:"importedSampleCount,omitempty"` + AnnotatedSampleCount uint32 `json:"annotatedSampleCount,omitempty"` + TotalSubSampleCount uint32 `json:"totalSubSampleCount,omitempty"` + ImportedSubSampleCount uint32 `json:"importedSubSampleCount,omitempty"` + TotalFileSize uint32 `json:"totalFileSize,omitempty"` + FinishedFileCount uint32 `json:"finishedFileCount,omitempty"` + FinishedFileSize uint32 `json:"finishedFileSize,omitempty"` + TotalFileCount uint32 `json:"totalFileCount,omitempty"` + CreateTime uint32 `json:"createTime,omitempty"` + ElapsedTime uint32 `json:"elapsedTime,omitempty"` + AnnotationFormatConfig []interface{} `json:"annotationFormatConfig,omitempty"` +} + +type InputTra struct { + Name string `json:"name,optional"` + AccessMethod string `json:"accessMethod,optional"` + RemoteIn RemoteTra `json:"remoteIn,optional"` +} + +type Inputs struct { + 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 InstanceInfo struct { +} + +type Items struct { + 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 Job struct { + SlurmVersion string `json:"slurmVersion"` + Name string `json:"name"` + JobStartTime string `json:"JobStartTime"` + JobRunTime string `json:"JobRunTime"` + StateofJob string `json:"StateofJob"` +} + +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 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 EngineAlRq `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 EngineAlRq `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 Absolute `json:"absolute,optional"` +} + +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 ListClustersResp200 `json:"resp200,omitempty" copier:"Resp200"` + Resp400 ListClustersResp400 `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 `json:"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 ListFirewallPoliciesReq struct { + Platform string `json:"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 `json:"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 `json:"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 `json:"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 { + Limit int32 `form:"limit,optional"` + Platform string `json:"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 { + 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 ListNetworkSegmentRangesReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `json:"platform,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 ListNetworksReq struct { + Platform string `json:"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 ListNodesReq struct { + Platform string `json:"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 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 ListNotebookReq struct { + ProjectId string `json:"projectId" copier:"ProjectId"` + Param ListNotebookParam `json:"param,optional" copier:"Param"` + ModelArtsType string `json:"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 ListPortsReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `json:"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 ListRoutersReq struct { + Limit int32 `json:"limit,optional"` + OffSet int32 `json:"offSet,optional"` + Platform string `json:"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 `json:"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 ListSecurityGroupsReq struct { + Platform string `json:"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 ListServersDetailedReq struct { + Platform string `json:"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 `json:"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 ListServices struct { + FailedTimes uint32 `json:"failedTimes,omitempty" copier:"FailedTimes"` + Owner string `json:"owner,omitempty" copier:"Owner"` + DueTime int32 `json:"dueTime,omitempty" copier:"DueTime"` + FinishedTime int32 `json:"finishedTime,omitempty" copier:"FinishedTime"` + InferType string `json:"inferType,omitempty" copier:"InferType"` + ServiceName string `json:"serviceName,omitempty" copier:"ServiceName"` + Description string `json:"description,omitempty" copier:"Description"` + Project string `json:"project,omitempty" copier:"Project"` + InvocationTimes uint32 `json:"invocationTimes,omitempty" copier:"InvocationTimes"` + PublishAt uint32 `json:"publishAt,omitempty" copier:"PublishAt"` + WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` + Scheduler []*Scheduler `json:"scheduler,omitempty" copier:"Scheduler"` + StartTime int32 `json:"startTime,omitempty" copier:"StartTime"` + OperationTime string `json:"operationTime,omitempty" copier:"OperationTime"` + IsShared bool `json:"isShared,omitempty" copier:"IsShared"` + ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` + Progress int32 `json:"progress,omitempty" copier:"Progress"` + SharedCount int32 `json:"sharedCount,omitempty" copier:"SharedCount"` + Tenant string `json:"tenant,omitempty" copier:"Tenant"` + Status string `json:"status,omitempty" copier:"Status"` + IsOpenedSampleCollection string `json:"isOpenedSampleCollection,omitempty" copier:"IsOpenedSampleCollection"` + TransitionAt int32 `json:"transitionAt,omitempty" copier:"TransitionAt"` + IsFree bool `json:"isFree,omitempty" copier:"IsFree"` + 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"` +} + +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 `json:"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 `json:"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 `json:"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 `json:"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 Annotations `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 Migrate `json:"migrate" copier:"Migrate"` +} + +type MigrateServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +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 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 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:",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 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 Networks struct { + Uuid string `json:"uuid,optional"` + Port string `json:"port,optional"` + Fixed_ip string `json:"fixed_ip,optional"` + Tag string `json:"tag,optional"` +} + +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 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 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 Obs struct { + ObsURL string `json:"obsUrl"` +} + +type ObsTra struct { + ObsUrl string `json:"obsUrl,optional"` +} + +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 RemoteOut `json:"remoteOut,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 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 Constraint `json:"constraint"` +} + +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 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 `json:"platform,optional"` +} + +type PauseServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type PerCenterComputerPowers struct { + CenterName string `json:"centerName" copier:"CenterName"` + ComputerPower float32 `json:"computerPower" copier:"ComputerPower"` + JobCount int32 `json:"jobCount" copier:"JobCount"` + CenterId string `json:"centerId" copier:"CenterId"` +} + +type PerCenterComputerPowersReq struct { +} + +type PerCenterComputerPowersResp struct { + TotalSize int32 `json:"totalSize" copier:"TotalSize"` + PerCenterComputerPowers []PerCenterComputerPowers `json:"perCenterComputerPowers" copier:"PerCenterComputerPowers"` + AccOtJobInfo AccOtJobInfo `json:"accOtJobInfo" copier:"AccOtJobInfo"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type Personality struct { + Path string `json:"path" copier:"Path"` + Contents string `json:"contents" copier:"Contents"` +} + +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 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 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 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 Reboot `json:"reboot" copier:"Reboot"` + Platform string `json:"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 `json:"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 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 Obs `json:"obs"` +} + +type RemoteConstraints struct { + DataType string `json:"dataType"` + Attributes Attributes `json:"attributes,omitempty"` +} + +type RemoteOut struct { + Obs ObsTra `json:"obs,optional"` +} + +type RemoteTra struct { + DatasetIn DatasetTra `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 `json:"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 Resize struct { + FlavorRef string `json:"flavorRef" copier:"flavorRef"` +} + +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 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 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 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 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 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 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 ScheduleReq struct { + AiOption *AiOption `json:"aiOption,optional"` +} + +type ScheduleResp struct { + Success bool `json:"success"` + TaskId string `json:"taskId"` + ClusterId string `json:"clusterId"` + ErrorMsg string `json:"errorMsg"` +} + +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 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 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 { + Name string `json:"name,optional" copier:"Name"` + FlavorRef string `json:"flavorRef,optional" copier:"FlavorRef"` + 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"` +} + +type ServerCommit struct { + AllCardRunTime string `json:"allCardRunTime"` + FlavorRef string `json:"flavorRef,optional"` + Name string `json:"name,optional"` + ImageRef string `json:"imageRef,optional"` + AccessIPv4 string `json:"accessIPv4,optional"` + AccessIPv6 string `json:"accessIPv6,optional"` + AdminPass string `json:"adminPass,optional"` + Availability_zone string `json:"availability_zone,optional"` + Key_name string `json:"key_name,optional"` + Hostname string `json:"hostname,optional"` + Host string `json:"host,optional"` + Networks []Networks `json:"networks,optional"` +} + +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 Server `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 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 ServersDetailed struct { + Id string `json:"id" copier:"id"` + Key_name string `json:"key_name" copier:"key_name"` + Locked bool `json:"locked" copier:"locked"` + Name string `json:"name" copier:"name"` + Progress uint32 `json:"progress" copier:"progress"` + Status string `json:"status" copier:"status"` + Tenant_id string `json:"tenant_id" copier:"tenant_id"` + Updated string `json:"updated" copier:"updated"` + User_id string `json:"user_id" copier:"user_id"` +} + +type Servers_links struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` +} + +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 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 `json:"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 `json:"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 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 ShowFirewallRuleDetailsReq struct { + Platform string `json:"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 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 ShowNetworkDetailsReq struct { + NetworkId string `form:"network_id" copier:"NetworkId"` + Platform string `json:"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 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 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 ShowNodeDetailsReq struct { NodeIdent string `json:"node_ident" copier:"NodeIdent"` Fields []Fields `json:"fields" copier:"Fields"` Platform string `json:"platform,optional"` } -type Fields struct { -} - type ShowNodeDetailsResp struct { AllocationUuid string `json:"allocation_uuid" copier:"AllocationUuid"` Name string `json:"name" copier:"name"` @@ -4907,32 +4168,357 @@ type ShowNodeDetailsResp struct { ErrorMsg string `json:"errorMsg,omitempty"` } -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 ShowPortDetailsReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Fields string `json:"fields,optional" copier:"fields"` + Platform string `json:"platform,optional" copier:"platform"` } -type RegisterClusterReq struct { - Name string `form:"name"` // 名称 - Address string `form:"address"` // 地址 - Token string `form:"token"` // 数算集群token - MetricsUrl string `form:"metricsUrl"` //监控url +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 DeleteClusterReq struct { - Name string `form:"name"` // 名称 +type ShowRouterDetailsReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `json:"platform,optional" copier:"Platform"` } -type CloudResp struct { - Code string `json:"code"` - Msg string `json:"msg"` - Data string `json:"data"` +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 ShowSecurityGroupReq struct { + Platform string `json:"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 ShowSecurityGroupRuleReq struct { + Platform string `json:"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 ShowServiceReq struct { + ProjectId string `path:"projectId"` + ServiceId string `path:"serviceId"` + ModelArtsType string `json:"modelartsType,optional"` +} + +type ShowServiceResp struct { + FailedTimes uint32 `json:"failedTimes,omitempty" copier:"FailedTimes"` + Owner string `json:"owner,omitempty" copier:"Owner"` + DueTime int32 `json:"dueTime,omitempty" copier:"DueTime"` + FinishedTime int32 `json:"finishedTime,omitempty" copier:"FinishedTime"` + InferType string `json:"inferType,omitempty" copier:"InferType"` + ServiceName string `json:"serviceName,omitempty" copier:"ServiceName"` + Description string `json:"description,omitempty" copier:"Description"` + Project string `json:"project,omitempty" copier:"Project"` + InvocationTimes uint32 `json:"invocationTimes,omitempty" copier:"InvocationTimes"` + PublishAt uint32 `json:"publishAt,omitempty" copier:"PublishAt"` + WorkspaceId string `json:"workspaceId,omitempty" copier:"WorkspaceId"` + Scheduler []Scheduler `json:"scheduler,omitempty" copier:"Scheduler"` + StartTime int32 `json:"startTime,omitempty" copier:"StartTime"` + OperationTime string `json:"operationTime,omitempty" copier:"OperationTime"` + IsShared bool `json:"isShared,omitempty" copier:"IsShared"` + ServiceId string `json:"serviceId,omitempty" copier:"ServiceId"` + Progress int32 `json:"progress,omitempty" copier:"Progress"` + SharedCount int32 `json:"sharedCount,omitempty" copier:"SharedCount"` + Tenant string `json:"tenant,omitempty" copier:"Tenant"` + Status string `json:"status,omitempty" copier:"Status"` + IsOpenedSampleCollection string `json:"isOpenedSampleCollection,omitempty" copier:"IsOpenedSampleCollection"` + TransitionAt int32 `json:"transitionAt,omitempty" copier:"TransitionAt"` + IsFree bool `json:"isFree,omitempty" copier:"IsFree"` + AdditionalProperties map[string]string `json:"additionalProperties,omitempty" copier:"AdditionalProperties"` + ClusterId string `json:"clusterId,omitempty" copier:"ClusterId"` + VpcId string `json:"vpcId,omitempty" copier:"VpcId"` + SubnetNetworkId string `json:"subnetNetworkId,omitempty" copier:"SubnetNetworkId"` + SecurityGroupId string `json:"securityGroupId,omitempty" copier:"SecurityGroupId"` + Config []QueryServiceConfig `json:"config,omitempty" copier:"Config"` + AccessAddress string `json:"accessAddress,omitempty" copier:"AccessAddress"` + BindAccessAddress string `json:"bindAccessAddress,omitempty" copier:"BindAccessAddress"` + UpdateTime string `json:"updateTime,omitempty" copier:"UpdateTime"` + DebugUrl string `json:"debugUrl,omitempty" copier:"DebugUrl"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +type Spec struct { + Resource Resource `json:"resource"` + LogExportPath LogExportPath `json:"logExportPath"` + IsHostedLog bool `json:"isHostedLog"` +} + +type SpecCtRp struct { + Resource ResourceCreateTraining `json:"resource,optional"` + Volumes []Volumes `json:"volumes,optional"` + LogExportPath LogExportPath `json:"logExportPath,optional"` +} + +type SpecsCtRq struct { + Resource ResourceCreateTraining `json:"resource,optional"` + Volumes []Volumes `json:"volumes,optional"` + LogExportPath LogExportPath `json:"logExportPath,optional"` +} + +type StartNotebookParam struct { + Duration int64 `json:"duration" copier:"Duration"` + TypeStartNotebook string `json:"type" copier:"TypeStartNotebook"` +} + +type StartNotebookReq struct { + Id string `json:"id" copier:"Id"` + ProjectId string `json:"projectId" copier:"ProjectId"` + Param StartNotebookParam `json:"param" copier:"Param"` + ModelArtsType string `json:"modelArtsType,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 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 `json:"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 StopNotebookReq struct { + Id string `json:"id" copier:"Id"` + ProjectId string `json:"projectId" copier:"ProjectId"` + ModelArtsType string `json:"modelArtsType,optional"` +} + +type StopNotebookResp struct { + 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 `json:"platform,optional"` +} + +type StopServerResp struct { + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"errorMsg,omitempty"` + Code int32 `json:"code,omitempty"` +} + +type StorageScreenReq struct { +} + +type StorageScreenResp struct { + TotalSize int32 `json:"totalSize" copier:"TotalSize"` + AiCenterInfos []AiCenterInfos `json:"aiCenterInfos" copier:"AiCenterInfos"` + StorageUsed float32 `json:"storageUsed" copier:"StorageUsed"` + StorageUsing float32 `json:"storageUsing" copier:"StorageUsing"` + UsageRate float32 `json:"usageRate" copier:"UsageRate"` + UsingRate float32 `json:"usingRate" copier:"UsingRate"` + Code int32 `json:"code,omitempty"` + Msg string `json:"msg,omitempty"` + ErrorMsg string `json:"ErrorMsg,omitempty"` +} + +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 SubmitLinkTaskResp struct { + Success bool `json:"success"` + TaskId string `json:"taskId"` + ErrorMsg string `json:"errorMsg"` +} + +type 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"` +} + +type SubnetResp 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"` +} + +type Subnets struct { + Name string `json:"name,optional" copier:"Name"` + Enable_dhcp bool `json:"enable_dhcp,optional" copier:"Enable_dhcp"` + NetworkId string `json:"network_id,optional" copier:"NetworkId"` + SegmentId string `json:"segment_id,optional" copier:"SegmentId"` + ProjectId string `json:"project_id,optional" copier:"ProjectId"` + TenantId string `json:"tenant_id,optional" copier:"TenantId"` + DnsNameservers string `json:"dns_nameservers,optional" copier:"DnsNameservers"` + Dns_publish_fixed_ip bool `json:"dns_publish_fixed_ip,optional" copier:"dns_publish_fixed_ip"` + Allocation_pools []Allocation_pool `json:"allocation_pools,optional" copier:"allocation_pools"` + Host_routes []string `json:"host_routes,optional" copier:"host_routes"` + Ip_version uint32 `json:"ip_version,optional" copier:"ip_version"` + Gateway_ip string `json:"gateway_ip,optional" copier:"gateway_ip"` + Cidr string `json:"cidr,optional" copier:"cidr"` + Id string `json:"id,optional" copier:"id"` + Description string `json:"description,optional" copier:"description"` + Ipv6_address_mode string `json:"ipv6_address_mode,optional" copier:"ipv6_address_mode"` + Ipv6_ra_mode string `json:"ipv6_ra_mode,optional" copier:"ipv6_ra_mode"` + Revision_number uint32 `json:"revision_number,optional" copier:"revision_number"` + Service_types []string `json:"service_types,optional" copier:"service_types"` + Subnetpool_id string `json:"subnetpool_id,optional" copier:"subnetpool_id"` + Tags []string `json:"tags,optional" copier:"tags"` + 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 `json:"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 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 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 TaskSl struct { + TaskId string `json:"taskId"` + TaskName string `json:"taskName"` + TaskStatus string `json:"taskStatus"` + StartedAt int64 `json:"startedAt"` + CompletedAt int64 `json:"completedAt"` +} + +type TaskStatuses struct { + Task string `json:"task,omitempty"` + ExitCode string `json:"exitCode,omitempty"` + Message string `json:"message,omitempty"` +} + +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 { @@ -4948,59 +4534,179 @@ type TenantInfo struct { UpdatedTime string `json:"updated_time"` // 更新时间 } +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 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 `json:"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 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 `json:"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 Firewall_group `json:"firewall_group,optional" copier:"firewall_group"` + Platform string `json:"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 UpdateFloatingIPReq struct { + Platform string `json:"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 UpdateNetworkReq struct { + NetworkId string `form:"network_id" copier:"NetworkId"` + Network Network `json:"network" copier:"Network"` + Platform string `json:"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 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 `json:"platform,optional" copier:"Platform"` +} + +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 UpdatePortReq struct { + Port_id string `json:"port_id,optional" copier:"port_id"` + Port Port `json:"port,optional" copier:"port"` + Platform string `json:"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 UpdateRouterReq struct { + Router Router `json:"router,optional" copier:"router"` + Platform string `json:"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 UpdateSecurityGroupReq struct { + Platform string `json:"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 UpdateServerReq struct { + ServerId string `form:"server_id" copier:"ServerId"` + ServerUpdate ServerUpdate `json:"server_update" copier:"ServerUpdate"` + Platform string `json:"platform,optional"` +} + +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 UpdateSubnetReq struct { + SubnetId string `json:"subnet_id,optional" copier:"subnetId"` + Platform string `json:"platform,optional" copier:"Platform"` +} + +type UpdateSubnetResp struct { + Code int32 `json:"code,omitempty" copier:"Code"` + Msg string `json:"msg,omitempty" copier:"Msg"` + ErrorMsg string `json:"errorMsg,omitempty" copier:"ErrorMsg"` +} + type UpdateTenantReq struct { Tenants []TenantInfo `json:"tenants"` } -type ControllerMetricsResp struct { - Data interface{} `json:"data"` +type UpdateVolumeReq struct { + Volume Volume `json:"volume" copier:"Volume"` + VolumeId string `json:"volume_id" copier:"VolumeId"` + Platform string `json:"platform,optional"` } -type ApplyReq struct { - YamlString string `json:"yamlString" copier:"yamlString"` +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 DeleteReq 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 DeleteResp struct { - Code int32 `json:"code,omitempty"` - Msg string `json:"msg,omitempty"` - Data string `json:"data,omitempty"` -} - -type DataSet struct { - ApiVersion int32 `json:"apiVersion,omitempty"` - Kind string `json:"kind,omitempty"` - Name string `json:"name,omitempty"` - NameSpace string `json:"nameSpace,omitempty"` -} - -type CloudListResp struct { - Clouds []Cloud `json:"clouds"` -} - -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"` // 创建人 - CreatedTime string `json:"createdTime"` // 创建时间 - Result string `json:"result"` +type UploadImageReq struct { + Name string `json:"name" copier:"name"` } type UploadLinkImageReq struct { @@ -5014,148 +4720,421 @@ type UploadLinkImageResp struct { ErrorMsg string `json:"errorMsg"` } -type ImageSl struct { - ImageId string `json:"imageId"` - ImageName string `json:"imageName"` - ImageStatus string `json:"imageStatus"` +type UploadOsImageReq struct { + ImageId string `form:"image_id" copier:"ImageId"` + Platform string `json:"platform,optional"` } -type GetLinkImageListReq struct { - PartId int64 `json:"partId"` +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 GetLinkImageListResp struct { - Success bool `json:"success"` - Images []*ImageSl `json:"images"` - ErrorMsg string `json:"errorMsg"` +type Used struct { } -type DeleteLinkImageReq struct { - PartId int64 `json:"partId"` - ImageId string `json:"imageId"` +type UserNotebookDomain struct { + Id string `json:"id,omitempty" copier:"Id"` // * + Name string `json:"name,omitempty" copier:"Name"` // * } -type DeleteLinkImageResp struct { - Success bool `json:"success"` - ErrorMsg string `json:"errorMsg"` +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 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 Util struct { + Average int32 `json:"average"` + Max int32 `json:"max"` + Min int32 `json:"min"` } -type EnvSl struct { - Key string `json:"key"` - Val string `json:"value"` +type VmLinks struct { + Href string `json:"href " copier:"Href"` + Rel string `json:"rel" copier:"Rel"` } -type ParamSl struct { - Key string `json:"key"` - Val string `json:"value"` +type VmSecurity_groups_server struct { + Name string `json:"name" copier:"Name"` } -type SubmitLinkTaskResp struct { - Success bool `json:"success"` - TaskId string `json:"taskId"` - ErrorMsg string `json:"errorMsg"` +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 GetLinkTaskReq struct { - PartId int64 `json:"partId"` - TaskId string `json:"taskId"` +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 GetLinkTaskResp struct { - Success bool `json:"success"` - Task *TaskSl `json:"task"` - ErrorMsg string `json:"errorMsg"` +type VolumeDetail struct { + Created_at string `json:"created_at" copier:"created_at"` + Id string `json:"id" copier:"id"` + Availability_zone string `json:"availability_zone" copier:"availability_zone"` + Encrypted bool `json:"encrypted" copier:"encrypted"` + Name string `json:"name" copier:"name"` + Size int32 `json:"size" copier:"size"` + Status string `json:"status" copier:"status"` + Tenant_id string `json:"tenant_id" copier:"tenant_id"` + Updated string `json:"Updated" copier:"updated"` + User_id string `json:"User_id" copier:"user_id"` + Description string `json:"description" copier:"description"` + Multiattach bool `json:"multiattach" copier:"multiattach"` + Bootable bool `json:"bootable" copier:"bootable"` + Volume_type string `json:"volume_type" copier:"volume_type"` + Count int32 `json:"count" copier:"Count"` + Shared_targets bool `json:"shared_targets" copier:"shared_targets"` + Consumes_quota bool `json:"consumes_quota" copier:"consumes_quota"` } -type DeleteLinkTaskReq struct { - PartId int64 `json:"partId"` - TaskId string `json:"taskId"` +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 DeleteLinkTaskResp struct { - Success bool `json:"success"` - ErrorMsg string `json:"errorMsg"` +type VolumeLimits struct { + Rate VolumeRate `json:"rate,optional"` + Absolute VolumeAbsolute `json:"absolute,optional"` } -type TaskSl struct { - TaskId string `json:"taskId"` - TaskName string `json:"taskName"` - TaskStatus string `json:"taskStatus"` - StartedAt int64 `json:"startedAt"` - CompletedAt int64 `json:"completedAt"` +type VolumeNode struct { + Href string `json:"href" copier:"href"` + Rel string `json:"rel" copier:"rel"` } -type GetParticipantsReq struct { +type VolumeRate struct { } -type GetParticipantsResp struct { - Success bool `json:"success"` - Participants []*ParticipantSl `json:"participant"` +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 GetResourceSpecsReq struct { - PartId int64 `json:"partId"` +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 GetResourceSpecsResp struct { - Success bool `json:"success"` - ResourceSpecs []*ResourceSpecSl `json:"resourceSpecs"` - ErrorMsg string `json:"errorMsg"` +type VolumeResp 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"` } -type ResourceSpecSl struct { - ParticipantId int64 `json:"participantId"` - ParticipantName string `json:"participantName"` - SpecName string `json:"specName"` - SpecId string `json:"specId"` - SpecPrice float64 `json:"specPrice"` +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 ParticipantSl struct { - ParticipantId int64 `json:"id"` - ParticipantName string `json:"name"` - ParticipantType string `json:"type"` +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 Extra_specs `json:"extra_specs" copier:"ExtraSpecs"` } -type ScheduleReq struct { - AiOption *AiOption `json:"aiOption,optional"` +type Volumes struct { + Nfs *Nfs `json:"nfs,optional"` } -type ScheduleResp struct { - Success bool `json:"success"` - TaskId string `json:"taskId"` - ClusterId string `json:"clusterId"` - ErrorMsg string `json:"errorMsg"` +type VolumesList struct { + Id string `json:"id" copier:"Id"` + Links Links `json:"links" copier:"Links"` + Name string `json:"name" copier:"Name"` } -type AiOption struct { - ResourceType string `json:"resourceType"` - TaskType string `json:"taskType"` - Datasets string `json:"datasets"` - Strategy string `json:"strategy"` +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 AiResourceTypesResp struct { - ResourceTypes []string `json:"resourceTypes"` +type CenterResourcesResp struct { + CentersIndex []CenterIndex `json:"centersIndex"` } -type AiTaskTypesResp struct { - TaskTypes []string `json:"taskTypes"` +type CheckReq struct { + FileMd5 string `path:"fileMd5"` } -type AiDatasetsResp struct { - Datasets []string `json:"datasets"` +type CheckResp struct { + Exist bool `json:"exist"` } -type AiStrategyResp struct { - Strategies []string `json:"strategies"` +type CloudListResp struct { + Clouds []Cloud `json:"clouds"` +} + +type ClusterSumReq struct { +} + +type ClusterSumReqResp struct { + ClusterSum int `json:"ClusterSum,omitempty"` + AdapterSum int `json:"AdapterSum,omitempty"` + TaskSum int `json:"TaskSum,omitempty"` +} + +type CommitHpcTaskReq struct { + Name string `json:"name"` // paratera:jobName + Description string `json:"description,optional"` + TenantId int64 `json:"tenantId,optional"` + TaskId int64 `json:"taskId,optional"` + ParticipantId int64 `json:"participantId,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"` + StdOutFile string `json:"stdOutFile,optional"` + StdErrFile string `json:"stdErrFile,optional"` + StdInput string `json:"stdInput,optional"` + Environment map[string]string `json:"environment,optional"` +} + +type CommitHpcTaskResp struct { + TaskId int64 `json:"taskId"` +} + +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"` + NsID string `json:"nsID"` + Replicas int64 `json:"replicas,optional"` + MatchLabels map[string]string `json:"matchLabels,optional"` + Server []ServerCommit `json:"server,optional"` + Platform string `json:"platform,optional"` +} + +type CommitVmTaskResp 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 CpResp struct { + POpsAtFp16 float32 `json:"pOpsAtFp16"` +} + +type DeleteClusterReq struct { + Name string `form:"name"` // 名称 +} + +type DeleteTaskReq struct { + Id int64 `path:"id"` +} + +type GetClusterListReq struct { + Id int64 `form:"id"` +} + +type GetClusterListResp struct { + Clusters []ClusterInfo `json:"clusters"` +} + +type GetRegionResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data RegionNum `json:"data"` +} + +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 JobTotalResp struct { + AllCardRunTime float64 `json:"allCardRunTime"` + AllJobCount float64 `json:"allJobCount"` + AllJobRunTime float64 `json:"allJobRunTime"` + TrainJobs []TrainJob `json:"trainJobs"` +} + +type ListCenterResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data CenterData `json:"data"` +} + +type ListClusterReq struct { + CenterId int32 `path:"centerId"` +} + +type ListClusterResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data ClusterData `json:"data"` +} + +type ListHistoryJobReq struct { +} + +type ListHistoryJobResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"recordCount"` + HistoryJobs []HistoryJob `json:"jobInfoDbs"` +} + +type ListJobReq struct { +} + +type ListJobResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + RecordCount int32 `json:"recordCount"` + Jobs []Job `json:"jobInfos"` +} + +type ListRegionResp struct { + Code int32 `json:"code"` + Msg string `json:"msg"` + Data []Region `json:"data"` +} + +type ParticipantListResp struct { + Participants []Participant `json:"participants"` +} + +type RemoveSecurityGroupReq struct { + ServerId string `json:"server_id" copier:"ServerId"` + Platform string `json:"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 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"` } diff --git a/go.mod b/go.mod index 13dde252..20445f33 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/JCCE-nudt/zero-contrib/zrpc/registry/nacos v0.0.0-20230419021610-13bbc83fbc3c github.com/Masterminds/squirrel v1.5.4 github.com/aliyun/alibaba-cloud-sdk-go v1.61.1800 - github.com/aws/aws-sdk-go v1.47.5 + github.com/aws/aws-sdk-go v1.50.8 github.com/bwmarrin/snowflake v0.3.0 github.com/docker/docker v24.0.7+incompatible github.com/ghodss/yaml v1.0.0 @@ -17,11 +17,11 @@ require ( github.com/json-iterator/go v1.1.12 github.com/nacos-group/nacos-sdk-go/v2 v2.2.4 github.com/pkg/errors v0.9.1 + github.com/prometheus/alertmanager v0.27.0 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/common v0.50.0 github.com/robfig/cron/v3 v3.0.1 github.com/rs/zerolog v1.28.0 - github.com/shopspring/decimal v1.3.1 github.com/zeromicro/go-zero v1.6.3 gitlink.org.cn/JointCloud/pcm-kubernetes v0.0.0-20240301071143-347480abff2c gitlink.org.cn/JointCloud/pcm-openstack v0.0.0-20240307072630-6ff50727536a @@ -45,11 +45,16 @@ require ( require ( github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect + github.com/alecthomas/kingpin/v2 v2.4.0 // indirect + github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 // indirect github.com/alibabacloud-go/tea v1.1.17 // indirect github.com/alibabacloud-go/tea-utils v1.4.4 // indirect github.com/aliyun/alibabacloud-dkms-gcs-go-sdk v0.2.2 // indirect github.com/aliyun/alibabacloud-dkms-transfer-go-sdk v0.1.7 // indirect + github.com/armon/go-metrics v0.3.10 // indirect + github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect + github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/buger/jsonparser v1.1.1 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect @@ -63,43 +68,78 @@ require ( github.com/docker/go-units v0.5.0 // indirect github.com/emicklei/go-restful/v3 v3.11.3 // indirect github.com/fatih/color v1.16.0 // indirect + github.com/go-kit/log v0.2.1 // indirect + github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-logr/logr v1.4.1 // indirect github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-openapi/analysis v0.22.2 // indirect + github.com/go-openapi/errors v0.21.0 // indirect github.com/go-openapi/jsonpointer v0.20.3 // indirect github.com/go-openapi/jsonreference v0.20.5 // indirect + github.com/go-openapi/loads v0.21.5 // indirect + github.com/go-openapi/runtime v0.27.1 // indirect + github.com/go-openapi/spec v0.20.14 // indirect + github.com/go-openapi/strfmt v0.22.0 // indirect github.com/go-openapi/swag v0.22.10 // indirect + github.com/go-openapi/validate v0.23.0 // indirect + github.com/gofrs/uuid v4.4.0+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.0 // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect + github.com/google/btree v1.0.1 // indirect github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect github.com/google/go-cmp v0.6.0 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect + github.com/hashicorp/errwrap v1.1.0 // indirect + github.com/hashicorp/go-immutable-radix v1.3.1 // indirect + github.com/hashicorp/go-msgpack v0.5.3 // indirect + github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-sockaddr v1.0.6 // indirect + github.com/hashicorp/golang-lru v0.5.4 // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect + github.com/hashicorp/memberlist v0.5.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/josharian/intern v1.0.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/miekg/dns v1.1.41 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/oklog/run v1.1.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/opencontainers/image-spec v1.0.2 // indirect + github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect github.com/pelletier/go-toml/v2 v2.1.1 // indirect github.com/prometheus/client_model v0.6.0 // indirect + github.com/prometheus/common/sigv4 v0.1.0 // indirect + github.com/prometheus/exporter-toolkit v0.11.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect github.com/redis/go-redis/v9 v9.5.1 // indirect + github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 // indirect + github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect + github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect + github.com/xhit/go-str2duration/v2 v2.1.0 // indirect + github.com/xlab/treeprint v1.2.0 // indirect go.etcd.io/etcd/api/v3 v3.5.12 // indirect go.etcd.io/etcd/client/pkg/v3 v3.5.12 // indirect go.etcd.io/etcd/client/v3 v3.5.12 // indirect + go.mongodb.org/mongo-driver v1.13.1 // indirect go.opentelemetry.io/otel v1.24.0 // indirect go.opentelemetry.io/otel/exporters/jaeger v1.17.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.24.0 // indirect diff --git a/go.sum b/go.sum index ebd640ab..cf7c30bb 100644 --- a/go.sum +++ b/go.sum @@ -393,6 +393,7 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DATA-DOG/go-sqlmock v1.5.2 h1:OcvFkGmslmlZibjAjaHm3L//6LiuBgolP7OputlJIzU= github.com/DATA-DOG/go-sqlmock v1.5.2/go.mod h1:88MAG/4G7SMwSE3CeA0ZKzrT5CiOU3OJ+JlNzwDqpNU= +github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/JCCE-nudt/zero-contrib/zrpc/registry/nacos v0.0.0-20230419021610-13bbc83fbc3c h1:qoPu5FeE6dsvZ7AmH/l3Y5RxrJPNVKvsQSrjQpWUCMQ= github.com/JCCE-nudt/zero-contrib/zrpc/registry/nacos v0.0.0-20230419021610-13bbc83fbc3c/go.mod h1:GuCS4be9IH3bSBTvbzz34nszPQDO33PIOv5nviEaFMw= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= @@ -405,11 +406,15 @@ github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbt github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/sarama v1.37.2/go.mod h1:Nxye/E+YPru//Bpaorfhc3JsSGYwCaDDj+R4bK52U5o= github.com/Shopify/toxiproxy/v2 v2.5.0/go.mod h1:yhM2epWtAmel9CB8r2+L+PCmhH6yH2pITaPAo7jxJl0= +github.com/alecthomas/kingpin/v2 v2.4.0 h1:f48lwail6p8zpO1bC4TxtqACaGqHYA22qkHjHpqDjYY= +github.com/alecthomas/kingpin/v2 v2.4.0/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= +github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68 h1:NqugFkGxx1TXSh/pBcU00Y6bljgDPaFdh5MUSeJ7e50= github.com/alibabacloud-go/debug v0.0.0-20190504072949-9472017b5c68/go.mod h1:6pb/Qy8c+lqua8cFpEy7g39NRRqOWc3rOwAy8m5Y2BY= github.com/alibabacloud-go/tea v1.1.0/go.mod h1:IkGyUSX4Ba1V+k4pCtJUc6jDpZLFph9QMy2VUPTwukg= @@ -431,11 +436,19 @@ github.com/aliyun/alibabacloud-dkms-gcs-go-sdk v0.2.2/go.mod h1:GDtq+Kw+v0fO+j5B github.com/aliyun/alibabacloud-dkms-transfer-go-sdk v0.1.7 h1:olLiPI2iM8Hqq6vKnSxpM3awCrm9/BeOgHpzQkOYnI4= github.com/aliyun/alibabacloud-dkms-transfer-go-sdk v0.1.7/go.mod h1:oDg1j4kFxnhgftaiLJABkGeSvuEvSF5Lo6UmRAMruX4= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= +github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= +github.com/armon/go-metrics v0.3.10 h1:FR+drcQStOe+32sYyJYyZ7FIdgoGGBnwLl+flodp8Uo= +github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= -github.com/aws/aws-sdk-go v1.47.5 h1:U2JlfPmrUoz5p+2X/XwKxmaJFo2oV+LbJqx8jyEvyAY= -github.com/aws/aws-sdk-go v1.47.5/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= +github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= +github.com/aws/aws-sdk-go v1.50.8 h1:gY0WoOW+/Wz6XmYSgDH9ge3wnAevYDSQWPxxJvqAkP4= +github.com/aws/aws-sdk-go v1.50.8/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= +github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= +github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -463,6 +476,8 @@ github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= +github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= +github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= @@ -542,9 +557,12 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= +github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= +github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= +github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= @@ -555,6 +573,10 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-openapi/analysis v0.22.2 h1:ZBmNoP2h5omLKr/srIC9bfqrUGzT6g6gNv03HE9Vpj0= +github.com/go-openapi/analysis v0.22.2/go.mod h1:pDF4UbZsQTo/oNuRfAWWd4dAh4yuYf//LYorPTjrpvo= +github.com/go-openapi/errors v0.21.0 h1:FhChC/duCnfoLj1gZ0BgaBmzhJC2SL/sJr8a2vAobSY= +github.com/go-openapi/errors v0.21.0/go.mod h1:jxNTMUxRCKj65yb/okJGEtahVd7uvWnuWfj53bse4ho= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonpointer v0.20.3 h1:jykzYWS/kyGtsHfRt6aV8JTB9pcQAXPIA7qlZ5aRlyk= @@ -563,10 +585,20 @@ github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL9 github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo= github.com/go-openapi/jsonreference v0.20.5 h1:hutI+cQI+HbSQaIGSfsBsYI0pHk+CATf8Fk5gCSj0yI= github.com/go-openapi/jsonreference v0.20.5/go.mod h1:thAqAp31UABtI+FQGKAQfmv7DbFpKNUlva2UPCxKu2Y= +github.com/go-openapi/loads v0.21.5 h1:jDzF4dSoHw6ZFADCGltDb2lE4F6De7aWSpe+IcsRzT0= +github.com/go-openapi/loads v0.21.5/go.mod h1:PxTsnFBoBe+z89riT+wYt3prmSBP6GDAQh2l9H1Flz8= +github.com/go-openapi/runtime v0.27.1 h1:ae53yaOoh+fx/X5Eaq8cRmavHgDma65XPZuvBqvJYto= +github.com/go-openapi/runtime v0.27.1/go.mod h1:fijeJEiEclyS8BRurYE1DE5TLb9/KZl6eAdbzjsrlLU= +github.com/go-openapi/spec v0.20.14 h1:7CBlRnw+mtjFGlPDRZmAMnq35cRzI91xj03HVyUi/Do= +github.com/go-openapi/spec v0.20.14/go.mod h1:8EOhTpBoFiask8rrgwbLC3zmJfz4zsCUueRuPM6GNkw= +github.com/go-openapi/strfmt v0.22.0 h1:Ew9PnEYc246TwrEspvBdDHS4BVKXy/AOVsfqGDgAcaI= +github.com/go-openapi/strfmt v0.22.0/go.mod h1:HzJ9kokGIju3/K6ap8jL+OlGAbjpSv27135Yr9OivU4= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/swag v0.22.10 h1:4y86NVn7Z2yYd6pfS4Z+Nyh3aAUL3Nul+LMbhFKy0gA= github.com/go-openapi/swag v0.22.10/go.mod h1:Cnn8BYtRlx6BNE3DPN86f/xkapGIcLWzh3CLEb4C1jI= +github.com/go-openapi/validate v0.23.0 h1:2l7PJLzCis4YUGEoW6eoQw3WhyM65WSIcjX6SQnlfDw= +github.com/go-openapi/validate v0.23.0/go.mod h1:EeiAZ5bmpSIOJV1WLfyYF9qp/B1ZgSaEpHTJHtN5cbE= github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI= github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-resty/resty/v2 v2.11.0 h1:i7jMfNOJYMp69lq7qozJP+bjgzfAzeOhuGlyDrqxT/8= @@ -579,6 +611,8 @@ github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg78 github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= +github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -630,6 +664,7 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.1 h1:gK4Kx5IaGY9CD5sPJ36FHiBJ6ZXl0kilRiiCj+jdYp4= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= github.com/google/gnostic v0.5.7-v3refs/go.mod h1:73MKFl6jIHelAJNaBGFzt3SPtZULs9dYrGFt8OiIsHQ= github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 h1:0VpGH+cDhbDtdcweoyCVsF3fhN8kejK6rFe/2FFX2nU= @@ -712,12 +747,33 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHg github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542 h1:2VTzZjLZBgl62/EtslCrtky5vbi9dd7HrQPQIx6wqiw= github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= +github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= +github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= +github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= +github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= +github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= +github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= +github.com/hashicorp/go-sockaddr v1.0.6 h1:RSG8rKU28VTUTvEKghe5gIhIQpv8evvNpnDEyqO4u9I= +github.com/hashicorp/go-sockaddr v1.0.6/go.mod h1:uoUUmtwU7n9Dv3O4SNLeFvg0SxQ3lyjsj6+CCykpaxI= +github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= +github.com/hashicorp/memberlist v0.5.0 h1:EtYPN8DpAURiapus508I4n9CzHs2W+8NZGbmmR/prTM= +github.com/hashicorp/memberlist v0.5.0/go.mod h1:yvyXLpo0QaGE59Y7hDTsTzDD25JYBZ4mHgHUZ8lrOI0= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -763,6 +819,7 @@ github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2E github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v1.1.5/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= +github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -815,9 +872,16 @@ github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOj github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= +github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/microsoft/go-mssqldb v0.17.0 h1:Fto83dMZPnYv1Zwx5vHHxpNraeEaUlQ/hhHLgZiaenE= github.com/microsoft/go-mssqldb v0.17.0/go.mod h1:OkoNGhGEs8EZqchVTtochlXruEhEOaO4S0d2sB5aeGQ= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= +github.com/miekg/dns v1.1.41 h1:WMszZWJG0XmzbK9FEmzH2TVcqYzFesusSIB41b8KHxY= +github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/moby/spdystream v0.2.0/go.mod h1:f7i0iNDQJ059oMTcWxx8MA/zKFIuD/lY+0GqbN2Wy8c= github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0= github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= @@ -846,6 +910,10 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= +github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= @@ -876,9 +944,14 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= github.com/opencontainers/image-spec v1.0.2/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= +github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.4.1/go.mod h1:qY0VqDSN1pOBN94dBc6w2GJlWLiovAyg7Qt6/I9HecM= github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDOCg/jA= github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= +github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= +github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml/v2 v2.0.7/go.mod h1:eumQOmlWiOPt5WriQQqoM5y18pDHwha2N+QD+EUNTek= github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= @@ -896,8 +969,11 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g= github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U= +github.com/prometheus/alertmanager v0.27.0 h1:V6nTa2J5V4s8TG4C4HtrBP/WNSebCCTYGGv4qecA/+I= +github.com/prometheus/alertmanager v0.27.0/go.mod h1:8Ia/R3urPmbzJ8OsdvmZvIprDwvwmYCmUbwBL+jlPOE= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= +github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= @@ -915,14 +991,21 @@ github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3d github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos= github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.50.0 h1:YSZE6aa9+luNa2da6/Tik0q0A5AbR+U003TItK57CPQ= github.com/prometheus/common v0.50.0/go.mod h1:wHFBCEVWVmHMUpg7pYcOm2QUR/ocQdYSJVQJKnHc3xQ= +github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= +github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= +github.com/prometheus/exporter-toolkit v0.11.0 h1:yNTsuZ0aNCNFQ3aFTD2uhPOvr4iD7fdBvKPAEGkNf+g= +github.com/prometheus/exporter-toolkit v0.11.0/go.mod h1:BVnENhnNecpwoTLiABx7mrPB/OLRIgN74qlQbV+FK1Q= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= @@ -946,8 +1029,12 @@ github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.28.0 h1:MirSo27VyNi7RJYP3078AA1+Cyzd2GB66qy3aUHvsWY= github.com/rs/zerolog v1.28.0/go.mod h1:NILgTygv/Uej1ra5XxGf82ZFSLk58MFGAUS2o6usyD0= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= -github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= +github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= +github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= +github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -980,10 +1067,17 @@ github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXl github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= +github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/urfave/cli/v2 v2.11.0/go.mod h1:f8iq5LtQ/bLxafbdBSLPPNsgaW0l/2fYYEHhAyPlwvo= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= +github.com/xdg-go/scram v1.1.2/go.mod h1:RT/sEzTbU5y00aCK8UOx6R7YryM0iF1N2MOmC3kKLN4= github.com/xdg-go/stringprep v1.0.3/go.mod h1:W3f5j4i+9rC0kuIEJL0ky1VpHXQU3ocBgklLGvcBnW8= +github.com/xdg-go/stringprep v1.0.4/go.mod h1:mPGuuIYwz7CmR2bT9j4GbQqutWS1zV24gijq1dTyGkM= +github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= +github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= +github.com/xlab/treeprint v1.2.0 h1:HzHnuAF1plUN2zGlAFHbSQP2qJ0ZAD3XF5XD7OesXRQ= +github.com/xlab/treeprint v1.2.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8= github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1022,6 +1116,8 @@ go.etcd.io/etcd/client/v3 v3.5.7/go.mod h1:sOWmj9DZUMyAngS7QQwCyAXXAL6WhgTOPLNS/ go.etcd.io/etcd/client/v3 v3.5.12 h1:v5lCPXn1pf1Uu3M4laUE2hp/geOTc5uPcYYsNe1lDxg= go.etcd.io/etcd/client/v3 v3.5.12/go.mod h1:tSbBCakoWmmddL+BKVAJHa9km+O/E+bumDe9mSbPiqw= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= +go.mongodb.org/mongo-driver v1.13.1 h1:YIc7HTYsKndGK4RFzJ3covLz1byri52x0IoMB0Pt/vk= +go.mongodb.org/mongo-driver v1.13.1/go.mod h1:wcDf1JBCXy2mOW0bWHwO/IOYqdca1MPCwDtFu/Z9+eo= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= @@ -1066,6 +1162,8 @@ go.opentelemetry.io/proto/otlp v1.1.0 h1:2Di21piLrCqJ3U3eXGCTPHE9R8Nh+0uglSnOyxi go.opentelemetry.io/proto/otlp v1.1.0/go.mod h1:GpBHCBWiqvVLDqmHZsoMM3C5ySeKTC7ej/RNTae6MdY= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= +go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= +go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/automaxprocs v1.5.2/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8= go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0= @@ -1088,6 +1186,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= @@ -1163,6 +1262,7 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1282,6 +1382,8 @@ golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1313,6 +1415,7 @@ golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1423,6 +1526,7 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= diff --git a/pkg/tracker/tracker.go b/pkg/tracker/tracker.go index 9e5e79f5..b3ba1c3e 100644 --- a/pkg/tracker/tracker.go +++ b/pkg/tracker/tracker.go @@ -16,10 +16,13 @@ package tracker import ( "context" + "github.com/prometheus/alertmanager/api/v2/client" + "github.com/prometheus/alertmanager/cli" "github.com/prometheus/client_golang/api" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" + "net/url" "strconv" "strings" "sync" @@ -92,8 +95,13 @@ func NewPrometheus(address string) (Prometheus, error) { Address: address, } - client, err := api.NewClient(cfg) - return Prometheus{client: v1.NewAPI(client)}, err + promClient, err := api.NewClient(cfg) + return Prometheus{client: v1.NewAPI(promClient)}, err +} + +func NewAlertClient(address string) *client.AlertmanagerAPI { + alertManagerClient := cli.NewAlertmanagerClient(&url.URL{Host: address}) + return alertManagerClient } func ParseTime(timestamp string) (time.Time, error) { @@ -266,3 +274,7 @@ func (p Prometheus) GetRawData(expr string, o QueryOption) (model.Value, error) } return value, nil } + +func AddAlertRule() { + +}