From 42a36b300b066f86cbb05d50e482e19d4d01116e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 14 Sep 2015 18:18:49 -0700 Subject: [PATCH] jobspec: parse regions --- jobspec/parse_test.go | 1 + nomad/structs/structs.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/jobspec/parse_test.go b/jobspec/parse_test.go index 2106746dd..2661d8914 100644 --- a/jobspec/parse_test.go +++ b/jobspec/parse_test.go @@ -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", diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 71559071d..bd2405c7d 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -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