dut_tracking: Add swarming_instance

Add swarming_instance field as dut tracker shares many of the same calls
as RoboCrop, therefore it needs to identify the swarming instance in use
rather than assume chromeos-swarming.

This should be transparent but allows for more flexibility in the
swarming_cli module.

Bug: chromium:1093415
Change-Id: I3e722f1723f0c637c673c166ae2d767b1ecbc6df
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2239083
Reviewed-by: Dhanya Ganesh <dhanyaganesh@chromium.org>
Commit-Queue: Mike Nichols <mikenichols@chromium.org>
Tested-by: Mike Nichols <mikenichols@chromium.org>
diff --git a/go/chromiumos/dut_tracking.pb.go b/go/chromiumos/dut_tracking.pb.go
index 5fc3377..f03fbbe 100644
--- a/go/chromiumos/dut_tracking.pb.go
+++ b/go/chromiumos/dut_tracking.pb.go
@@ -68,10 +68,12 @@
 	// Number of hours to lookback for Swarming stats.
 	LookbackHours int32 `protobuf:"zigzag32,4,opt,name=lookback_hours,json=lookbackHours,proto3" json:"lookback_hours,omitempty"`
 	// Dimensions that are only needed to query tasks.
-	TaskDimensions       []*SwarmingDimension `protobuf:"bytes,5,rep,name=task_dimensions,json=taskDimensions,proto3" json:"task_dimensions,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
-	XXX_unrecognized     []byte               `json:"-"`
-	XXX_sizecache        int32                `json:"-"`
+	TaskDimensions []*SwarmingDimension `protobuf:"bytes,5,rep,name=task_dimensions,json=taskDimensions,proto3" json:"task_dimensions,omitempty"`
+	// Swarming instance name:  chromeos-swarming.appspot.com
+	SwarmingInstance     string   `protobuf:"bytes,6,opt,name=swarming_instance,json=swarmingInstance,proto3" json:"swarming_instance,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
 }
 
 func (m *TrackingPolicy) Reset()         { *m = TrackingPolicy{} }
@@ -134,6 +136,13 @@
 	return nil
 }
 
+func (m *TrackingPolicy) GetSwarmingInstance() string {
+	if m != nil {
+		return m.SwarmingInstance
+	}
+	return ""
+}
+
 // Defines a root message.
 type TrackingPolicyCfg struct {
 	// All tracking policies.
@@ -184,28 +193,30 @@
 func init() { proto.RegisterFile("chromiumos/dut_tracking.proto", fileDescriptor_31a1fc16820a6989) }
 
 var fileDescriptor_31a1fc16820a6989 = []byte{
-	// 364 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xcf, 0x8b, 0xd3, 0x40,
-	0x14, 0xc7, 0x4d, 0xb3, 0x2b, 0xfa, 0x64, 0xb3, 0xe9, 0xe8, 0x21, 0x2c, 0x2e, 0x84, 0x05, 0x21,
-	0x78, 0x48, 0x64, 0x95, 0xde, 0x3c, 0xa4, 0xbf, 0xb4, 0xb4, 0x69, 0x4b, 0x92, 0x82, 0x78, 0x19,
-	0xf2, 0xab, 0xe9, 0x90, 0x66, 0x5e, 0x99, 0x49, 0x11, 0xef, 0xfe, 0xe1, 0xd2, 0xd8, 0xa6, 0xc9,
-	0xcd, 0xdb, 0xbc, 0xef, 0xfb, 0x7c, 0x1f, 0xdf, 0x79, 0x0f, 0x1e, 0x93, 0x9d, 0xc0, 0x92, 0x1d,
-	0x4b, 0x94, 0x4e, 0x7a, 0xac, 0x68, 0x25, 0xa2, 0xa4, 0x60, 0x3c, 0xb7, 0x0f, 0x02, 0x2b, 0x24,
-	0x70, 0x6d, 0x3f, 0xbc, 0x6f, 0xa1, 0x31, 0x56, 0x54, 0x26, 0xd1, 0xbe, 0x21, 0x9f, 0xfe, 0xf4,
-	0x40, 0x0b, 0xcf, 0xe6, 0x35, 0xee, 0x59, 0xf2, 0x9b, 0x10, 0xb8, 0xe1, 0x51, 0x99, 0x19, 0x8a,
-	0xa9, 0x58, 0xaf, 0xfd, 0xfa, 0x4d, 0xbe, 0x02, 0xa4, 0xac, 0xcc, 0xb8, 0x64, 0xc8, 0xa5, 0xd1,
-	0x33, 0x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d2, 0xd8, 0x28, 0x72, 0xa7, 0x75, 0x67,
-	0xc6, 0xb7, 0x22, 0x72, 0xea, 0x0b, 0x3b, 0x39, 0xb6, 0x3a, 0xf1, 0xcb, 0x5a, 0xfc, 0xfc, 0x37,
-	0x00, 0x00, 0xff, 0xff, 0x0f, 0x99, 0x8b, 0xba, 0x41, 0x02, 0x00, 0x00,
+	// 387 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x5f, 0x6b, 0xdb, 0x30,
+	0x14, 0xc5, 0xe7, 0xa4, 0x2d, 0xdb, 0x1d, 0x75, 0x1d, 0x6d, 0x0f, 0xa6, 0xac, 0x60, 0x0a, 0x03,
+	0xb3, 0x81, 0x3d, 0xba, 0xd1, 0xb7, 0x3d, 0xb8, 0x71, 0xb2, 0x99, 0xd4, 0x69, 0xb0, 0x5d, 0x18,
+	0x7b, 0x11, 0xf2, 0x9f, 0xba, 0xc2, 0xb1, 0x6e, 0x90, 0x1c, 0xc6, 0x3e, 0xd6, 0xbe, 0xe1, 0x88,
+	0xe7, 0x24, 0xf6, 0xdb, 0xde, 0xa4, 0x73, 0x7f, 0x47, 0x1c, 0x1d, 0x2e, 0x5c, 0x65, 0xcf, 0x12,
+	0x6b, 0xbe, 0xad, 0x51, 0xb9, 0xf9, 0xb6, 0xa1, 0x8d, 0x64, 0x59, 0xc5, 0x45, 0xe9, 0x6c, 0x24,
+	0x36, 0x48, 0xe0, 0x38, 0xbe, 0x7c, 0xd7, 0x43, 0x53, 0x6c, 0xa8, 0xca, 0xd8, 0xfa, 0x40, 0x5e,
+	0xff, 0x19, 0x81, 0x9e, 0x74, 0xe6, 0x15, 0xae, 0x79, 0xf6, 0x9b, 0x10, 0x38, 0x11, 0xac, 0x2e,
+	0x4c, 0xcd, 0xd2, 0xec, 0x57, 0x51, 0x7b, 0x26, 0x5f, 0x01, 0x72, 0x5e, 0x17, 0x42,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, 0x57, 0xb3, 0xa5, 0x4f, 0x93, 0x20, 0x9c, 0x19, 0x23, 0xf2, 0x06, 0x2e,
+	0x56, 0x5e, 0x1c, 0xd3, 0xb9, 0x17, 0xdc, 0x77, 0xdc, 0xf8, 0xee, 0xf6, 0xe7, 0x97, 0x12, 0x0f,
+	0x69, 0x1c, 0x94, 0xa5, 0xdb, 0x5b, 0x0a, 0x2e, 0x9e, 0x24, 0x73, 0xdb, 0x75, 0x70, 0x4b, 0xec,
+	0x4d, 0xd2, 0xb3, 0x56, 0xfc, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xea, 0x65, 0xaa, 0xfe, 0x6e,
+	0x02, 0x00, 0x00,
 }
diff --git a/src/chromiumos/dut_tracking.proto b/src/chromiumos/dut_tracking.proto
index a831e0b..3256ed7 100644
--- a/src/chromiumos/dut_tracking.proto
+++ b/src/chromiumos/dut_tracking.proto
@@ -35,6 +35,8 @@
   sint32 lookback_hours = 4;
   // Dimensions that are only needed to query tasks.
   repeated chromiumos.SwarmingDimension task_dimensions = 5;
+  // Swarming instance name:  chromeos-swarming.appspot.com
+  string swarming_instance = 6;
 }
 
 // Defines a root message.