jobspec: parse regions

This commit is contained in:
Mitchell Hashimoto 2015-09-14 18:18:49 -07:00
parent 03e94249e2
commit 42a36b300b
2 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,7 @@ func TestParse(t *testing.T) {
Priority: 50,
AllAtOnce: true,
Datacenters: []string{"us2", "eu1"},
Region: "global",
Meta: map[string]string{
"foo": "bar",

View File

@ -701,6 +701,9 @@ type Job struct {
// Datacenters contains all the datacenters this job is allowed to span
Datacenters []string
// Region is the Nomad region that handles scheduling this job
Region string
// Constraints can be specified at a job level and apply to
// all the task groups and tasks.
Constraints []*Constraint