mirror of
				https://github.com/ClusterCockpit/cc-backend
				synced 2025-11-04 01:25:06 +01:00 
			
		
		
		
	Add unit json schema. Add exclusive boolean.
This commit is contained in:
		@@ -25,6 +25,10 @@
 | 
				
			|||||||
            "type": "integer",
 | 
					            "type": "integer",
 | 
				
			||||||
            "exclusiveMinimum": 0
 | 
					            "exclusiveMinimum": 0
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        "exclusive": {
 | 
				
			||||||
 | 
					            "description": "Job uses only exclusive nodes",
 | 
				
			||||||
 | 
					            "type": "boolean"
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        "walltime": {
 | 
					        "walltime": {
 | 
				
			||||||
            "description": "Requested walltime of job in seconds",
 | 
					            "description": "Requested walltime of job in seconds",
 | 
				
			||||||
            "type": "integer",
 | 
					            "type": "integer",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@
 | 
				
			|||||||
    "properties": {
 | 
					    "properties": {
 | 
				
			||||||
        "unit": {
 | 
					        "unit": {
 | 
				
			||||||
            "description": "Metric unit",
 | 
					            "description": "Metric unit",
 | 
				
			||||||
            "type": "string"
 | 
					            "#ref": "https://github.com/RRZE-HPC/HPCJobDatabase/blob/master/json-schema/unit.schema.json"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        "avg": {
 | 
					        "avg": {
 | 
				
			||||||
            "description": "Job metric average",
 | 
					            "description": "Job metric average",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										36
									
								
								json-schema/unit.schema.json
									
									
									
									
									
										Normal file
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										36
									
								
								json-schema/unit.schema.json
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
				
			|||||||
 | 
					{
 | 
				
			||||||
 | 
					    "$schema": "http://json-schema.org/draft-07/schema#",
 | 
				
			||||||
 | 
					    "title": "Metric unit",
 | 
				
			||||||
 | 
					    "description": "Format specification for job metric units",
 | 
				
			||||||
 | 
					    "type": "object",
 | 
				
			||||||
 | 
					    "properties": {
 | 
				
			||||||
 | 
					        "base_unit": {
 | 
				
			||||||
 | 
					            "description": "Metric base unit",
 | 
				
			||||||
 | 
					            "type": "string",
 | 
				
			||||||
 | 
					            "enum": [
 | 
				
			||||||
 | 
					                "B",
 | 
				
			||||||
 | 
					                "F",
 | 
				
			||||||
 | 
					                "B/s",
 | 
				
			||||||
 | 
					                "F/s",
 | 
				
			||||||
 | 
					                "CPI",
 | 
				
			||||||
 | 
					                "IPC",
 | 
				
			||||||
 | 
					                "Hz",
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        "prefix": {
 | 
				
			||||||
 | 
					            "description": "Unit prefix",
 | 
				
			||||||
 | 
					            "type": "string",
 | 
				
			||||||
 | 
					            "enum": [
 | 
				
			||||||
 | 
					                "K",
 | 
				
			||||||
 | 
					                "M",
 | 
				
			||||||
 | 
					                "G",
 | 
				
			||||||
 | 
					                "T",
 | 
				
			||||||
 | 
					                "P",
 | 
				
			||||||
 | 
					                "E"
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    "required": [
 | 
				
			||||||
 | 
					        "base_unit"
 | 
				
			||||||
 | 
					    ]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user