From affa2f8aa900788123f37fbe744903d08ab151a5 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 29 May 2024 13:58:14 +0200 Subject: [PATCH] Support different disk types for size matching (#528) --- cmd/metal-api/internal/datastore/machine.go | 9 +- .../datastore/machine_integration_test.go | 15 - cmd/metal-api/internal/grpc/boot-service.go | 1 - .../internal/grpc/boot-service_test.go | 11 +- cmd/metal-api/internal/metal/machine.go | 58 ++- cmd/metal-api/internal/metal/machine_test.go | 10 +- cmd/metal-api/internal/metal/size.go | 115 ++++-- cmd/metal-api/internal/metal/size_test.go | 383 +++++++++++++++++- cmd/metal-api/internal/metal/switch_test.go | 12 +- .../machine-service_allocation_test.go | 10 +- .../machine-service_integration_test.go | 9 +- .../internal/service/size-service.go | 19 +- cmd/metal-api/internal/service/v1/machine.go | 37 -- cmd/metal-api/internal/testdata/testdata.go | 49 +-- pkg/api/v1/boot.pb.go | 380 +++++++++-------- proto/api/v1/boot.proto | 1 - spec/metal-api.json | 16 - 17 files changed, 767 insertions(+), 368 deletions(-) diff --git a/cmd/metal-api/internal/datastore/machine.go b/cmd/metal-api/internal/datastore/machine.go index b1071a8ec..1a30c939f 100644 --- a/cmd/metal-api/internal/datastore/machine.go +++ b/cmd/metal-api/internal/datastore/machine.go @@ -39,8 +39,7 @@ type MachineSearchQuery struct { NetworkASNs []int64 `json:"network_asns" optional:"true"` // hardware - HardwareMemory *int64 `json:"hardware_memory" optional:"true"` - HardwareCPUCores *int64 `json:"hardware_cpu_cores" optional:"true"` + HardwareMemory *int64 `json:"hardware_memory" optional:"true"` // nics NicsMacAddresses []string `json:"nics_mac_addresses" optional:"true"` @@ -211,12 +210,6 @@ func (p *MachineSearchQuery) generateTerm(rs *RethinkStore) *r.Term { }) } - if p.HardwareCPUCores != nil { - q = q.Filter(func(row r.Term) r.Term { - return row.Field("hardware").Field("cpu_cores").Eq(*p.HardwareCPUCores) - }) - } - for _, mac := range p.NicsMacAddresses { mac := mac q = q.Filter(func(row r.Term) r.Term { diff --git a/cmd/metal-api/internal/datastore/machine_integration_test.go b/cmd/metal-api/internal/datastore/machine_integration_test.go index d15987c3a..047c41fca 100644 --- a/cmd/metal-api/internal/datastore/machine_integration_test.go +++ b/cmd/metal-api/internal/datastore/machine_integration_test.go @@ -479,21 +479,6 @@ func TestRethinkStore_SearchMachines(t *testing.T) { }, wantErr: nil, }, - { - name: "search by hardware cpus", - q: &MachineSearchQuery{ - HardwareCPUCores: pointer.Pointer(int64(8)), - }, - mock: []*metal.Machine{ - {Base: metal.Base{ID: "1"}, Hardware: metal.MachineHardware{CPUCores: 1}}, - {Base: metal.Base{ID: "2"}, Hardware: metal.MachineHardware{CPUCores: 2}}, - {Base: metal.Base{ID: "3"}, Hardware: metal.MachineHardware{CPUCores: 8}}, - }, - want: []*metal.Machine{ - tt.defaultBody(&metal.Machine{Base: metal.Base{ID: "3"}, Hardware: metal.MachineHardware{CPUCores: 8}}), - }, - wantErr: nil, - }, { name: "search by nic mac address", q: &MachineSearchQuery{ diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 8eb03c975..810cddc58 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -144,7 +144,6 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR machineHardware := metal.MachineHardware{ Memory: req.Hardware.Memory, - CPUCores: int(req.Hardware.CpuCores), Disks: disks, Nics: nics, MetalCPUs: cpus, diff --git a/cmd/metal-api/internal/grpc/boot-service_test.go b/cmd/metal-api/internal/grpc/boot-service_test.go index 742b60b33..ba33f0685 100644 --- a/cmd/metal-api/internal/grpc/boot-service_test.go +++ b/cmd/metal-api/internal/grpc/boot-service_test.go @@ -118,8 +118,15 @@ func TestBootService_Register(t *testing.T) { req := &v1.BootServiceRegisterRequest{ Uuid: tt.uuid, Hardware: &v1.MachineHardware{ - Memory: uint64(tt.memory), - CpuCores: uint32(tt.numcores), + Memory: uint64(tt.memory), + + Cpus: []*v1.MachineCPU{ + { + Model: "Intel Xeon Silver", + Cores: uint32(tt.numcores), + Threads: uint32(tt.numcores), + }, + }, Nics: []*v1.MachineNic{ { Mac: "aa", Neighbors: []*v1.MachineNic{{Mac: string(tt.neighbormac1)}}, diff --git a/cmd/metal-api/internal/metal/machine.go b/cmd/metal-api/internal/metal/machine.go index 28276ac6b..49308f2ba 100644 --- a/cmd/metal-api/internal/metal/machine.go +++ b/cmd/metal-api/internal/metal/machine.go @@ -5,12 +5,14 @@ import ( "log/slog" "net/netip" "os" + "path/filepath" "slices" "strings" "time" "github.com/dustin/go-humanize" mn "github.com/metal-stack/metal-lib/pkg/net" + "github.com/samber/lo" ) // A MState is an enum which indicates the state of a machine @@ -458,7 +460,6 @@ func (n NetworkType) String() string { // MachineHardware stores the data which is collected by our system on the hardware when it registers itself. type MachineHardware struct { Memory uint64 `rethinkdb:"memory" json:"memory"` - CPUCores int `rethinkdb:"cpu_cores" json:"cpu_cores"` Nics Nics `rethinkdb:"network_interfaces" json:"network_interfaces"` Disks []BlockDevice `rethinkdb:"block_devices" json:"block_devices"` MetalCPUs []MetalCPU `rethinkdb:"cpus" json:"cpus"` @@ -489,13 +490,51 @@ const ( MachineResurrectAfter time.Duration = time.Hour ) -// DiskCapacity calculates the capacity of all disks. -func (hw *MachineHardware) DiskCapacity() uint64 { - var c uint64 - for _, d := range hw.Disks { - c += d.Size +func capacityOf[V any](identifier string, vs []V, countFn func(v V) (model string, count uint64)) (uint64, []V) { + var ( + sum uint64 + matched []V + ) + + if identifier == "" { + identifier = "*" + } + + for _, v := range vs { + model, count := countFn(v) + + matches, err := filepath.Match(identifier, model) + if err != nil { + // illegal identifiers are already prevented by size validation + continue + } + + if !matches { + continue + } + + sum += count + matched = append(matched, v) } - return c + + return sum, matched +} + +func exhaustiveMatch[V comparable](cs []Constraint, vs []V, countFn func(v V) (model string, count uint64)) bool { + unmatched := slices.Clone(vs) + + for _, c := range cs { + capacity, matched := capacityOf(c.Identifier, vs, countFn) + + match := c.inRange(capacity) + if !match { + continue + } + + unmatched, _ = lo.Difference(unmatched, matched) + } + + return len(unmatched) == 0 } func (hw *MachineHardware) GPUModels() map[string]uint64 { @@ -513,7 +552,10 @@ func (hw *MachineHardware) GPUModels() map[string]uint64 { // ReadableSpec returns a human readable string for the hardware. func (hw *MachineHardware) ReadableSpec() string { - return fmt.Sprintf("Cores: %d, Memory: %s, Storage: %s GPUs:%s", hw.CPUCores, humanize.Bytes(hw.Memory), humanize.Bytes(hw.DiskCapacity()), hw.MetalGPUs) + diskCapacity, _ := capacityOf("*", hw.Disks, countDisk) + cpus, _ := capacityOf("*", hw.MetalCPUs, countCPU) + gpus, _ := capacityOf("*", hw.MetalGPUs, countGPU) + return fmt.Sprintf("CPUs: %d, Memory: %s, Storage: %s, GPUs: %d", cpus, humanize.Bytes(hw.Memory), humanize.Bytes(diskCapacity), gpus) } // BlockDevice information. diff --git a/cmd/metal-api/internal/metal/machine_test.go b/cmd/metal-api/internal/metal/machine_test.go index 41069a094..7787b525a 100644 --- a/cmd/metal-api/internal/metal/machine_test.go +++ b/cmd/metal-api/internal/metal/machine_test.go @@ -24,8 +24,14 @@ func TestMachine_HasMAC(t *testing.T) { SizeID: "1", Allocation: nil, Hardware: MachineHardware{ - Memory: 100, - CPUCores: 1, + Memory: 100, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, Nics: Nics{ Nic{ MacAddress: "11:11:11:11:11:11", diff --git a/cmd/metal-api/internal/metal/size.go b/cmd/metal-api/internal/metal/size.go index 6f1ada880..c7102f474 100644 --- a/cmd/metal-api/internal/metal/size.go +++ b/cmd/metal-api/internal/metal/size.go @@ -38,8 +38,9 @@ const ( GPUConstraint ConstraintType = "gpu" ) -// A Constraint describes the hardware constraints for a given size. At the moment we only -// consider the cpu cores and the memory. +var allConstraintTypes = []ConstraintType{CoreConstraint, MemoryConstraint, StorageConstraint, GPUConstraint} + +// A Constraint describes the hardware constraints for a given size. type Constraint struct { Type ConstraintType `rethinkdb:"type" json:"type"` Min uint64 `rethinkdb:"min" json:"min"` @@ -47,6 +48,18 @@ type Constraint struct { Identifier string `rethinkdb:"identifier" json:"identifier" description:"glob of the identifier of this type"` } +func countCPU(cpu MetalCPU) (model string, count uint64) { + return cpu.Model, uint64(cpu.Cores) +} + +func countGPU(gpu MetalGPU) (model string, count uint64) { + return gpu.Model, 1 +} + +func countDisk(disk BlockDevice) (model string, count uint64) { + return disk.Name, disk.Size +} + // Sizes is a list of sizes. type Sizes []Size @@ -72,55 +85,85 @@ func UnknownSize() *Size { } } -// Matches returns true if the given machine hardware is inside the min/max values of the +func (c *Constraint) inRange(value uint64) bool { + return value >= c.Min && value <= c.Max +} + +// matches returns true if the given machine hardware is inside the min/max values of the // constraint. -func (c *Constraint) Matches(hw MachineHardware) bool { +func (c *Constraint) matches(hw MachineHardware) bool { res := false switch c.Type { case CoreConstraint: - res = uint64(hw.CPUCores) >= c.Min && uint64(hw.CPUCores) <= c.Max + cores, _ := capacityOf(c.Identifier, hw.MetalCPUs, countCPU) + res = c.inRange(cores) case MemoryConstraint: - res = hw.Memory >= c.Min && hw.Memory <= c.Max + res = c.inRange(hw.Memory) case StorageConstraint: - res = hw.DiskCapacity() >= c.Min && hw.DiskCapacity() <= c.Max + capacity, _ := capacityOf(c.Identifier, hw.Disks, countDisk) + res = c.inRange(capacity) case GPUConstraint: - for model, count := range hw.GPUModels() { - idMatches, err := filepath.Match(c.Identifier, model) - if err != nil { - return false - } - res = count >= c.Min && count <= c.Max && idMatches - if res { - break - } - } - + count, _ := capacityOf(c.Identifier, hw.MetalGPUs, countGPU) + res = c.inRange(count) } return res } +// matches returns true if all provided disks and later GPUs are covered with at least one constraint. +// With this we ensure that hardware matches exhaustive against the constraints. +func (hw *MachineHardware) matches(constraints []Constraint, constraintType ConstraintType) bool { + filtered := lo.Filter(constraints, func(c Constraint, _ int) bool { return c.Type == constraintType }) + if len(filtered) == 0 { + return true + } + + switch constraintType { + case StorageConstraint: + return exhaustiveMatch(filtered, hw.Disks, countDisk) + case GPUConstraint: + return exhaustiveMatch(filtered, hw.MetalGPUs, countGPU) + case CoreConstraint: + return exhaustiveMatch(filtered, hw.MetalCPUs, countCPU) + case MemoryConstraint: + // Noop because we do not have different Memory types + return true + default: + return true + } +} + // FromHardware searches a Size for given hardware specs. It will search // for a size where the constraints matches the given hardware. func (sz Sizes) FromHardware(hardware MachineHardware) (*Size, error) { - var found []Size + var ( + matchedSizes []Size + ) + nextsize: for _, s := range sz { for _, c := range s.Constraints { - match := c.Matches(hardware) + match := c.matches(hardware) + if !match { + continue nextsize + } + } + + for _, ct := range allConstraintTypes { + match := hardware.matches(s.Constraints, ct) if !match { continue nextsize } } - found = append(found, s) + matchedSizes = append(matchedSizes, s) } - if len(found) == 0 { + if len(matchedSizes) == 0 { return nil, NotFound("no size found for hardware (%s)", hardware.ReadableSpec()) } - if len(found) > 1 { - return nil, fmt.Errorf("%d sizes found for hardware (%s)", len(found), hardware.ReadableSpec()) + if len(matchedSizes) > 1 { + return nil, fmt.Errorf("%d sizes found for hardware (%s)", len(matchedSizes), hardware.ReadableSpec()) } - return &found[0], nil + return &matchedSizes[0], nil } func (s *Size) overlaps(so *Size) bool { @@ -172,15 +215,19 @@ func (c *Constraint) overlaps(other Constraint) bool { // Validate a size, returns error if a invalid size is passed func (s *Size) Validate(partitions PartitionMap, projects map[string]*mdmv1.Project) error { - constraintTypes := map[ConstraintType]bool{} + constraintTypes := map[ConstraintType]uint{} for _, c := range s.Constraints { if c.Max < c.Min { return fmt.Errorf("size:%q type:%q max:%d is smaller than min:%d", s.ID, c.Type, c.Max, c.Min) } - _, ok := constraintTypes[c.Type] - if ok { - return fmt.Errorf("size:%q type:%q min:%d max:%d has duplicate constraint type", s.ID, c.Type, c.Min, c.Max) + // CPU and Memory Constraints are not allowed more than once + constraintTypes[c.Type]++ + count := constraintTypes[c.Type] + if c.Type == CoreConstraint || c.Type == MemoryConstraint { + if count > 1 { + return fmt.Errorf("size:%q type:%q min:%d max:%d has duplicate constraint type", s.ID, c.Type, c.Min, c.Max) + } } // Ensure GPU Constraints always have identifier specified @@ -188,7 +235,15 @@ func (s *Size) Validate(partitions PartitionMap, projects map[string]*mdmv1.Proj return fmt.Errorf("size:%q type:%q min:%d max:%d is a gpu size but has no identifier specified", s.ID, c.Type, c.Min, c.Max) } - constraintTypes[c.Type] = true + // Ensure Memory Constraints do not have a identifier specified + if c.Type == MemoryConstraint && c.Identifier != "" { + return fmt.Errorf("size:%q type:%q min:%d max:%d is a memory size but has a identifier specified", s.ID, c.Type, c.Min, c.Max) + } + + if _, err := filepath.Match(c.Identifier, ""); err != nil { + return fmt.Errorf("size:%q type:%q min:%d max:%d identifier:%q identifier is malformed:%w", s.ID, c.Type, c.Min, c.Max, c.Identifier, err) + } + } if err := s.Reservations.Validate(partitions, projects); err != nil { diff --git a/cmd/metal-api/internal/metal/size_test.go b/cmd/metal-api/internal/metal/size_test.go index 71d47e934..991bfa425 100644 --- a/cmd/metal-api/internal/metal/size_test.go +++ b/cmd/metal-api/internal/metal/size_test.go @@ -13,6 +13,80 @@ import ( ) var ( + mixedDiskSize = Size{ + Base: Base{ + ID: "mixedDisk", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + }, + { + Type: MemoryConstraint, + Min: 1024, + Max: 1024, + }, + { + Type: StorageConstraint, + Min: 2048, + Max: 4096, + Identifier: "/dev/nvme*", + }, + { + Type: StorageConstraint, + Min: 0, + Max: 1024, + Identifier: "/dev/sd*", + }, + }, + } + sdaDiskSize = Size{ + Base: Base{ + ID: "sdaDisk", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + }, + { + Type: MemoryConstraint, + Min: 1024, + Max: 1024, + }, + { + Type: StorageConstraint, + Min: 0, + Max: 1024, + Identifier: "/dev/sd*", + }, + }, + } + noIdentifierDiskSize = Size{ + Base: Base{ + ID: "mixedDisk", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + }, + { + Type: MemoryConstraint, + Min: 1024, + Max: 1024, + }, + { + Type: StorageConstraint, + Min: 0, + Max: 1024, + }, + }, + } microSize = Size{ Base: Base{ ID: "micro", @@ -163,6 +237,32 @@ var ( }, }, } + intelCPUSize = Size{ + Base: Base{ + ID: "intel cpu", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Identifier: "Intel Xeon Silver*", + Min: 1, + Max: 1, + }, + }, + } + amdCPUSize = Size{ + Base: Base{ + ID: "amd cpu", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Identifier: "AMD Ryzen*", + Min: 1, + Max: 1, + }, + }, + } // Sizes sz1 = Size{ Base: Base{ @@ -242,8 +342,14 @@ func TestSizes_FromHardware(t *testing.T) { }, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 1069838336, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1069838336, Disks: []BlockDevice{ { Size: 1025, @@ -259,8 +365,14 @@ func TestSizes_FromHardware(t *testing.T) { sz: Sizes{tinySize}, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 2048, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 2048, Disks: []BlockDevice{ { Size: 1025, @@ -276,8 +388,14 @@ func TestSizes_FromHardware(t *testing.T) { sz: Sizes{microSize, microOverlappingSize}, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 1024, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1024, }, }, want: nil, @@ -288,8 +406,14 @@ func TestSizes_FromHardware(t *testing.T) { sz: Sizes{microSize}, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 2500, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 2500, }, }, want: nil, @@ -303,8 +427,14 @@ func TestSizes_FromHardware(t *testing.T) { }, args: args{ hardware: MachineHardware{ - CPUCores: 999, - Memory: 100, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 999, + Threads: 1, + }, + }, + Memory: 100, }, }, want: &sz999, @@ -319,8 +449,14 @@ func TestSizes_FromHardware(t *testing.T) { }, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 1026, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1026, Disks: []BlockDevice{ { Size: 1026, @@ -347,8 +483,14 @@ func TestSizes_FromHardware(t *testing.T) { }, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 1026, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1026, Disks: []BlockDevice{ { Size: 1026, @@ -380,8 +522,14 @@ func TestSizes_FromHardware(t *testing.T) { }, args: args{ hardware: MachineHardware{ - CPUCores: 1, - Memory: 1026, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1026, Disks: []BlockDevice{ { Size: 1026, @@ -410,6 +558,87 @@ func TestSizes_FromHardware(t *testing.T) { want: &maxGPUSize, wantErr: false, }, + { + name: "mixed storage", + sz: Sizes{ + sz1, + sz999, + tinyGPUSize, + miniGPUSize, + maxGPUSize, + mixedDiskSize, + sdaDiskSize, + noIdentifierDiskSize, + }, + args: args{ + hardware: MachineHardware{ + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Memory: 1024, + Disks: []BlockDevice{ + { + Size: 1024, + Name: "/dev/nvme0n1", + }, + { + Size: 2048, + Name: "/dev/nvme1n1", + }, + { + Size: 512, + Name: "/dev/sda", + }, + }, + }, + }, + want: &mixedDiskSize, + wantErr: false, + }, + { + name: "intel cpu", + sz: Sizes{ + intelCPUSize, + amdCPUSize, + }, + args: args{ + hardware: MachineHardware{ + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver 4114", + Cores: 1, + Threads: 1, + }, + }, + }, + }, + want: &intelCPUSize, + wantErr: false, + }, + { + name: "amd cpu", + sz: Sizes{ + intelCPUSize, + amdCPUSize, + }, + args: args{ + hardware: MachineHardware{ + MetalCPUs: []MetalCPU{ + { + Model: "AMD Ryzen 5 8700", + Cores: 1, + Threads: 1, + }, + }, + }, + }, + want: &amdCPUSize, + wantErr: false, + }, } for i := range tests { @@ -794,7 +1023,7 @@ func TestSize_Validate(t *testing.T) { wantErrMessage: nil, }, { - name: "two constraints with same type", + name: "two gpu constraints are allowed", size: Size{ Base: Base{ ID: "gpu-size", @@ -814,7 +1043,30 @@ func TestSize_Validate(t *testing.T) { }, }, }, - wantErrMessage: pointer.Pointer("size:\"gpu-size\" type:\"gpu\" min:2 max:2 has duplicate constraint type"), + wantErrMessage: nil, + }, + { + name: "two cpu constraints are not allowed", + size: Size{ + Base: Base{ + ID: "cpu-size", + }, + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + Identifier: "Intel Xeon Silver", + }, + { + Type: CoreConstraint, + Min: 2, + Max: 2, + Identifier: "Intel Xeon Gold", + }, + }, + }, + wantErrMessage: pointer.Pointer("size:\"cpu-size\" type:\"cores\" min:2 max:2 has duplicate constraint type"), }, { name: "gpu size without identifier", @@ -832,6 +1084,40 @@ func TestSize_Validate(t *testing.T) { }, wantErrMessage: pointer.Pointer("size:\"invalid-gpu-size\" type:\"gpu\" min:2 max:8 is a gpu size but has no identifier specified"), }, + { + name: "storage with invalid identifier", + size: Size{ + Base: Base{ + ID: "invalid-storage-size", + }, + Constraints: []Constraint{ + { + Type: StorageConstraint, + Identifier: "][", + Min: 2, + Max: 8, + }, + }, + }, + wantErrMessage: pointer.Pointer("size:\"invalid-storage-size\" type:\"storage\" min:2 max:8 identifier:\"][\" identifier is malformed:syntax error in pattern"), + }, + { + name: "memory with identifier", + size: Size{ + Base: Base{ + ID: "invalid-memory-size", + }, + Constraints: []Constraint{ + { + Type: MemoryConstraint, + Identifier: "Kingston", + Min: 2, + Max: 8, + }, + }, + }, + wantErrMessage: pointer.Pointer("size:\"invalid-memory-size\" type:\"memory\" min:2 max:8 is a memory size but has a identifier specified"), + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1212,6 +1498,22 @@ func TestConstraint_overlaps(t *testing.T) { }, want: true, }, + { + name: "different disk types", + this: Constraint{ + Type: StorageConstraint, + Identifier: "/dev/sd*", + Min: 1, + Max: 5, + }, + other: Constraint{ + Type: StorageConstraint, + Identifier: "/dev/nvme*", + Min: 1, + Max: 5, + }, + want: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -1333,7 +1635,50 @@ func TestSize_overlaps(t *testing.T) { }, want: true, }, - + { + name: "non overlapping size", + this: &Size{ + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + }, + { + Type: MemoryConstraint, + Min: 1024, + Max: 1024, + }, + { + Type: StorageConstraint, + Identifier: "/dev/sd*", + Min: 0, + Max: 2048, + }, + }, + }, + other: &Size{ + Constraints: []Constraint{ + { + Type: CoreConstraint, + Min: 1, + Max: 1, + }, + { + Type: MemoryConstraint, + Min: 1024, + Max: 1024, + }, + { + Type: StorageConstraint, + Identifier: "/dev/nvme*", + Min: 0, + Max: 2024, + }, + }, + }, + want: false, + }, { name: "overlap, all the same", this: &Size{ diff --git a/cmd/metal-api/internal/metal/switch_test.go b/cmd/metal-api/internal/metal/switch_test.go index 13ba1ffbd..9ef480925 100644 --- a/cmd/metal-api/internal/metal/switch_test.go +++ b/cmd/metal-api/internal/metal/switch_test.go @@ -67,9 +67,15 @@ func TestSwitch_ConnectMachine(t *testing.T) { SizeID: "1", Allocation: nil, Hardware: MachineHardware{ - Memory: 100, - CPUCores: 1, - Nics: testNics, + Memory: 100, + MetalCPUs: []MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Nics: testNics, Disks: []BlockDevice{ { Name: "blockdeviceName", diff --git a/cmd/metal-api/internal/service/machine-service_allocation_test.go b/cmd/metal-api/internal/service/machine-service_allocation_test.go index c6842aa93..fa9b3e809 100644 --- a/cmd/metal-api/internal/service/machine-service_allocation_test.go +++ b/cmd/metal-api/internal/service/machine-service_allocation_test.go @@ -256,8 +256,14 @@ func createMachineRegisterRequest(i int) *grpcv1.BootServiceRegisterRequest { Date: "1970", }, Hardware: &grpcv1.MachineHardware{ - Memory: 4, - CpuCores: 4, + Memory: 4, + Cpus: []*grpcv1.MachineCPU{ + { + Model: "Intel Xeon Silver", + Cores: 4, + Threads: 4, + }, + }, Nics: []*grpcv1.MachineNic{ { Name: "lan0", diff --git a/cmd/metal-api/internal/service/machine-service_integration_test.go b/cmd/metal-api/internal/service/machine-service_integration_test.go index e7c7a3e9f..b22c5ab50 100644 --- a/cmd/metal-api/internal/service/machine-service_integration_test.go +++ b/cmd/metal-api/internal/service/machine-service_integration_test.go @@ -40,8 +40,13 @@ func TestMachineAllocationIntegrationFullCycle(t *testing.T) { Date: "1970", }, Hardware: &grpcv1.MachineHardware{ - CpuCores: 8, - Memory: 1500, + Cpus: []*grpcv1.MachineCPU{ + { + Model: "Intel Xeon Silver", + Cores: 8, + Threads: 8, + }, + }, Memory: 1500, Disks: []*grpcv1.MachineBlockDevice{ { Name: "sda", diff --git a/cmd/metal-api/internal/service/size-service.go b/cmd/metal-api/internal/service/size-service.go index c1e701378..417b49ba8 100644 --- a/cmd/metal-api/internal/service/size-service.go +++ b/cmd/metal-api/internal/service/size-service.go @@ -169,11 +169,22 @@ func (r *sizeResource) suggestSize(request *restful.Request, response *restful.R Identifier: model, }) } + + var cores uint64 + for _, cpu := range m.Hardware.MetalCPUs { + cores += uint64(cpu.Cores) + } + + var diskCapacity uint64 + for _, d := range m.Hardware.Disks { + diskCapacity += d.Size + } + constraints := []v1.SizeConstraint{ { Type: metal.CoreConstraint, - Min: uint64(m.Hardware.CPUCores), - Max: uint64(m.Hardware.CPUCores), + Min: cores, + Max: cores, }, { Type: metal.MemoryConstraint, @@ -182,8 +193,8 @@ func (r *sizeResource) suggestSize(request *restful.Request, response *restful.R }, { Type: metal.StorageConstraint, - Min: m.Hardware.DiskCapacity(), - Max: m.Hardware.DiskCapacity(), + Min: diskCapacity, + Max: diskCapacity, }, } diff --git a/cmd/metal-api/internal/service/v1/machine.go b/cmd/metal-api/internal/service/v1/machine.go index 61f3eecca..13b924365 100644 --- a/cmd/metal-api/internal/service/v1/machine.go +++ b/cmd/metal-api/internal/service/v1/machine.go @@ -320,42 +320,6 @@ type MachineIssue struct { Details string `json:"details" description:"details of the issue"` } -func NewMetalMachineHardware(r *MachineHardware) metal.MachineHardware { - nics := metal.Nics{} - for i := range r.Nics { - var neighbors metal.Nics - for i2 := range r.Nics[i].Neighbors { - neighbor := metal.Nic{ - MacAddress: metal.MacAddress(r.Nics[i].Neighbors[i2].MacAddress), - Name: r.Nics[i].Neighbors[i2].Name, - Identifier: r.Nics[i].Neighbors[i2].Identifier, - } - neighbors = append(neighbors, neighbor) - } - nic := metal.Nic{ - MacAddress: metal.MacAddress(r.Nics[i].MacAddress), - Name: r.Nics[i].Name, - Identifier: r.Nics[i].Identifier, - Neighbors: neighbors, - } - nics = append(nics, nic) - } - var disks []metal.BlockDevice - for _, d := range r.Disks { - disk := metal.BlockDevice{ - Name: d.Name, - Size: d.Size, - } - disks = append(disks, disk) - } - return metal.MachineHardware{ - Memory: r.Memory, - CPUCores: r.CPUCores, - Nics: nics, - Disks: disks, - } -} - func NewMetalIPMI(r *MachineIPMI) metal.IPMI { var chassisPartNumber string if r.Fru.ChassisPartNumber != nil { @@ -518,7 +482,6 @@ func NewMachineResponse(m *metal.Machine, s *metal.Size, p *metal.Partition, i * hardware = MachineHardware{ MachineHardwareBase: MachineHardwareBase{ Memory: m.Hardware.Memory, - CPUCores: m.Hardware.CPUCores, Disks: disks, MetalCPUs: cpus, MetalGPUs: gpus, diff --git a/cmd/metal-api/internal/testdata/testdata.go b/cmd/metal-api/internal/testdata/testdata.go index 03f7fd4f0..97336f7ad 100644 --- a/cmd/metal-api/internal/testdata/testdata.go +++ b/cmd/metal-api/internal/testdata/testdata.go @@ -10,21 +10,6 @@ import ( r "gopkg.in/rethinkdb/rethinkdb-go.v6" ) -// If you want to add some Test Data, add it also to the following places: -// -- To the Mocks, ==> eof -// -- To the corresponding lists, - -// Also run the Tests: -// cd ./cloud-native/metal/metal-api/ -// go test ./... -// -- OR -// go test -cover ./... -// -- OR -// cd ./PACKAGE -// go test -coverprofile=cover.out ./... -// go tool cover -func=cover.out // Console Output -// (go tool cover -html=cover.out -o cover.html) // Html output - var ( // Machines M1 = metal.Machine{ @@ -44,8 +29,14 @@ var ( }, }, Hardware: metal.MachineHardware{ - CPUCores: 8, - Memory: 1 << 30, + MetalCPUs: []metal.MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 8, + Threads: 8, + }, + }, + Memory: 1 << 30, Disks: []metal.BlockDevice{ { Size: 1000, @@ -671,9 +662,15 @@ var ( // MachineHardwares MachineHardware1 = metal.MachineHardware{ - Memory: 100, - CPUCores: 1, - Nics: TestNics, + Memory: 100, + MetalCPUs: []metal.MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 1, + Threads: 1, + }, + }, + Nics: TestNics, Disks: []metal.BlockDevice{ { Name: "blockdeviceName", @@ -682,9 +679,15 @@ var ( }, } MachineHardware2 = metal.MachineHardware{ - Memory: 1000, - CPUCores: 2, - Nics: TestNics, + Memory: 1000, + MetalCPUs: []metal.MetalCPU{ + { + Model: "Intel Xeon Silver", + Cores: 2, + Threads: 2, + }, + }, + Nics: TestNics, Disks: []metal.BlockDevice{ { Name: "blockdeviceName", diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 30c715dd3..4d2bea924 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -463,12 +463,11 @@ type MachineHardware struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Memory uint64 `protobuf:"varint,1,opt,name=memory,proto3" json:"memory,omitempty"` - CpuCores uint32 `protobuf:"varint,2,opt,name=cpu_cores,json=cpuCores,proto3" json:"cpu_cores,omitempty"` - Disks []*MachineBlockDevice `protobuf:"bytes,3,rep,name=disks,proto3" json:"disks,omitempty"` - Nics []*MachineNic `protobuf:"bytes,4,rep,name=nics,proto3" json:"nics,omitempty"` - Cpus []*MachineCPU `protobuf:"bytes,5,rep,name=cpus,proto3" json:"cpus,omitempty"` - Gpus []*MachineGPU `protobuf:"bytes,6,rep,name=gpus,proto3" json:"gpus,omitempty"` + Memory uint64 `protobuf:"varint,1,opt,name=memory,proto3" json:"memory,omitempty"` + Disks []*MachineBlockDevice `protobuf:"bytes,3,rep,name=disks,proto3" json:"disks,omitempty"` + Nics []*MachineNic `protobuf:"bytes,4,rep,name=nics,proto3" json:"nics,omitempty"` + Cpus []*MachineCPU `protobuf:"bytes,5,rep,name=cpus,proto3" json:"cpus,omitempty"` + Gpus []*MachineGPU `protobuf:"bytes,6,rep,name=gpus,proto3" json:"gpus,omitempty"` } func (x *MachineHardware) Reset() { @@ -510,13 +509,6 @@ func (x *MachineHardware) GetMemory() uint64 { return 0 } -func (x *MachineHardware) GetCpuCores() uint32 { - if x != nil { - return x.CpuCores - } - return 0 -} - func (x *MachineHardware) GetDisks() []*MachineBlockDevice { if x != nil { return x.Disks @@ -1531,193 +1523,191 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf0, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x70, 0x75, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x63, 0x70, 0x75, 0x43, 0x6f, 0x72, 0x65, 0x73, 0x12, - 0x30, 0x0a, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x64, 0x69, 0x73, 0x6b, - 0x73, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x4e, 0x69, 0x63, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x63, 0x70, 0x75, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x50, 0x55, 0x52, 0x04, 0x63, 0x70, 0x75, - 0x73, 0x12, 0x26, 0x0a, 0x04, 0x67, 0x70, 0x75, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x47, 0x50, 0x55, 0x52, 0x04, 0x67, 0x70, 0x75, 0x73, 0x22, 0x6a, 0x0a, 0x0a, 0x4d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x43, 0x50, 0x55, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, - 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x74, - 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x68, - 0x72, 0x65, 0x61, 0x64, 0x73, 0x22, 0x3a, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, - 0x47, 0x50, 0x55, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, - 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x22, 0xa0, 0x01, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x69, 0x63, - 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, - 0x61, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, - 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x69, 0x63, 0x52, 0x09, 0x6e, - 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, - 0x66, 0x69, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x12, - 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, 0x49, 0x4f, - 0x53, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x76, - 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, - 0x64, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x22, 0xef, 0x01, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, - 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6d, 0x61, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, - 0x65, 0x12, 0x24, 0x0a, 0x03, 0x66, 0x72, 0x75, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x46, - 0x52, 0x55, 0x52, 0x03, 0x66, 0x72, 0x75, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6d, 0x63, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x6d, - 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x77, 0x65, - 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, - 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbe, 0x04, 0x0a, 0x0a, 0x4d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x46, 0x52, 0x55, 0x12, 0x33, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x73, - 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, - 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, - 0x13, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, - 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x11, 0x63, 0x68, - 0x61, 0x73, 0x73, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x88, - 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x4d, 0x66, - 0x67, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, - 0x67, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, - 0x52, 0x0e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x4d, 0x66, 0x67, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, - 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x04, - 0x52, 0x0f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, - 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x48, 0x05, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4d, 0x61, 0x6e, - 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x33, 0x0a, 0x13, - 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x11, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, - 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x72, - 0x69, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x0d, 0x70, 0x72, 0x6f, - 0x64, 0x75, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x16, 0x0a, - 0x14, 0x5f, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, - 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x42, 0x0c, 0x0a, - 0x0a, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, 0x67, 0x42, 0x13, 0x0a, 0x11, 0x5f, - 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, - 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, - 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x42, - 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, - 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, 0x72, 0x6f, 0x64, - 0x75, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0xbc, 0x01, 0x0a, 0x18, 0x42, - 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, - 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2d, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6f, 0x6f, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x42, 0x6f, 0x6f, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x08, 0x42, 0x6f, 0x6f, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x44, 0x69, 0x73, - 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x50, 0x61, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, - 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, - 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x23, - 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, - 0x72, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x12, 0x70, - 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x77, 0x69, 0x70, 0x65, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, - 0x44, 0x69, 0x73, 0x6b, 0x57, 0x69, 0x70, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x21, 0x42, 0x6f, 0x6f, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, - 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x25, 0x0a, - 0x23, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, - 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x24, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, - 0x10, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, - 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, 0x75, 0x70, 0x65, - 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xef, 0x04, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x44, 0x68, 0x63, 0x70, - 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6e, - 0x0a, 0x11, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, - 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, - 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, - 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, + 0x72, 0x79, 0x12, 0x30, 0x0a, 0x05, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x05, 0x64, + 0x69, 0x73, 0x6b, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x6e, 0x69, 0x63, 0x73, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x4e, 0x69, 0x63, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x73, 0x12, 0x26, 0x0a, 0x04, + 0x63, 0x70, 0x75, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x50, 0x55, 0x52, 0x04, + 0x63, 0x70, 0x75, 0x73, 0x12, 0x26, 0x0a, 0x04, 0x67, 0x70, 0x75, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x47, 0x50, 0x55, 0x52, 0x04, 0x67, 0x70, 0x75, 0x73, 0x22, 0x6a, 0x0a, 0x0a, + 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x43, 0x50, 0x55, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, + 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, + 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x72, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, 0x6f, 0x72, 0x65, 0x73, 0x12, 0x18, + 0x0a, 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x07, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x22, 0x3a, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x47, 0x50, 0x55, 0x12, 0x16, 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x14, + 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, + 0x6f, 0x64, 0x65, 0x6c, 0x22, 0xa0, 0x01, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x4e, 0x69, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x09, 0x6e, 0x65, 0x69, + 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x69, 0x63, + 0x52, 0x09, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, + 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x12, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x53, 0x0a, 0x0b, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, + 0x42, 0x49, 0x4f, 0x53, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, + 0x0a, 0x06, 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x76, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x64, 0x61, 0x74, 0x65, 0x22, 0xef, 0x01, 0x0a, 0x0b, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, + 0x61, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x66, 0x61, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x03, 0x66, 0x72, 0x75, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, + 0x6e, 0x65, 0x46, 0x52, 0x55, 0x52, 0x03, 0x66, 0x72, 0x75, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x6d, + 0x63, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x62, 0x6d, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x70, + 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xbe, 0x04, 0x0a, + 0x0a, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x46, 0x52, 0x55, 0x12, 0x33, 0x0a, 0x13, 0x63, + 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x11, 0x63, 0x68, 0x61, 0x73, + 0x73, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, + 0x12, 0x33, 0x0a, 0x13, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, + 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, + 0x11, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x50, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x20, 0x0a, 0x09, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, + 0x66, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x02, 0x52, 0x08, 0x62, 0x6f, 0x61, 0x72, + 0x64, 0x4d, 0x66, 0x67, 0x88, 0x01, 0x01, 0x12, 0x2d, 0x0a, 0x10, 0x62, 0x6f, 0x61, 0x72, 0x64, + 0x5f, 0x6d, 0x66, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x03, 0x52, 0x0e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x4d, 0x66, 0x67, 0x53, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, 0x12, 0x2f, 0x0a, 0x11, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x48, 0x04, 0x52, 0x0f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, 0x36, 0x0a, 0x14, 0x70, 0x72, 0x6f, 0x64, 0x75, + 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x05, 0x52, 0x13, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, + 0x4d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x88, 0x01, 0x01, 0x12, + 0x33, 0x0a, 0x13, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x06, 0x52, 0x11, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x50, 0x61, 0x72, 0x74, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x88, 0x01, 0x01, 0x12, 0x2a, 0x0a, 0x0e, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, + 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x48, 0x07, 0x52, 0x0d, + 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x88, 0x01, 0x01, + 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x68, 0x61, 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, + 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x63, 0x68, 0x61, + 0x73, 0x73, 0x69, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, 0x67, 0x42, 0x13, + 0x0a, 0x11, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x6d, 0x66, 0x67, 0x5f, 0x73, 0x65, 0x72, + 0x69, 0x61, 0x6c, 0x42, 0x14, 0x0a, 0x12, 0x5f, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, + 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x17, 0x0a, 0x15, 0x5f, 0x70, 0x72, + 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, + 0x65, 0x72, 0x42, 0x16, 0x0a, 0x14, 0x5f, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x70, + 0x61, 0x72, 0x74, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x42, 0x11, 0x0a, 0x0f, 0x5f, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x22, 0xbc, 0x01, + 0x0a, 0x18, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x29, + 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, + 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2d, 0x0a, 0x09, 0x62, 0x6f, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, + 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x1b, 0x0a, 0x19, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a, 0x08, 0x42, 0x6f, + 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x49, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, + 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, + 0x44, 0x69, 0x73, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x73, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x73, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, + 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, + 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x72, 0x5f, + 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x6f, 0x6f, 0x74, 0x6c, 0x6f, + 0x61, 0x64, 0x65, 0x72, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x20, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x2c, + 0x0a, 0x12, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x5f, 0x77, + 0x69, 0x70, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x70, 0x72, 0x69, 0x6d, + 0x61, 0x72, 0x79, 0x44, 0x69, 0x73, 0x6b, 0x57, 0x69, 0x70, 0x65, 0x64, 0x22, 0x52, 0x0a, 0x21, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, + 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6f, 0x6f, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x22, 0x25, 0x0a, 0x23, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, + 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x81, 0x01, 0x0a, 0x24, 0x42, 0x6f, 0x6f, 0x74, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, + 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x5f, 0x64, 0x69, 0x73, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x65, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, + 0x72, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x75, 0x70, 0x65, 0x72, 0x55, + 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x32, 0xef, 0x04, 0x0a, 0x0b, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x04, 0x44, + 0x68, 0x63, 0x70, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x42, 0x6f, 0x6f, 0x74, 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x1e, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x6e, 0x0a, 0x11, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, + 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, + 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, + 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x55, 0x0a, 0x08, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x4f, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, - 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x67, 0x0a, 0x0e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, - 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, + 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, + 0x12, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x30, 0x01, 0x12, 0x4f, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, - 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x67, 0x0a, 0x0e, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, + 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, + 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x52, 0x65, 0x69, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x06, 0x5a, + 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/api/v1/boot.proto b/proto/api/v1/boot.proto index 2b693591e..85dd2d4fd 100644 --- a/proto/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -61,7 +61,6 @@ message BootServiceWaitResponse {} message MachineHardware { uint64 memory = 1; - uint32 cpu_cores = 2; repeated MachineBlockDevice disks = 3; repeated MachineNic nics = 4; repeated MachineCPU cpus = 5; diff --git a/spec/metal-api.json b/spec/metal-api.json index d50c2c114..2b05d109c 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -132,10 +132,6 @@ "fru_product_serial": { "type": "string" }, - "hardware_cpu_cores": { - "format": "int64", - "type": "integer" - }, "hardware_memory": { "format": "int64", "type": "integer" @@ -1206,10 +1202,6 @@ "fru_product_serial": { "type": "string" }, - "hardware_cpu_cores": { - "format": "int64", - "type": "integer" - }, "hardware_memory": { "format": "int64", "type": "integer" @@ -2406,10 +2398,6 @@ "fru_product_serial": { "type": "string" }, - "hardware_cpu_cores": { - "format": "int64", - "type": "integer" - }, "hardware_memory": { "format": "int64", "type": "integer" @@ -2975,10 +2963,6 @@ "fru_product_serial": { "type": "string" }, - "hardware_cpu_cores": { - "format": "int64", - "type": "integer" - }, "hardware_memory": { "format": "int64", "type": "integer"