Skip to content

Commit 7b9b398

Browse files
committed
rfc27: update examples to meet Jobspec V2 specification
1 parent 4204298 commit 7b9b398

File tree

8 files changed

+28
-14
lines changed

8 files changed

+28
-14
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SOURCEDIR = .
99
BUILDDIR = _build
1010

1111
# YAML Validation on these directories
12-
SCHEMA_DIRS=data/spec_26 data/spec_14
12+
SCHEMA_DIRS=data/spec_27 data/spec_26 data/spec_14
1313

1414
# Put it first so that "make" without argument is like "make help".
1515
help:

data/spec_27/example1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: node
44
count: 4

data/spec_27/schema.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"$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_27/schema.json",
4+
"title": "jobspec-02",
55

6-
"description": "Flux canonical jobspec",
6+
"description": "Flux jobspec version 2",
77

88
"definitions": {
99
"complex_range": {
@@ -38,7 +38,9 @@
3838
"exclusive": { "type": "boolean" },
3939
"with": {
4040
"type": "array",
41-
"items": { "$ref": "#/definitions/resource_vertex" }
41+
"items": { "$ref": "#/definitions/resource_vertex" },
42+
"minItems": 1,
43+
"maxItems": 2
4244
},
4345
"id": { "type": "string" },
4446
"unit": { "type": "string" },
@@ -64,7 +66,7 @@
6466
{ "$ref": "#/definitions/resource_vertex_base" },
6567
{
6668
"properties": {
67-
"type": { "not": { "enum": ["slot"] } }
69+
"type": { "enum": ["node", "gpu", "core"] }
6870
}
6971
}
7072
]
@@ -82,12 +84,14 @@
8284
"properties": {
8385
"version": {
8486
"description": "the jobspec version",
85-
"type": "integer"
87+
"type": "integer",
88+
"enum": [2]
8689
},
8790
"resources": {
8891
"description": "requested resources",
8992
"type": "array",
9093
"minItems": 1,
94+
"maxItems": 1,
9195
"items": { "$ref": "#/definitions/resource_vertex" }
9296
},
9397
"attributes": {
@@ -128,7 +132,17 @@
128132
"type": "object",
129133
"properties": {
130134
"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+
}
132146
}
133147
},
134148
"distribution": { "type": "string" },

data/spec_27/use_case_1.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: node
44
count: 4

data/spec_27/use_case_2.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: node
44
count: 4

data/spec_27/use_case_2.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: slot
44
label: default

data/spec_27/use_case_2.3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: slot
44
count: 10

data/spec_27/use_case_2.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 1
1+
version: 2
22
resources:
33
- type: node
44
count: 4

0 commit comments

Comments
 (0)