mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2024-11-14 02:37:25 +01:00
Better represent 'exclusiveMinimum' from JSON schemata
This commit is contained in:
parent
94c77d8a67
commit
6712b15034
@ -403,9 +403,9 @@
|
|||||||
"example": "fritz"
|
"example": "fritz"
|
||||||
},
|
},
|
||||||
"duration": {
|
"duration": {
|
||||||
"description": "Duration of job in seconds",
|
"description": "Duration of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 43200
|
"example": 43200
|
||||||
},
|
},
|
||||||
"exclusive": {
|
"exclusive": {
|
||||||
@ -452,21 +452,21 @@
|
|||||||
"example": 1
|
"example": 1
|
||||||
},
|
},
|
||||||
"numAcc": {
|
"numAcc": {
|
||||||
"description": "Number of accelerators used",
|
"description": "Number of accelerators used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"numHwthreads": {
|
"numHwthreads": {
|
||||||
"description": "Number of HWThreads used",
|
"description": "Number of HWThreads used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 20
|
"example": 20
|
||||||
},
|
},
|
||||||
"numNodes": {
|
"numNodes": {
|
||||||
"description": "Number of nodes used",
|
"description": "Number of nodes used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"partition": {
|
"partition": {
|
||||||
@ -513,8 +513,9 @@
|
|||||||
"example": "abcd100h"
|
"example": "abcd100h"
|
||||||
},
|
},
|
||||||
"walltime": {
|
"walltime": {
|
||||||
"description": "Requested walltime of job in seconds",
|
"description": "Requested walltime of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
"example": 86400
|
"example": 86400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -534,9 +535,9 @@
|
|||||||
"example": "fritz"
|
"example": "fritz"
|
||||||
},
|
},
|
||||||
"duration": {
|
"duration": {
|
||||||
"description": "Duration of job in seconds",
|
"description": "Duration of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 43200
|
"example": 43200
|
||||||
},
|
},
|
||||||
"exclusive": {
|
"exclusive": {
|
||||||
@ -583,21 +584,21 @@
|
|||||||
"example": 1
|
"example": 1
|
||||||
},
|
},
|
||||||
"numAcc": {
|
"numAcc": {
|
||||||
"description": "Number of accelerators used",
|
"description": "Number of accelerators used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"numHwthreads": {
|
"numHwthreads": {
|
||||||
"description": "Number of HWThreads used",
|
"description": "Number of HWThreads used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 20
|
"example": 20
|
||||||
},
|
},
|
||||||
"numNodes": {
|
"numNodes": {
|
||||||
"description": "Number of nodes used",
|
"description": "Number of nodes used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"partition": {
|
"partition": {
|
||||||
@ -623,9 +624,9 @@
|
|||||||
"example": 4
|
"example": 4
|
||||||
},
|
},
|
||||||
"startTime": {
|
"startTime": {
|
||||||
"description": "Start epoch time stamp in seconds",
|
"description": "Start epoch time stamp in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 1649723812
|
"example": 1649723812
|
||||||
},
|
},
|
||||||
"statistics": {
|
"statistics": {
|
||||||
@ -653,8 +654,9 @@
|
|||||||
"example": "abcd100h"
|
"example": "abcd100h"
|
||||||
},
|
},
|
||||||
"walltime": {
|
"walltime": {
|
||||||
"description": "Requested walltime of job in seconds",
|
"description": "Requested walltime of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
"example": 86400
|
"example": 86400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -75,9 +75,9 @@ definitions:
|
|||||||
example: fritz
|
example: fritz
|
||||||
type: string
|
type: string
|
||||||
duration:
|
duration:
|
||||||
description: Duration of job in seconds
|
description: Duration of job in seconds (Min > 0)
|
||||||
example: 43200
|
example: 43200
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
exclusive:
|
exclusive:
|
||||||
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
||||||
@ -118,19 +118,19 @@ definitions:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
type: integer
|
type: integer
|
||||||
numAcc:
|
numAcc:
|
||||||
description: Number of accelerators used
|
description: Number of accelerators used (Min > 0)
|
||||||
example: 2
|
example: 2
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
numHwthreads:
|
numHwthreads:
|
||||||
description: Number of HWThreads used
|
description: Number of HWThreads used (Min > 0)
|
||||||
example: 20
|
example: 20
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
numNodes:
|
numNodes:
|
||||||
description: Number of nodes used
|
description: Number of nodes used (Min > 0)
|
||||||
example: 2
|
example: 2
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
partition:
|
partition:
|
||||||
description: The Slurm partition to which the job was submitted
|
description: The Slurm partition to which the job was submitted
|
||||||
@ -166,8 +166,9 @@ definitions:
|
|||||||
example: abcd100h
|
example: abcd100h
|
||||||
type: string
|
type: string
|
||||||
walltime:
|
walltime:
|
||||||
description: Requested walltime of job in seconds
|
description: Requested walltime of job in seconds (Min > 0)
|
||||||
example: 86400
|
example: 86400
|
||||||
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
schema.JobMeta:
|
schema.JobMeta:
|
||||||
@ -182,9 +183,9 @@ definitions:
|
|||||||
example: fritz
|
example: fritz
|
||||||
type: string
|
type: string
|
||||||
duration:
|
duration:
|
||||||
description: Duration of job in seconds
|
description: Duration of job in seconds (Min > 0)
|
||||||
example: 43200
|
example: 43200
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
exclusive:
|
exclusive:
|
||||||
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
description: 'Specifies how nodes are shared: 0 - Shared among multiple jobs
|
||||||
@ -225,19 +226,19 @@ definitions:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
type: integer
|
type: integer
|
||||||
numAcc:
|
numAcc:
|
||||||
description: Number of accelerators used
|
description: Number of accelerators used (Min > 0)
|
||||||
example: 2
|
example: 2
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
numHwthreads:
|
numHwthreads:
|
||||||
description: Number of HWThreads used
|
description: Number of HWThreads used (Min > 0)
|
||||||
example: 20
|
example: 20
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
numNodes:
|
numNodes:
|
||||||
description: Number of nodes used
|
description: Number of nodes used (Min > 0)
|
||||||
example: 2
|
example: 2
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
partition:
|
partition:
|
||||||
description: The Slurm partition to which the job was submitted
|
description: The Slurm partition to which the job was submitted
|
||||||
@ -257,9 +258,9 @@ definitions:
|
|||||||
example: 4
|
example: 4
|
||||||
type: integer
|
type: integer
|
||||||
startTime:
|
startTime:
|
||||||
description: Start epoch time stamp in seconds
|
description: Start epoch time stamp in seconds (Min > 0)
|
||||||
example: 1649723812
|
example: 1649723812
|
||||||
minimum: 0
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
statistics:
|
statistics:
|
||||||
additionalProperties:
|
additionalProperties:
|
||||||
@ -280,8 +281,9 @@ definitions:
|
|||||||
example: abcd100h
|
example: abcd100h
|
||||||
type: string
|
type: string
|
||||||
walltime:
|
walltime:
|
||||||
description: Requested walltime of job in seconds
|
description: Requested walltime of job in seconds (Min > 0)
|
||||||
example: 86400
|
example: 86400
|
||||||
|
minimum: 1
|
||||||
type: integer
|
type: integer
|
||||||
type: object
|
type: object
|
||||||
schema.JobStatistics:
|
schema.JobStatistics:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// Package api GENERATED BY SWAG; DO NOT EDIT
|
// Package api GENERATED BY SWAG; DO NOT EDIT
|
||||||
// This file was generated by swaggo/swag at
|
// This file was generated by swaggo/swag at
|
||||||
// 2022-09-21 14:11:26.478228557 +0200 CEST m=+0.132083534
|
// 2022-09-21 14:20:28.235814518 +0200 CEST m=+0.133704544
|
||||||
package api
|
package api
|
||||||
|
|
||||||
import "github.com/swaggo/swag"
|
import "github.com/swaggo/swag"
|
||||||
@ -411,9 +411,9 @@ const docTemplate = `{
|
|||||||
"example": "fritz"
|
"example": "fritz"
|
||||||
},
|
},
|
||||||
"duration": {
|
"duration": {
|
||||||
"description": "Duration of job in seconds",
|
"description": "Duration of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 43200
|
"example": 43200
|
||||||
},
|
},
|
||||||
"exclusive": {
|
"exclusive": {
|
||||||
@ -460,21 +460,21 @@ const docTemplate = `{
|
|||||||
"example": 1
|
"example": 1
|
||||||
},
|
},
|
||||||
"numAcc": {
|
"numAcc": {
|
||||||
"description": "Number of accelerators used",
|
"description": "Number of accelerators used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"numHwthreads": {
|
"numHwthreads": {
|
||||||
"description": "Number of HWThreads used",
|
"description": "Number of HWThreads used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 20
|
"example": 20
|
||||||
},
|
},
|
||||||
"numNodes": {
|
"numNodes": {
|
||||||
"description": "Number of nodes used",
|
"description": "Number of nodes used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"partition": {
|
"partition": {
|
||||||
@ -521,8 +521,9 @@ const docTemplate = `{
|
|||||||
"example": "abcd100h"
|
"example": "abcd100h"
|
||||||
},
|
},
|
||||||
"walltime": {
|
"walltime": {
|
||||||
"description": "Requested walltime of job in seconds",
|
"description": "Requested walltime of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
"example": 86400
|
"example": 86400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -542,9 +543,9 @@ const docTemplate = `{
|
|||||||
"example": "fritz"
|
"example": "fritz"
|
||||||
},
|
},
|
||||||
"duration": {
|
"duration": {
|
||||||
"description": "Duration of job in seconds",
|
"description": "Duration of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 43200
|
"example": 43200
|
||||||
},
|
},
|
||||||
"exclusive": {
|
"exclusive": {
|
||||||
@ -591,21 +592,21 @@ const docTemplate = `{
|
|||||||
"example": 1
|
"example": 1
|
||||||
},
|
},
|
||||||
"numAcc": {
|
"numAcc": {
|
||||||
"description": "Number of accelerators used",
|
"description": "Number of accelerators used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"numHwthreads": {
|
"numHwthreads": {
|
||||||
"description": "Number of HWThreads used",
|
"description": "Number of HWThreads used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 20
|
"example": 20
|
||||||
},
|
},
|
||||||
"numNodes": {
|
"numNodes": {
|
||||||
"description": "Number of nodes used",
|
"description": "Number of nodes used (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 2
|
"example": 2
|
||||||
},
|
},
|
||||||
"partition": {
|
"partition": {
|
||||||
@ -631,9 +632,9 @@ const docTemplate = `{
|
|||||||
"example": 4
|
"example": 4
|
||||||
},
|
},
|
||||||
"startTime": {
|
"startTime": {
|
||||||
"description": "Start epoch time stamp in seconds",
|
"description": "Start epoch time stamp in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
"minimum": 0,
|
"minimum": 1,
|
||||||
"example": 1649723812
|
"example": 1649723812
|
||||||
},
|
},
|
||||||
"statistics": {
|
"statistics": {
|
||||||
@ -661,8 +662,9 @@ const docTemplate = `{
|
|||||||
"example": "abcd100h"
|
"example": "abcd100h"
|
||||||
},
|
},
|
||||||
"walltime": {
|
"walltime": {
|
||||||
"description": "Requested walltime of job in seconds",
|
"description": "Requested walltime of job in seconds (Min \u003e 0)",
|
||||||
"type": "integer",
|
"type": "integer",
|
||||||
|
"minimum": 1,
|
||||||
"example": 86400
|
"example": 86400
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,15 +23,15 @@ type BaseJob struct {
|
|||||||
SubCluster string `json:"subCluster" db:"subcluster" example:"main"` // The unique identifier of a sub cluster
|
SubCluster string `json:"subCluster" db:"subcluster" example:"main"` // The unique identifier of a sub cluster
|
||||||
Partition string `json:"partition" db:"partition" example:"main"` // The Slurm partition to which the job was submitted
|
Partition string `json:"partition" db:"partition" example:"main"` // The Slurm partition to which the job was submitted
|
||||||
ArrayJobId int64 `json:"arrayJobId" db:"array_job_id" example:"123000"` // The unique identifier of an array job
|
ArrayJobId int64 `json:"arrayJobId" db:"array_job_id" example:"123000"` // The unique identifier of an array job
|
||||||
NumNodes int32 `json:"numNodes" db:"num_nodes" example:"2" minimum:"0"` // Number of nodes used
|
NumNodes int32 `json:"numNodes" db:"num_nodes" example:"2" minimum:"1"` // Number of nodes used (Min > 0)
|
||||||
NumHWThreads int32 `json:"numHwthreads" db:"num_hwthreads" example:"20" minimum:"0"` // Number of HWThreads used
|
NumHWThreads int32 `json:"numHwthreads" db:"num_hwthreads" example:"20" minimum:"1"` // Number of HWThreads used (Min > 0)
|
||||||
NumAcc int32 `json:"numAcc" db:"num_acc" example:"2" minimum:"0"` // Number of accelerators used
|
NumAcc int32 `json:"numAcc" db:"num_acc" example:"2" minimum:"1"` // Number of accelerators used (Min > 0)
|
||||||
Exclusive int32 `json:"exclusive" db:"exclusive" example:"1" minimum:"0" maximum:"2"` // 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
|
Exclusive int32 `json:"exclusive" db:"exclusive" example:"1" minimum:"0" maximum:"2"` // 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
|
||||||
MonitoringStatus int32 `json:"monitoringStatus" db:"monitoring_status" example:"1" minimum:"0" maximum:"3"` // State of monitoring system during job run: 0 - Disabled, 1 - Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull
|
MonitoringStatus int32 `json:"monitoringStatus" db:"monitoring_status" example:"1" minimum:"0" maximum:"3"` // State of monitoring system during job run: 0 - Disabled, 1 - Running or Archiving (Default), 2 - Archiving Failed, 3 - Archiving Successfull
|
||||||
SMT int32 `json:"smt" db:"smt" example:"4"` // SMT threads used by job
|
SMT int32 `json:"smt" db:"smt" example:"4"` // SMT threads used by job
|
||||||
State JobState `json:"jobState" db:"job_state" example:"completed" enums:"completed,failed,cancelled,stopped,timeout,out_of_memory"` // Final state of job
|
State JobState `json:"jobState" db:"job_state" example:"completed" enums:"completed,failed,cancelled,stopped,timeout,out_of_memory"` // Final state of job
|
||||||
Duration int32 `json:"duration" db:"duration" example:"43200" minimum:"0"` // Duration of job in seconds
|
Duration int32 `json:"duration" db:"duration" example:"43200" minimum:"1"` // Duration of job in seconds (Min > 0)
|
||||||
Walltime int64 `json:"walltime" db:"walltime" example:"86400"` // Requested walltime of job in seconds
|
Walltime int64 `json:"walltime" db:"walltime" example:"86400" minimum:"1"` // Requested walltime of job in seconds (Min > 0)
|
||||||
Tags []*Tag `json:"tags"` // List of tags
|
Tags []*Tag `json:"tags"` // List of tags
|
||||||
RawResources []byte `json:"-" db:"resources"` // Resources used by job [As Bytes]
|
RawResources []byte `json:"-" db:"resources"` // Resources used by job [As Bytes]
|
||||||
Resources []*Resource `json:"resources"` // Resources used by job
|
Resources []*Resource `json:"resources"` // Resources used by job
|
||||||
@ -73,7 +73,7 @@ type JobMeta struct {
|
|||||||
// The unique identifier of a job in the database
|
// The unique identifier of a job in the database
|
||||||
ID *int64 `json:"id,omitempty"`
|
ID *int64 `json:"id,omitempty"`
|
||||||
BaseJob
|
BaseJob
|
||||||
StartTime int64 `json:"startTime" db:"start_time" example:"1649723812" minimum:"0"` // Start epoch time stamp in seconds
|
StartTime int64 `json:"startTime" db:"start_time" example:"1649723812" minimum:"1"` // Start epoch time stamp in seconds (Min > 0)
|
||||||
Statistics map[string]JobStatistics `json:"statistics,omitempty"` // Metric statistics of job
|
Statistics map[string]JobStatistics `json:"statistics,omitempty"` // Metric statistics of job
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user