|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
3 | | - "$id": "http://github.com/flux-framework/rfc/tree/master/data/spec_14/schema.json", |
4 | | - "title": "canonical-jobspec", |
| 3 | + "$id": "http://github.com/flux-framework/rfc/tree/master/data/spec_31/schema.json", |
| 4 | + "title": "jobspec-02", |
5 | 5 |
|
6 | | - "description": "Flux canonical jobspec", |
| 6 | + "description": "Flux jobspec version 2", |
7 | 7 |
|
8 | 8 | "definitions": { |
9 | 9 | "complex_range": { |
|
38 | 38 | "exclusive": { "type": "boolean" }, |
39 | 39 | "with": { |
40 | 40 | "type": "array", |
41 | | - "items": { "$ref": "#/definitions/resource_vertex" } |
| 41 | + "items": { "$ref": "#/definitions/resource_vertex" }, |
| 42 | + "minItems": 1, |
| 43 | + "maxItems": 2 |
42 | 44 | }, |
43 | 45 | "id": { "type": "string" }, |
44 | 46 | "unit": { "type": "string" }, |
|
64 | 66 | { "$ref": "#/definitions/resource_vertex_base" }, |
65 | 67 | { |
66 | 68 | "properties": { |
67 | | - "type": { "not": { "enum": ["slot"] } } |
| 69 | + "type": { "enum": ["node", "gpu", "core"] } |
68 | 70 | } |
69 | 71 | } |
70 | 72 | ] |
|
82 | 84 | "properties": { |
83 | 85 | "version": { |
84 | 86 | "description": "the jobspec version", |
85 | | - "type": "integer" |
| 87 | + "type": "integer", |
| 88 | + "enum": [2] |
86 | 89 | }, |
87 | 90 | "resources": { |
88 | 91 | "description": "requested resources", |
89 | 92 | "type": "array", |
90 | 93 | "minItems": 1, |
| 94 | + "maxItems": 1, |
91 | 95 | "items": { "$ref": "#/definitions/resource_vertex" } |
92 | 96 | }, |
93 | 97 | "attributes": { |
|
128 | 132 | "type": "object", |
129 | 133 | "properties": { |
130 | 134 | "per_slot": { "type": "integer", "minimum" : 1 }, |
131 | | - "total": { "type": "integer", "minimum" : 1 } |
| 135 | + "total": { "type": "integer", "minimum" : 1 }, |
| 136 | + "per_resource": { "type": "object", |
| 137 | + "required": ["type", "count"], |
| 138 | + "properties": { |
| 139 | + "type": {"type": "string"}, |
| 140 | + "count": { |
| 141 | + "type": "integer", |
| 142 | + "mininum" : 1 |
| 143 | + } |
| 144 | + } |
| 145 | + } |
132 | 146 | } |
133 | 147 | }, |
134 | 148 | "distribution": { "type": "string" }, |
|
0 commit comments