test_platform: Add traffic redirect config

BUG=chromium:1087245
TEST=./generate.sh

Change-Id: I2924131f2e7947efa714a1a968787e173210ef8d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2219128
Commit-Queue: Alex Zamorzaev <zamorzaev@chromium.org>
Tested-by: Alex Zamorzaev <zamorzaev@chromium.org>
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
diff --git a/go/test_platform/config/config.pb.go b/go/test_platform/config/config.pb.go
index 879bad4..b51de4a 100644
--- a/go/test_platform/config/config.pb.go
+++ b/go/test_platform/config/config.pb.go
@@ -6,6 +6,7 @@
 import (
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
+	test_runner "go.chromium.org/chromiumos/infra/proto/go/test_platform/migration/test_runner"
 	math "math"
 )
 
@@ -27,6 +28,7 @@
 	SkylabWorker         *Config_SkylabWorker `protobuf:"bytes,4,opt,name=skylab_worker,json=skylabWorker,proto3" json:"skylab_worker,omitempty"`
 	Versioning           *Config_Versioning   `protobuf:"bytes,7,opt,name=versioning,proto3" json:"versioning,omitempty"`
 	TestRunner           *Config_TestRunner   `protobuf:"bytes,8,opt,name=test_runner,json=testRunner,proto3" json:"test_runner,omitempty"`
+	TestRunnerMigration  *test_runner.Config  `protobuf:"bytes,9,opt,name=test_runner_migration,json=testRunnerMigration,proto3" json:"test_runner_migration,omitempty"`
 	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
 	XXX_unrecognized     []byte               `json:"-"`
 	XXX_sizecache        int32                `json:"-"`
@@ -92,6 +94,13 @@
 	return nil
 }
 
+func (m *Config) GetTestRunnerMigration() *test_runner.Config {
+	if m != nil {
+		return m.TestRunnerMigration
+	}
+	return nil
+}
+
 // Swarming defines configuration parameters related to a swarming instance.
 type Config_Swarming struct {
 	Server               string   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
@@ -439,38 +448,41 @@
 func init() { proto.RegisterFile("test_platform/config/config.proto", fileDescriptor_2c858eded7d7f900) }
 
 var fileDescriptor_2c858eded7d7f900 = []byte{
-	// 523 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x5f, 0x6b, 0xdb, 0x30,
-	0x14, 0xc5, 0x49, 0x9b, 0xe5, 0xcf, 0x4d, 0xd6, 0x05, 0x31, 0x82, 0x67, 0x18, 0xb4, 0xa3, 0x63,
-	0xdd, 0x8b, 0x0d, 0xdb, 0xc3, 0xde, 0xca, 0x48, 0x07, 0xcb, 0xb2, 0x51, 0x82, 0x3a, 0xb6, 0xb1,
-	0x17, 0x21, 0x3b, 0x8a, 0xa3, 0xc6, 0xf1, 0x0d, 0x92, 0xdc, 0x92, 0x6f, 0xb7, 0x4f, 0xb5, 0xe7,
-	0x61, 0x59, 0x4e, 0x52, 0x66, 0x42, 0x9f, 0xa2, 0x7b, 0x74, 0x7f, 0x27, 0xd2, 0xd1, 0xc5, 0x70,
-	0x66, 0x84, 0x36, 0x6c, 0x9d, 0x72, 0x33, 0x47, 0xb5, 0x0a, 0x63, 0xcc, 0xe6, 0x32, 0x71, 0x3f,
-	0xc1, 0x5a, 0xa1, 0x41, 0xf2, 0xfc, 0x41, 0x4b, 0x50, 0xee, 0xbd, 0xfa, 0xdb, 0x86, 0xd6, 0x95,
-	0x5d, 0x92, 0x6b, 0x78, 0xa6, 0x97, 0x9b, 0x94, 0x47, 0x4c, 0xdf, 0x73, 0xb5, 0x92, 0x59, 0xe2,
-	0x35, 0x4e, 0x1b, 0x17, 0xbd, 0x77, 0xaf, 0x83, 0x3a, 0x34, 0x28, 0xb1, 0xe0, 0xc6, 0x35, 0xd3,
-	0x93, 0x92, 0xae, 0x6a, 0xf2, 0x15, 0x9c, 0xc2, 0xa4, 0xc6, 0x94, 0x1b, 0xe1, 0x1d, 0x5b, 0xbb,
-	0xf3, 0x83, 0x76, 0x5f, 0xca, 0x5e, 0xfa, 0xb4, 0x64, 0x5d, 0x49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3e,
-	0xf2, 0x01, 0x82, 0x2b, 0x85, 0xba, 0x48, 0x71, 0xea, 0x3a, 0x47, 0xd6, 0x85, 0x0e, 0xe3, 0x5a,
-	0xdd, 0xff, 0x00, 0xc3, 0x7a, 0x82, 0xbc, 0x04, 0x88, 0xe5, 0x7a, 0xc6, 0x52, 0x1e, 0x89, 0xd4,
-	0x5d, 0xb3, 0x5b, 0x28, 0xdf, 0x0a, 0xc1, 0x5f, 0x41, 0x6f, 0x94, 0xcb, 0x74, 0x16, 0xe5, 0xf1,
-	0x52, 0x18, 0x42, 0xa0, 0x69, 0xef, 0x5a, 0xf6, 0xd9, 0x35, 0xf1, 0xa0, 0x5d, 0xa5, 0x54, 0x46,
-	0x50, 0x95, 0xc5, 0x1b, 0x96, 0x9c, 0x9d, 0xfb, 0x2e, 0x75, 0x55, 0x41, 0x44, 0x85, 0xa9, 0x1b,
-	0xe2, 0x2e, 0xad, 0x4a, 0xff, 0x17, 0xc0, 0x6e, 0x36, 0xc8, 0x04, 0x7a, 0xd1, 0xee, 0xcf, 0x5d,
-	0x44, 0x17, 0x07, 0x23, 0xda, 0x3b, 0x2c, 0xdd, 0x87, 0x27, 0xcd, 0xce, 0xd1, 0xe0, 0x78, 0xd2,
-	0xec, 0x3c, 0x19, 0xb4, 0x26, 0xcd, 0x4e, 0x6b, 0xd0, 0x1e, 0x7d, 0xfc, 0x7d, 0x99, 0x60, 0x10,
-	0x2f, 0x14, 0xae, 0x64, 0xbe, 0x0a, 0x50, 0x25, 0x61, 0x55, 0xa0, 0x0e, 0x65, 0x36, 0x57, 0x3c,
-	0xb4, 0x1f, 0x8e, 0x30, 0xc1, 0xb0, 0xee, 0xeb, 0x12, 0xb5, 0xec, 0xf6, 0xfb, 0x7f, 0x01, 0x00,
-	0x00, 0xff, 0xff, 0x70, 0x44, 0xfc, 0xe3, 0x7c, 0x04, 0x00, 0x00,
+	// 566 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 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xbd, 0x5d, 0x17, 0x5e, 0xd0, 0xd2, 0xed, 0xb7, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x9d,
+	0x34, 0x24, 0x0f, 0x05, 0x00, 0x00,
 }
diff --git a/go/test_platform/migration/test_runner/config.pb.go b/go/test_platform/migration/test_runner/config.pb.go
new file mode 100644
index 0000000..6be3d01
--- /dev/null
+++ b/go/test_platform/migration/test_runner/config.pb.go
@@ -0,0 +1,204 @@
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// source: test_platform/migration/test_runner/config.proto
+
+package test_runner
+
+import (
+	fmt "fmt"
+	proto "github.com/golang/protobuf/proto"
+	math "math"
+)
+
+// Reference imports to suppress errors if they are not otherwise used.
+var _ = proto.Marshal
+var _ = fmt.Errorf
+var _ = math.Inf
+
+// This is a compile-time assertion to ensure that this generated file
+// is compatible with the proto package it is being compiled against.
+// A compilation error at this line likely means your copy of the
+// proto package needs to be updated.
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
+
+// Config describes how to split the entire traffic coming into CTP between
+// test_runner and skylab_swarming_worker.
+// The CTP requests directed to test_runner via
+// request.migrations.use_test_runner are not affected by this config.
+type Config struct {
+	RedirectInstructions []*RedirectInstruction `protobuf:"bytes,1,rep,name=redirect_instructions,json=redirectInstructions,proto3" json:"redirect_instructions,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}               `json:"-"`
+	XXX_unrecognized     []byte                 `json:"-"`
+	XXX_sizecache        int32                  `json:"-"`
+}
+
+func (m *Config) Reset()         { *m = Config{} }
+func (m *Config) String() string { return proto.CompactTextString(m) }
+func (*Config) ProtoMessage()    {}
+func (*Config) Descriptor() ([]byte, []int) {
+	return fileDescriptor_490a08eeccce0516, []int{0}
+}
+
+func (m *Config) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Config.Unmarshal(m, b)
+}
+func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Config.Marshal(b, m, deterministic)
+}
+func (m *Config) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Config.Merge(m, src)
+}
+func (m *Config) XXX_Size() int {
+	return xxx_messageInfo_Config.Size(m)
+}
+func (m *Config) XXX_DiscardUnknown() {
+	xxx_messageInfo_Config.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Config proto.InternalMessageInfo
+
+func (m *Config) GetRedirectInstructions() []*RedirectInstruction {
+	if m != nil {
+		return m.RedirectInstructions
+	}
+	return nil
+}
+
+// RedirectInstruction describes the fraction and the type of traffic to
+// send to test_runner.
+type RedirectInstruction struct {
+	// Redirect a fraction of traffic that satisfies the constraint.
+	Constraint *TrafficConstraint `protobuf:"bytes,1,opt,name=constraint,proto3" json:"constraint,omitempty"`
+	// The probability of sending a given CTP request to test_runner as a
+	// percentage. Should be in (0, 100].
+	PercentOfRequests    int32    `protobuf:"varint,2,opt,name=percent_of_requests,json=percentOfRequests,proto3" json:"percent_of_requests,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *RedirectInstruction) Reset()         { *m = RedirectInstruction{} }
+func (m *RedirectInstruction) String() string { return proto.CompactTextString(m) }
+func (*RedirectInstruction) ProtoMessage()    {}
+func (*RedirectInstruction) Descriptor() ([]byte, []int) {
+	return fileDescriptor_490a08eeccce0516, []int{1}
+}
+
+func (m *RedirectInstruction) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_RedirectInstruction.Unmarshal(m, b)
+}
+func (m *RedirectInstruction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_RedirectInstruction.Marshal(b, m, deterministic)
+}
+func (m *RedirectInstruction) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_RedirectInstruction.Merge(m, src)
+}
+func (m *RedirectInstruction) XXX_Size() int {
+	return xxx_messageInfo_RedirectInstruction.Size(m)
+}
+func (m *RedirectInstruction) XXX_DiscardUnknown() {
+	xxx_messageInfo_RedirectInstruction.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_RedirectInstruction proto.InternalMessageInfo
+
+func (m *RedirectInstruction) GetConstraint() *TrafficConstraint {
+	if m != nil {
+		return m.Constraint
+	}
+	return nil
+}
+
+func (m *RedirectInstruction) GetPercentOfRequests() int32 {
+	if m != nil {
+		return m.PercentOfRequests
+	}
+	return 0
+}
+
+// TrafficConstraint describes a way to filter CTP requests.
+// The constraints are evaluated right before the execute step. Thus, the
+// predecing steps (e.g. traffic splitter) may modify the inputs into the
+// contraints before evaluation.
+type TrafficConstraint struct {
+	// The DUT pool as it would appear in a Skylab request, e.g
+	// "DUT_POOL_QUOTA", "DUT_POOL_CTS", "wificell".
+	DutPool string `protobuf:"bytes,1,opt,name=dut_pool,json=dutPool,proto3" json:"dut_pool,omitempty"`
+	// The quota account as it would appear in a Skylab request, e.g. "pcq".
+	// Ignored if empty.
+	QuotaAccount         string   `protobuf:"bytes,2,opt,name=quota_account,json=quotaAccount,proto3" json:"quota_account,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *TrafficConstraint) Reset()         { *m = TrafficConstraint{} }
+func (m *TrafficConstraint) String() string { return proto.CompactTextString(m) }
+func (*TrafficConstraint) ProtoMessage()    {}
+func (*TrafficConstraint) Descriptor() ([]byte, []int) {
+	return fileDescriptor_490a08eeccce0516, []int{2}
+}
+
+func (m *TrafficConstraint) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_TrafficConstraint.Unmarshal(m, b)
+}
+func (m *TrafficConstraint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_TrafficConstraint.Marshal(b, m, deterministic)
+}
+func (m *TrafficConstraint) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_TrafficConstraint.Merge(m, src)
+}
+func (m *TrafficConstraint) XXX_Size() int {
+	return xxx_messageInfo_TrafficConstraint.Size(m)
+}
+func (m *TrafficConstraint) XXX_DiscardUnknown() {
+	xxx_messageInfo_TrafficConstraint.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_TrafficConstraint proto.InternalMessageInfo
+
+func (m *TrafficConstraint) GetDutPool() string {
+	if m != nil {
+		return m.DutPool
+	}
+	return ""
+}
+
+func (m *TrafficConstraint) GetQuotaAccount() string {
+	if m != nil {
+		return m.QuotaAccount
+	}
+	return ""
+}
+
+func init() {
+	proto.RegisterType((*Config)(nil), "test_platform.migration.test_runner.Config")
+	proto.RegisterType((*RedirectInstruction)(nil), "test_platform.migration.test_runner.RedirectInstruction")
+	proto.RegisterType((*TrafficConstraint)(nil), "test_platform.migration.test_runner.TrafficConstraint")
+}
+
+func init() {
+	proto.RegisterFile("test_platform/migration/test_runner/config.proto", fileDescriptor_490a08eeccce0516)
+}
+
+var fileDescriptor_490a08eeccce0516 = []byte{
+	// 296 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x31, 0x4f, 0x72, 0x31,
+	0x14, 0x86, 0x73, 0xbf, 0x2f, 0xa2, 0x14, 0x1d, 0xb8, 0x68, 0x82, 0x1b, 0x81, 0x85, 0xa9, 0x35,
+	0x98, 0x18, 0x57, 0x65, 0x72, 0x30, 0x98, 0x6a, 0x1c, 0x5c, 0x9a, 0x5a, 0xda, 0x6b, 0x13, 0x6e,
+	0xcf, 0xe5, 0xf4, 0x34, 0xfe, 0x1a, 0xff, 0xab, 0xa1, 0x22, 0x62, 0x70, 0x60, 0x3c, 0xef, 0x79,
+	0x9f, 0xa7, 0x4d, 0x0e, 0xbb, 0x20, 0x1b, 0x49, 0x35, 0x0b, 0x4d, 0x0e, 0xb0, 0x16, 0xb5, 0xaf,
+	0x50, 0x93, 0x87, 0x20, 0x72, 0x8e, 0x29, 0x04, 0x8b, 0xc2, 0x40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0xe3,
+	0x89, 0x0a, 0xc4, 0x1e, 0x07, 0x7f, 0x6d, 0xe5, 0xf6, 0xe5, 0x67, 0x00, 0x00, 0x00, 0xff, 0xff,
+	0xde, 0x4f, 0x32, 0xe3, 0x1e, 0x02, 0x00, 0x00,
+}
diff --git a/src/test_platform/config/config.proto b/src/test_platform/config/config.proto
index 9269c44..53b77c7 100644
--- a/src/test_platform/config/config.proto
+++ b/src/test_platform/config/config.proto
@@ -6,6 +6,8 @@
 
 package test_platform.config;
 
+import "test_platform/migration/test_runner/config.proto";
+
 option go_package = "go.chromium.org/chromiumos/infra/proto/go/test_platform/config";
 
 // Config defined configuration parameters of cros_test_platform.
@@ -75,4 +77,6 @@
     Versioning versioning = 7;
 
     TestRunner test_runner = 8;
+
+    test_platform.migration.test_runner.Config test_runner_migration = 9;
 }
diff --git a/src/test_platform/migration/test_runner/config.proto b/src/test_platform/migration/test_runner/config.proto
new file mode 100644
index 0000000..9989687
--- /dev/null
+++ b/src/test_platform/migration/test_runner/config.proto
@@ -0,0 +1,42 @@
+// Copyright 2020 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto3";
+
+package test_platform.migration.test_runner;
+
+option go_package = "go.chromium.org/chromiumos/infra/proto/go/test_platform/migration/test_runner";
+
+// Config describes how to split the entire traffic coming into CTP between
+// test_runner and skylab_swarming_worker.
+// The CTP requests directed to test_runner via
+// request.migrations.use_test_runner are not affected by this config.
+message Config {
+  repeated RedirectInstruction redirect_instructions = 1;
+}
+
+// RedirectInstruction describes the fraction and the type of traffic to
+// send to test_runner.
+message RedirectInstruction {
+  // Redirect a fraction of traffic that satisfies the constraint.
+  TrafficConstraint constraint = 1;
+
+  // The probability of sending a given CTP request to test_runner as a
+  // percentage. Should be in (0, 100].
+  int32 percent_of_requests = 2;
+}
+
+// TrafficConstraint describes a way to filter CTP requests.
+// The constraints are evaluated right before the execute step. Thus, the
+// predecing steps (e.g. traffic splitter) may modify the inputs into the
+// contraints before evaluation.
+message TrafficConstraint {
+  // The DUT pool as it would appear in a Skylab request, e.g
+  // "DUT_POOL_QUOTA", "DUT_POOL_CTS", "wificell".
+  string dut_pool = 1;
+
+  // The quota account as it would appear in a Skylab request, e.g. "pcq".
+  // Ignored if empty.
+  string quota_account = 2;
+}