Skip to content

Commit

Permalink
simplify resources and add schedule to top level
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed May 5, 2024
1 parent 90dd999 commit 2488fb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 20 deletions.
23 changes: 3 additions & 20 deletions pkg/nextgen/v1/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"required": ["type", "count"],
"properties": {
"type": {"type": "string"},
"schedule": {"type": "boolean"},
"exclusive": {"type": "boolean"},
"count": {"type": "integer", "minimum": 1},
"unit": {"type": "string"},
"with": {"$ref": "#/definitions/with"}
Expand All @@ -53,7 +55,7 @@
"with": {
"type": "array",
"minItems": 1,
"items": {"$ref": "#/definitions/with"}
"items": {"$ref": "#/definitions/resources"}
},
"steps": {
"type": "array",
Expand Down Expand Up @@ -112,25 +114,6 @@
"tasks": {"$ref": "#/definitions/tasks"}
},
"additionalProperties": false
},
"slot_vertex": {
"description": "special slot resource type - label assigns to task slot",
"type": "object",
"required": ["type", "count", "with", "label"],
"properties": {
"type": {"enum": ["slot"]},
"count": {"type": "integer", "minimum": 1},
"unit": {"type": "string"},
"label": {"type": "string"},
"exclusive": {"type": "boolean"},
"with": {
"type": "array",
"minItems": 1,
"maxItems": 2,
"items": {"oneOf": [{"$ref": "#/definitions/intranode_resource_vertex"}]}
}
},
"additionalProperties": false
}
}
}
1 change: 1 addition & 0 deletions pkg/nextgen/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ type Resource struct {
With []Resource `yaml:"with,omitempty" json:"with,omitempty"`
Label string `yaml:"label,omitempty" json:"label,omitempty"`
Exclusive bool `yaml:"exclusive,omitempty" json:"exclusive,omitempty"`
Schedule bool `yaml:"schedule,omitempty" json:"schedule,omitempty"`
}

type Attributes struct {
Expand Down

0 comments on commit 2488fb7

Please sign in to comment.