2022-09-16 06:09:55 +02:00
// Package api GENERATED BY SWAG; DO NOT EDIT
2022-09-21 11:54:19 +02:00
// This file was generated by swaggo/swag at
2022-09-21 14:21:13 +02:00
// 2022-09-21 14:20:28.235814518 +0200 CEST m=+0.133704544
2022-09-16 06:09:55 +02:00
package api
2022-09-15 12:37:44 +02:00
import "github.com/swaggo/swag"
const docTemplate = ` {
"schemes" : { { marshal . Schemes } } ,
"swagger" : "2.0" ,
"info" : {
"description" : "{{escape .Description}}" ,
"title" : "{{.Title}}" ,
2022-09-21 11:54:19 +02:00
"termsOfService" : "https://monitoring.nhr.fau.de/imprint" ,
2022-09-15 12:37:44 +02:00
"contact" : {
2022-09-21 11:54:19 +02:00
"name" : "ClusterCockpit Project" ,
"url" : "https://github.com/ClusterCockpit" ,
2022-09-16 06:09:55 +02:00
"email" : "support@clustercockpit.org"
2022-09-15 12:37:44 +02:00
} ,
"license" : {
"name" : "MIT License" ,
"url" : "https://opensource.org/licenses/MIT"
} ,
"version" : "{{.Version}}"
} ,
"host" : "{{.Host}}" ,
"basePath" : "{{.BasePath}}" ,
"paths" : {
"/jobs/" : {
"get" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
"description" : "Get a list of all jobs. Filters can be applied using query parameters." ,
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
2022-09-21 11:54:19 +02:00
"summary" : "Lists all jobs" ,
2022-09-15 12:37:44 +02:00
"parameters" : [
{
"enum" : [
"running" ,
"completed" ,
"failed" ,
2022-09-21 11:54:19 +02:00
"cancelled" ,
2022-09-15 12:37:44 +02:00
"stopped" ,
"timeout"
] ,
"type" : "string" ,
"description" : "Job State" ,
"name" : "state" ,
"in" : "query"
} ,
{
"type" : "string" ,
"description" : "Job Cluster" ,
"name" : "cluster" ,
"in" : "query"
} ,
{
"type" : "string" ,
2022-09-21 11:54:19 +02:00
"description" : "Syntax: '$from-$to', as unix epoch timestamps in seconds" ,
2022-09-15 12:37:44 +02:00
"name" : "start-time" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "Page Number" ,
"name" : "page" ,
"in" : "query"
} ,
{
"type" : "integer" ,
"description" : "Items per page" ,
"name" : "items-per-page" ,
"in" : "query"
} ,
{
"type" : "boolean" ,
"description" : "Include metadata in response" ,
"name" : "with-metadata" ,
"in" : "query"
}
] ,
"responses" : {
"200" : {
"description" : "Array of jobs" ,
"schema" : {
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.Job"
}
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
}
}
}
} ,
"/jobs/start_job/" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-09-21 11:54:19 +02:00
"description" : "Job specified in request body will be saved to database as \"running\" with new DB ID.\nJob specifications follow the 'JobMeta' scheme, API will fail to execute if requirements are not met." ,
2022-09-15 12:37:44 +02:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
2022-09-21 11:54:19 +02:00
"summary" : "Adds a new job as \"running\"" ,
2022-09-15 12:37:44 +02:00
"parameters" : [
{
"description" : "Job to add" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
2022-09-15 17:38:11 +02:00
"$ref" : "#/definitions/schema.JobMeta"
2022-09-15 12:37:44 +02:00
}
}
] ,
"responses" : {
"201" : {
"description" : "Job added successfully" ,
"schema" : {
"$ref" : "#/definitions/api.StartJobApiResponse"
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
} ,
"422" : {
"description" : "The combination of jobId, clusterId and startTime does already exist" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
}
}
}
} ,
"/jobs/stop_job/" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-09-21 11:54:19 +02:00
"description" : "Job to stop is specified by request body. All fields are required in this case.\nReturns full job resource information according to 'JobMeta' scheme." ,
2022-09-15 12:37:44 +02:00
"produces" : [
"application/json"
] ,
2022-09-21 11:54:19 +02:00
"summary" : "Marks job as completed and triggers archiving" ,
2022-09-15 12:37:44 +02:00
"parameters" : [
{
"description" : "All fields required" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/api.StopJobApiRequest"
}
}
] ,
"responses" : {
"201" : {
"description" : "Job resource" ,
"schema" : {
2022-09-16 11:21:27 +02:00
"$ref" : "#/definitions/schema.JobMeta"
2022-09-15 12:37:44 +02:00
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
} ,
"404" : {
"description" : "Resource not found" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
}
}
}
} ,
"/jobs/stop_job/{id}" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-09-21 11:54:19 +02:00
"description" : "Job to stop is specified by database ID. Only stopTime and final state are required in request body.\nReturns full job resource information according to 'JobMeta' scheme." ,
2022-09-15 12:37:44 +02:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
2022-09-21 11:54:19 +02:00
"summary" : "Marks job as completed and triggers archiving" ,
2022-09-15 12:37:44 +02:00
"parameters" : [
{
"type" : "integer" ,
"description" : "Database ID of Job" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
2022-09-21 11:54:19 +02:00
"description" : "stopTime and final state in request body" ,
2022-09-15 12:37:44 +02:00
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"$ref" : "#/definitions/api.StopJobApiRequest"
}
}
] ,
"responses" : {
"201" : {
"description" : "Job resource" ,
"schema" : {
2022-09-21 11:54:19 +02:00
"$ref" : "#/definitions/schema.JobMeta"
2022-09-15 12:37:44 +02:00
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
} ,
"404" : {
"description" : "Resource not found" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
}
}
}
} ,
"/jobs/tag_job/{id}" : {
"post" : {
"security" : [
{
"ApiKeyAuth" : [ ]
}
] ,
2022-09-21 11:54:19 +02:00
"description" : "Adds tag(s) to a job specified by DB ID. Name and Type of Tag(s) can be chosen freely.\nIf tagged job is already finished: Tag will be written directly to respective archive files." ,
2022-09-15 12:37:44 +02:00
"consumes" : [
"application/json"
] ,
"produces" : [
"application/json"
] ,
2022-09-21 11:54:19 +02:00
"summary" : "Adds one or more tags to a job" ,
2022-09-15 12:37:44 +02:00
"parameters" : [
{
"type" : "integer" ,
"description" : "Job Database ID" ,
"name" : "id" ,
"in" : "path" ,
"required" : true
} ,
{
"description" : "Array of tag-objects to add" ,
"name" : "request" ,
"in" : "body" ,
"required" : true ,
"schema" : {
"type" : "array" ,
"items" : {
2022-09-16 11:21:27 +02:00
"$ref" : "#/definitions/api.Tag"
2022-09-15 12:37:44 +02:00
}
}
}
] ,
"responses" : {
"200" : {
"description" : "Job resource" ,
"schema" : {
"$ref" : "#/definitions/schema.Job"
}
} ,
"400" : {
"description" : "Bad Request" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
} ,
"404" : {
"description" : "Job or tag does not exist" ,
"schema" : {
"$ref" : "#/definitions/api.ErrorResponse"
}
}
}
}
}
} ,
"definitions" : {
"api.ErrorResponse" : {
2022-09-21 11:54:19 +02:00
"description" : "Error message as returned from backend." ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"properties" : {
"error" : {
"description" : "Error Message" ,
"type" : "string"
} ,
"status" : {
"description" : "Statustext of Errorcode" ,
"type" : "string"
}
}
} ,
"api.StartJobApiResponse" : {
"description" : "Successful job start response with database id of new job." ,
"type" : "object" ,
"properties" : {
"id" : {
"description" : "Database ID of new job" ,
"type" : "integer"
}
}
} ,
"api.StopJobApiRequest" : {
2022-09-21 11:54:19 +02:00
"description" : "Request to stop running job using stoptime and final state. They are only required if no database id was provided with endpoint." ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
2022-09-21 11:54:19 +02:00
"required" : [
"jobState" ,
"stopTime"
] ,
2022-09-15 12:37:44 +02:00
"properties" : {
"cluster" : {
2022-09-21 11:54:19 +02:00
"description" : "Cluster of job" ,
"type" : "string" ,
"example" : "fritz"
2022-09-15 12:37:44 +02:00
} ,
"jobId" : {
2022-09-21 11:54:19 +02:00
"description" : "Cluster Job ID of job" ,
"type" : "integer" ,
"example" : 123000
2022-09-15 12:37:44 +02:00
} ,
"jobState" : {
2022-09-21 11:54:19 +02:00
"description" : "Final state of job" ,
"type" : "string" ,
"enum" : [
"completed" ,
"failed" ,
"cancelled" ,
"stopped" ,
"timeout"
] ,
"example" : "completed"
2022-09-15 12:37:44 +02:00
} ,
"startTime" : {
2022-09-21 11:54:19 +02:00
"description" : "Start Time of job as epoch" ,
"type" : "integer" ,
"example" : 1649723812
2022-09-15 12:37:44 +02:00
} ,
"stopTime" : {
2022-09-21 11:54:19 +02:00
"description" : "Stop Time of job as epoch" ,
"type" : "integer" ,
"example" : 1649763839
2022-09-15 12:37:44 +02:00
}
}
} ,
2022-09-16 11:21:27 +02:00
"api.Tag" : {
2022-09-21 11:54:19 +02:00
"description" : "Defines a tag using name and type." ,
2022-09-16 11:21:27 +02:00
"type" : "object" ,
"properties" : {
"name" : {
2022-09-21 11:54:19 +02:00
"description" : "Tag Name" ,
"type" : "string" ,
"example" : "Testjob"
2022-09-16 11:21:27 +02:00
} ,
"type" : {
2022-09-21 11:54:19 +02:00
"description" : "Tag Type" ,
"type" : "string" ,
"example" : "Debug"
2022-09-16 10:12:37 +02:00
}
}
2022-09-16 11:21:27 +02:00
} ,
2022-09-15 12:37:44 +02:00
"schema.Job" : {
2022-09-21 14:12:24 +02:00
"description" : "Information of a HPC job." ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"properties" : {
"arrayJobId" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of an array job" ,
"type" : "integer" ,
"example" : 123000
2022-09-15 12:37:44 +02:00
} ,
"cluster" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a cluster" ,
"type" : "string" ,
"example" : "fritz"
2022-09-15 12:37:44 +02:00
} ,
"duration" : {
2022-09-21 14:21:13 +02:00
"description" : "Duration of job in seconds (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 43200
2022-09-15 12:37:44 +02:00
} ,
"exclusive" : {
2022-09-21 14:12:24 +02:00
"description" : "Specifies how nodes are shared: 0 - Shared among multiple jobs of multiple users, 1 - Job exclusive (Default), 2 - Shared among multiple jobs of same user" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
"maximum" : 2 ,
"minimum" : 0 ,
2022-09-21 14:12:24 +02:00
"example" : 1
2022-09-15 12:37:44 +02:00
} ,
"id" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a job in the database" ,
2022-09-15 12:37:44 +02:00
"type" : "integer"
} ,
"jobId" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a job" ,
"type" : "integer" ,
"example" : 123000
2022-09-15 12:37:44 +02:00
} ,
"jobState" : {
2022-09-21 11:54:19 +02:00
"description" : "Final state of job" ,
"type" : "string" ,
"enum" : [
"completed" ,
"failed" ,
"cancelled" ,
"stopped" ,
"timeout" ,
"out_of_memory"
] ,
"example" : "completed"
2022-09-15 12:37:44 +02:00
} ,
"metaData" : {
2022-09-21 11:54:19 +02:00
"description" : "Additional information about the job" ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"monitoringStatus" : {
2022-09-21 14:12:24 +02:00
"description" : "State of monitoring system during job run: 0 - Disabled, 1 - Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:12:24 +02:00
"maximum" : 3 ,
"minimum" : 0 ,
2022-09-21 11:54:19 +02:00
"example" : 1
2022-09-15 12:37:44 +02:00
} ,
"numAcc" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of accelerators used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 2
2022-09-15 12:37:44 +02:00
} ,
"numHwthreads" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of HWThreads used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 20
2022-09-15 12:37:44 +02:00
} ,
"numNodes" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of nodes used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 2
2022-09-15 12:37:44 +02:00
} ,
"partition" : {
2022-09-21 11:54:19 +02:00
"description" : "The Slurm partition to which the job was submitted" ,
"type" : "string" ,
"example" : "main"
2022-09-15 12:37:44 +02:00
} ,
"project" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a project" ,
"type" : "string" ,
"example" : "abcd200"
2022-09-15 12:37:44 +02:00
} ,
"resources" : {
2022-09-21 11:54:19 +02:00
"description" : "Resources used by job" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.Resource"
}
} ,
"smt" : {
2022-09-21 11:54:19 +02:00
"description" : "SMT threads used by job" ,
"type" : "integer" ,
"example" : 4
2022-09-15 12:37:44 +02:00
} ,
"startTime" : {
2022-09-21 11:54:19 +02:00
"description" : "Start time as 'time.Time' data type" ,
2022-09-15 12:37:44 +02:00
"type" : "string"
} ,
"subCluster" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a sub cluster" ,
"type" : "string" ,
"example" : "main"
2022-09-15 12:37:44 +02:00
} ,
"tags" : {
2022-09-21 11:54:19 +02:00
"description" : "List of tags" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.Tag"
}
} ,
"user" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a user" ,
"type" : "string" ,
"example" : "abcd100h"
2022-09-15 12:37:44 +02:00
} ,
"walltime" : {
2022-09-21 14:21:13 +02:00
"description" : "Requested walltime of job in seconds (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 86400
2022-09-15 12:37:44 +02:00
}
}
} ,
2022-09-15 17:38:11 +02:00
"schema.JobMeta" : {
2022-09-21 11:54:19 +02:00
"description" : "Meta data information of a HPC job." ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"properties" : {
"arrayJobId" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of an array job" ,
"type" : "integer" ,
"example" : 123000
2022-09-15 12:37:44 +02:00
} ,
"cluster" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a cluster" ,
"type" : "string" ,
"example" : "fritz"
2022-09-15 12:37:44 +02:00
} ,
"duration" : {
2022-09-21 14:21:13 +02:00
"description" : "Duration of job in seconds (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 43200
2022-09-15 12:37:44 +02:00
} ,
"exclusive" : {
2022-09-21 14:12:24 +02:00
"description" : "Specifies how nodes are shared: 0 - Shared among multiple jobs of multiple users, 1 - Job exclusive (Default), 2 - Shared among multiple jobs of same user" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
"maximum" : 2 ,
"minimum" : 0 ,
2022-09-21 14:12:24 +02:00
"example" : 1
2022-09-15 12:37:44 +02:00
} ,
"id" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a job in the database" ,
2022-09-15 12:37:44 +02:00
"type" : "integer"
} ,
"jobId" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a job" ,
"type" : "integer" ,
"example" : 123000
2022-09-15 12:37:44 +02:00
} ,
"jobState" : {
2022-09-21 11:54:19 +02:00
"description" : "Final state of job" ,
"type" : "string" ,
"enum" : [
"completed" ,
"failed" ,
"cancelled" ,
"stopped" ,
"timeout" ,
"out_of_memory"
] ,
"example" : "completed"
2022-09-15 12:37:44 +02:00
} ,
"metaData" : {
2022-09-21 11:54:19 +02:00
"description" : "Additional information about the job" ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"additionalProperties" : {
"type" : "string"
}
} ,
"monitoringStatus" : {
2022-09-21 14:12:24 +02:00
"description" : "State of monitoring system during job run: 0 - Disabled, 1 - Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:12:24 +02:00
"maximum" : 3 ,
"minimum" : 0 ,
2022-09-21 11:54:19 +02:00
"example" : 1
2022-09-15 12:37:44 +02:00
} ,
"numAcc" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of accelerators used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 2
2022-09-15 12:37:44 +02:00
} ,
"numHwthreads" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of HWThreads used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 20
2022-09-15 12:37:44 +02:00
} ,
"numNodes" : {
2022-09-21 14:21:13 +02:00
"description" : "Number of nodes used (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 2
2022-09-15 12:37:44 +02:00
} ,
"partition" : {
2022-09-21 11:54:19 +02:00
"description" : "The Slurm partition to which the job was submitted" ,
"type" : "string" ,
"example" : "main"
2022-09-15 12:37:44 +02:00
} ,
"project" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a project" ,
"type" : "string" ,
"example" : "abcd200"
2022-09-15 12:37:44 +02:00
} ,
"resources" : {
2022-09-21 11:54:19 +02:00
"description" : "Resources used by job" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.Resource"
}
} ,
"smt" : {
2022-09-21 11:54:19 +02:00
"description" : "SMT threads used by job" ,
"type" : "integer" ,
"example" : 4
2022-09-15 12:37:44 +02:00
} ,
"startTime" : {
2022-09-21 14:21:13 +02:00
"description" : "Start epoch time stamp in seconds (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 1649723812
2022-09-15 17:38:11 +02:00
} ,
"statistics" : {
2022-09-21 11:54:19 +02:00
"description" : "Metric statistics of job" ,
2022-09-15 17:38:11 +02:00
"type" : "object" ,
"additionalProperties" : {
"$ref" : "#/definitions/schema.JobStatistics"
}
2022-09-15 12:37:44 +02:00
} ,
"subCluster" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a sub cluster" ,
"type" : "string" ,
"example" : "main"
2022-09-15 12:37:44 +02:00
} ,
"tags" : {
2022-09-21 11:54:19 +02:00
"description" : "List of tags" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"$ref" : "#/definitions/schema.Tag"
}
} ,
"user" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique identifier of a user" ,
"type" : "string" ,
"example" : "abcd100h"
2022-09-15 12:37:44 +02:00
} ,
"walltime" : {
2022-09-21 14:21:13 +02:00
"description" : "Requested walltime of job in seconds (Min \u003e 0)" ,
2022-09-21 11:54:19 +02:00
"type" : "integer" ,
2022-09-21 14:21:13 +02:00
"minimum" : 1 ,
2022-09-21 11:54:19 +02:00
"example" : 86400
2022-09-15 12:37:44 +02:00
}
}
} ,
2022-09-15 17:38:11 +02:00
"schema.JobStatistics" : {
2022-09-21 11:54:19 +02:00
"description" : "Specification for job metric statistics." ,
2022-09-15 17:38:11 +02:00
"type" : "object" ,
"properties" : {
"avg" : {
2022-09-21 11:54:19 +02:00
"description" : "Job metric average" ,
"type" : "number" ,
"minimum" : 0 ,
"example" : 2500
2022-09-15 17:38:11 +02:00
} ,
"max" : {
2022-09-21 11:54:19 +02:00
"description" : "Job metric maximum" ,
"type" : "number" ,
"minimum" : 0 ,
"example" : 3000
2022-09-15 17:38:11 +02:00
} ,
"min" : {
2022-09-21 11:54:19 +02:00
"description" : "Job metric minimum" ,
"type" : "number" ,
"minimum" : 0 ,
"example" : 2000
2022-09-15 17:38:11 +02:00
} ,
"unit" : {
2022-09-21 11:54:19 +02:00
"description" : "Metric unit (see schema/unit.schema.json)" ,
"type" : "string" ,
"example" : "GHz"
2022-09-15 17:38:11 +02:00
}
}
} ,
2022-09-15 12:37:44 +02:00
"schema.Resource" : {
2022-09-21 11:54:19 +02:00
"description" : "A resource used by a job" ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"properties" : {
"accelerators" : {
2022-09-21 11:54:19 +02:00
"description" : "List of of accelerator device ids" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"type" : "string"
}
} ,
"configuration" : {
2022-09-21 11:54:19 +02:00
"description" : "The configuration options of the node" ,
2022-09-15 12:37:44 +02:00
"type" : "string"
} ,
"hostname" : {
2022-09-21 11:54:19 +02:00
"description" : "Name of the host (= node)" ,
2022-09-15 12:37:44 +02:00
"type" : "string"
} ,
"hwthreads" : {
2022-09-21 11:54:19 +02:00
"description" : "List of OS processor ids" ,
2022-09-15 12:37:44 +02:00
"type" : "array" ,
"items" : {
"type" : "integer"
}
}
}
} ,
"schema.Tag" : {
2022-09-21 11:54:19 +02:00
"description" : "Defines a tag using name and type." ,
2022-09-15 12:37:44 +02:00
"type" : "object" ,
"properties" : {
"id" : {
2022-09-21 11:54:19 +02:00
"description" : "The unique DB identifier of a tag" ,
2022-09-15 12:37:44 +02:00
"type" : "integer"
} ,
"name" : {
2022-09-21 11:54:19 +02:00
"description" : "Tag Name" ,
"type" : "string" ,
"example" : "Testjob"
2022-09-15 12:37:44 +02:00
} ,
"type" : {
2022-09-21 11:54:19 +02:00
"description" : "Tag Type" ,
"type" : "string" ,
"example" : "Debug"
2022-09-15 12:37:44 +02:00
}
}
}
} ,
"securityDefinitions" : {
"ApiKeyAuth" : {
"description" : "JWT based authentification for general API endpoint use." ,
"type" : "apiKey" ,
"name" : "X-Auth-Token" ,
"in" : "header"
}
}
} `
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = & swag . Spec {
Version : "0.1.0" ,
2022-09-21 11:54:19 +02:00
Host : "clustercockpit.localhost:8082" ,
2022-09-15 12:37:44 +02:00
BasePath : "/api" ,
Schemes : [ ] string { } ,
Title : "ClusterCockpit REST API" ,
2022-09-21 11:54:19 +02:00
Description : "Defines a tag using name and type." ,
2022-09-15 12:37:44 +02:00
InfoInstanceName : "swagger" ,
SwaggerTemplate : docTemplate ,
}
func init ( ) {
swag . Register ( SwaggerInfo . InstanceName ( ) , SwaggerInfo )
}