From 019724e06569492f283ed74888f4f65b670ada66 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 6 May 2022 12:54:23 +0200 Subject: [PATCH 01/42] register and report boot service --- cmd/metal-api/internal/datastore/switch.go | 104 ++ cmd/metal-api/internal/grpc/boot-service.go | 333 ++++ cmd/metal-api/internal/grpc/grpc-server.go | 12 + .../internal/grpc/wait-service_int_test.go | 24 + .../internal/service/machine-service.go | 6 +- .../internal/service/switch-service.go | 99 -- .../internal/service/switch-service_test.go | 4 +- go.mod | 4 +- go.sum | 10 +- pkg/api/v1/boot.pb.go | 1482 +++++++++++++++++ pkg/api/v1/boot.proto | 103 ++ 11 files changed, 2069 insertions(+), 112 deletions(-) create mode 100644 cmd/metal-api/internal/grpc/boot-service.go create mode 100644 pkg/api/v1/boot.pb.go create mode 100644 pkg/api/v1/boot.proto diff --git a/cmd/metal-api/internal/datastore/switch.go b/cmd/metal-api/internal/datastore/switch.go index 3825eec08..3d2db6173 100644 --- a/cmd/metal-api/internal/datastore/switch.go +++ b/cmd/metal-api/internal/datastore/switch.go @@ -1,6 +1,8 @@ package datastore import ( + "fmt" + "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" r "gopkg.in/rethinkdb/rethinkdb-go.v6" ) @@ -79,3 +81,105 @@ func (rs *RethinkStore) SearchSwitchesConnectedToMachine(m *metal.Machine) ([]me } return res, nil } + +// SetVrfAtSwitches finds the switches connected to the given machine and puts the switch ports into the given vrf. +// Returns the updated switches. +func (rs *RethinkStore) SetVrfAtSwitches(m *metal.Machine, vrf string) ([]metal.Switch, error) { + switches, err := rs.SearchSwitchesConnectedToMachine(m) + if err != nil { + return nil, err + } + newSwitches := make([]metal.Switch, 0) + for i := range switches { + sw := switches[i] + oldSwitch := sw + setVrf(&sw, m.ID, vrf) + err := rs.UpdateSwitch(&oldSwitch, &sw) + if err != nil { + return nil, err + } + newSwitches = append(newSwitches, sw) + } + return newSwitches, nil +} + +func setVrf(s *metal.Switch, mid, vrf string) { + affectedMacs := map[metal.MacAddress]bool{} + for _, c := range s.MachineConnections[mid] { + mac := c.Nic.MacAddress + affectedMacs[mac] = true + } + + if len(affectedMacs) == 0 { + return + } + + nics := metal.Nics{} + for mac, old := range s.Nics.ByMac() { + e := old + if _, ok := affectedMacs[mac]; ok { + e.Vrf = vrf + } + nics = append(nics, *e) + } + s.Nics = nics +} + +func (rs *RethinkStore) ConnectMachineWithSwitches(m *metal.Machine) error { + switches, err := rs.SearchSwitches("", nil) + if err != nil { + return err + } + oldSwitches := []metal.Switch{} + newSwitches := []metal.Switch{} + for _, sw := range switches { + oldSwitch := sw + if cons := sw.ConnectMachine(m); cons > 0 { + oldSwitches = append(oldSwitches, oldSwitch) + newSwitches = append(newSwitches, sw) + } + } + + if len(newSwitches) != 2 { + return fmt.Errorf("machine %v is not connected to exactly two switches, found connections to %d switches", m.ID, len(newSwitches)) + } + + s1 := newSwitches[0] + s2 := newSwitches[1] + cons1 := s1.MachineConnections[m.ID] + cons2 := s2.MachineConnections[m.ID] + connectionMapError := fmt.Errorf("twin-switches do not have a connection map that is mirrored crosswise for machine %v, switch %v (connections: %v), switch %v (connections: %v)", m.ID, s1.Name, cons1, s2.Name, cons2) + if len(cons1) != len(cons2) { + return connectionMapError + } + + if s1.RackID != s2.RackID { + return fmt.Errorf("connected switches of a machine must reside in the same rack, rack of switch %s: %s, rack of switch %s: %s, machine: %s", s1.Name, s1.RackID, s2.Name, s2.RackID, m.ID) + } + // We detect the rackID of a machine by connections to leaf switches + m.RackID = s1.RackID + m.PartitionID = s1.PartitionID + + byNicName, err := s2.MachineConnections.ByNicName() + if err != nil { + return err + } + for _, con := range s1.MachineConnections[m.ID] { + if con2, has := byNicName[con.Nic.Name]; has { + if con.Nic.Name != con2.Nic.Name { + return connectionMapError + } + } else { + return connectionMapError + } + } + + for i := range oldSwitches { + err = rs.UpdateSwitch(&oldSwitches[i], &newSwitches[i]) + if err != nil { + return err + } + } + + return nil +} diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go new file mode 100644 index 000000000..ed0d713ad --- /dev/null +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -0,0 +1,333 @@ +package grpc + +import ( + "context" + "errors" + "fmt" + "strings" + + "github.com/avast/retry-go" + "github.com/dustin/go-humanize" + "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" + "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" + v1 "github.com/metal-stack/metal-api/pkg/api/v1" + "go.uber.org/zap" +) + +type BootService struct { + log *zap.SugaredLogger + ds Datasource +} + +func NewBootService(cfg *ServerConfig) *BootService { + return &BootService{ + ds: cfg.Datasource, + log: cfg.Logger.Named("boot-service"), + } +} + +func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) (*v1.BootServiceBootResponse, error) { + b.log.Infow("boot", "req", req) + if req == nil { + return nil, fmt.Errorf("req is nil") + } + + var m *metal.Machine + err := b.ds.FindMachine(&datastore.MachineSearchQuery{ + NicsMacAddresses: []string{req.Mac}, + PartitionID: &req.PartitionId, + }, m) + if err != nil { + return nil, err + } + if m == nil { + return nil, fmt.Errorf("no machine for mac:%q found", req.Mac) + } + + // if allocateion.Succeed== false, the machine was already in the installation phase but crashed before finalizing allocation + // we can boot into metal-hammer again. + if m.Allocation == nil || !m.Allocation.Succeeded { + return b.response(req.PartitionId), nil + } + + return &v1.BootServiceBootResponse{}, nil +} + +func (b *BootService) response(partitionID string) *v1.BootServiceBootResponse { + // cfg := e.Config + + // cidr, _, _ := net.ParseCIDR(cfg.CIDR) + // metalCoreAddress := fmt.Sprintf("METAL_CORE_ADDRESS=%v:%d", cidr.String(), cfg.Port) + // metalAPIURL := fmt.Sprintf("METAL_API_URL=%s://%s:%d%s", cfg.ApiProtocol, cfg.ApiIP, cfg.ApiPort, cfg.ApiBasePath) + + // var ( + // imageURL string + // kernel string + // cmd []string + // ) + // // try to update boot config + // p, err := b.ds.FindPartition(partitionID) + // if err == nil { + // imageURL = p.BootConfiguration.ImageURL + // kernel = p.BootConfiguration.KernelURL + // cmd = []string{p.BootConfiguration.CommandLine} + // } + + // cmdline := []string{bc.MetalHammerCommandLine, metalCoreAddress, metalAPIURL} + // if strings.ToUpper(cfg.LogLevel) == "DEBUG" { + // cmdline = append(cmdline, "DEBUG=1") + // } + + // cmd := strings.Join(cmdline, " ") + // return &v1.BootServiceBootResponse{ + // Kernel: bc.MetalHammerKernelURL, + // InitRamDisks: []string{ + // bc.MetalHammerImageURL, + // }, + // Cmdline: &cmd, + // } + return nil +} + +func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterRequest) (*v1.BootServiceRegisterResponse, error) { + b.log.Infow("register", "req", req) + if req.Uuid == "" { + return nil, errors.New("uuid is empty") + } + if req.Hardware == nil { + return nil, errors.New("hardware is nil") + } + + disks := []metal.BlockDevice{} + for i := range req.Hardware.Disks { + d := req.Hardware.Disks[i] + disks = append(disks, metal.BlockDevice{ + Name: d.Name, + Size: d.Size, + }) + } + machineHardware := metal.MachineHardware{ + Memory: req.Hardware.Memory, + CPUCores: int(req.Hardware.CpuCores), + Disks: disks, + } + size, _, err := b.ds.FromHardware(machineHardware) + if err != nil { + size = metal.UnknownSize + b.log.Errorw("no size found for hardware, defaulting to unknown size", "hardware", machineHardware, "error", err) + } + + m, err := b.ds.FindMachineByID(req.Uuid) + if err != nil && !metal.IsNotFound(err) { + return nil, err + } + + var ipmi metal.IPMI + if req.Ipmi != nil { + i := req.Ipmi + + ipmi = metal.IPMI{ + Address: i.Address, + MacAddress: i.Mac, + User: i.User, + Password: i.Password, + Interface: i.Interface, + BMCVersion: i.BmcVersion, + PowerState: i.PowerState, + } + if i.Fru != nil { + f := i.Fru + fru := metal.Fru{} + if f.ChassisPartNumber != nil { + fru.ChassisPartNumber = *f.ChassisPartNumber + } + if f.ChassisPartSerial != nil { + fru.ChassisPartSerial = *f.ChassisPartSerial + } + if f.BoardMfg != nil { + fru.BoardMfg = *f.BoardMfg + } + if f.BoardMfgSerial != nil { + fru.BoardMfgSerial = *f.BoardMfgSerial + } + if f.BoardPartNumber != nil { + fru.BoardPartNumber = *f.BoardPartNumber + } + if f.ProductManufacturer != nil { + fru.ProductManufacturer = *f.ProductManufacturer + } + if f.ProductPartNumber != nil { + fru.ProductPartNumber = *f.ProductPartNumber + } + if f.ProductSerial != nil { + fru.ProductSerial = *f.ProductSerial + } + ipmi.Fru = fru + } + + } + + var registerState v1.RegisterState + if m == nil { + // machine is not in the database, create it + name := fmt.Sprintf("%d-core/%s", machineHardware.CPUCores, humanize.Bytes(machineHardware.Memory)) + descr := fmt.Sprintf("a machine with %d core(s) and %s of RAM", machineHardware.CPUCores, humanize.Bytes(machineHardware.Memory)) + m = &metal.Machine{ + Base: metal.Base{ + ID: req.Uuid, + Name: name, + Description: descr, + }, + Allocation: nil, + SizeID: size.ID, + Hardware: machineHardware, + BIOS: metal.BIOS{ + Version: req.Bios.Version, + Vendor: req.Bios.Vendor, + Date: req.Bios.Date, + }, + State: metal.MachineState{ + Value: metal.AvailableState, + }, + LEDState: metal.ChassisIdentifyLEDState{ + Value: metal.LEDStateOff, + Description: "Machine registered", + }, + Tags: req.Tags, + IPMI: ipmi, + } + + err = b.ds.CreateMachine(m) + if err != nil { + return nil, err + } + + registerState = v1.RegisterState_REGISTER_STATE_CREATED + } else { + // machine has already registered, update it + old := *m + + m.SizeID = size.ID + m.Hardware = machineHardware + m.BIOS.Version = req.Bios.Version + m.BIOS.Vendor = req.Bios.Vendor + m.BIOS.Date = req.Bios.Date + m.IPMI = ipmi + + err = b.ds.UpdateMachine(&old, m) + if err != nil { + return nil, err + } + registerState = v1.RegisterState_REGISTER_STATE_UPDATED + } + + ec, err := b.ds.FindProvisioningEventContainer(m.ID) + if err != nil && !metal.IsNotFound(err) { + return nil, err + } + + if ec == nil { + err = b.ds.CreateProvisioningEventContainer(&metal.ProvisioningEventContainer{ + Base: metal.Base{ID: m.ID}, + Liveliness: metal.MachineLivelinessAlive, + IncompleteProvisioningCycles: "0", + }, + ) + if err != nil { + return nil, err + } + } + + old := *m + err = retry.Do( + func() error { + // RackID and PartitionID is set + err := b.ds.ConnectMachineWithSwitches(m) + if err != nil { + return err + } + return b.ds.UpdateMachine(&old, m) + }, + retry.Attempts(10), + retry.RetryIf(func(err error) bool { + return strings.Contains(err.Error(), datastore.EntityAlreadyModifiedErrorMessage) + }), + retry.DelayType(retry.CombineDelay(retry.BackOffDelay, retry.RandomDelay)), + retry.LastErrorOnly(true), + ) + + if err != nil { + return nil, err + } + + return &v1.BootServiceRegisterResponse{ + Uuid: req.Uuid, + Size: size.ID, + PartitionId: m.PartitionID, + RegisterState: registerState, + }, nil +} + +func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportRequest) (*v1.BootServiceReportResponse, error) { + b.log.Infow("report", "req", req) + + m, err := b.ds.FindMachineByID(req.Uuid) + if err != nil { + return nil, err + } + if m.Allocation == nil { + return nil, fmt.Errorf("the machine %q is not allocated", req.Uuid) + } + + old := *m + + m.Allocation.ConsolePassword = req.ConsolePassword + m.Allocation.MachineSetup = &metal.MachineSetup{ + ImageID: m.Allocation.ImageID, + PrimaryDisk: req.PrimaryDisk, + OSPartition: req.OsPartition, + Initrd: req.Initrd, + Cmdline: req.Cmdline, + Kernel: req.Kernel, + BootloaderID: req.BootloaderId, + } + m.Allocation.Reinstall = false + + err = b.ds.UpdateMachine(&old, m) + if err != nil { + return nil, err + } + + vrf := "" + if m.IsFirewall() { + // if a machine has multiple networks, it serves as firewall, so it can not be enslaved into the tenant vrf + vrf = "default" + } else { + for _, mn := range m.Allocation.MachineNetworks { + if mn.Private { + vrf = fmt.Sprintf("vrf%d", mn.Vrf) + break + } + } + } + + err = retry.Do( + func() error { + _, err := b.ds.SetVrfAtSwitches(m, vrf) + return err + }, + retry.Attempts(10), + retry.RetryIf(func(err error) bool { + return strings.Contains(err.Error(), datastore.EntityAlreadyModifiedErrorMessage) + }), + retry.DelayType(retry.CombineDelay(retry.BackOffDelay, retry.RandomDelay)), + retry.LastErrorOnly(true), + ) + if err != nil { + return nil, fmt.Errorf("the machine %q could not be enslaved into the vrf %s, error: %w", req.Uuid, vrf, err) + } + + // FIXME set boot order to disk + + return &v1.BootServiceReportResponse{}, nil +} diff --git a/cmd/metal-api/internal/grpc/grpc-server.go b/cmd/metal-api/internal/grpc/grpc-server.go index e909cda00..838212494 100644 --- a/cmd/metal-api/internal/grpc/grpc-server.go +++ b/cmd/metal-api/internal/grpc/grpc-server.go @@ -17,6 +17,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/keepalive" + "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" v1 "github.com/metal-stack/metal-api/pkg/api/v1" "github.com/metal-stack/metal-lib/bus" @@ -30,9 +31,16 @@ const ( type Datasource interface { FindMachineByID(machineID string) (*metal.Machine, error) + FindMachine(q *datastore.MachineSearchQuery, ms *metal.Machine) error + FindPartition(partitionID string) (*metal.Partition, error) CreateMachine(*metal.Machine) error UpdateMachine(old, new *metal.Machine) error + FindProvisioningEventContainer(id string) (*metal.ProvisioningEventContainer, error) + CreateProvisioningEventContainer(ec *metal.ProvisioningEventContainer) error ProvisioningEventForMachine(log *zap.SugaredLogger, machineID, event, message string) (*metal.ProvisioningEventContainer, error) + SetVrfAtSwitches(m *metal.Machine, vrf string) ([]metal.Switch, error) + ConnectMachineWithSwitches(m *metal.Machine) error + FromHardware(hw metal.MachineHardware) (*metal.Size, []*metal.SizeMatchingLog, error) } type ServerConfig struct { @@ -55,6 +63,7 @@ type Server struct { *WaitService *SupwdService *EventService + *BootService ds Datasource logger *zap.SugaredLogger server *grpc.Server @@ -81,10 +90,13 @@ func NewServer(cfg *ServerConfig) (*Server, error) { eventService := NewEventService(cfg) + bootService := NewBootService(cfg) + s := &Server{ WaitService: waitService, SupwdService: supwdService, EventService: eventService, + BootService: bootService, ds: cfg.Datasource, logger: cfg.Logger, grpcPort: cfg.GrpcPort, diff --git a/cmd/metal-api/internal/grpc/wait-service_int_test.go b/cmd/metal-api/internal/grpc/wait-service_int_test.go index 8bf6ac5db..2174ecb50 100644 --- a/cmd/metal-api/internal/grpc/wait-service_int_test.go +++ b/cmd/metal-api/internal/grpc/wait-service_int_test.go @@ -12,6 +12,7 @@ import ( "testing" "time" + "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" v1 "github.com/metal-stack/metal-api/pkg/api/v1" "github.com/stretchr/testify/require" @@ -83,6 +84,14 @@ type datasource struct { wait map[string]bool } +func (ds *datasource) FindMachine(q *datastore.MachineSearchQuery, ms *metal.Machine) error { + return nil +} + +func (ds *datasource) FindPartition(partitionID string) (*metal.Partition, error) { + return nil, nil +} + func (ds *datasource) FindMachineByID(machineID string) (*metal.Machine, error) { return &metal.Machine{ Base: metal.Base{ @@ -97,6 +106,9 @@ func (ds *datasource) UpdateMachine(old, new *metal.Machine) error { ds.wait[new.ID] = new.Waiting return nil } +func (ds *datasource) FromHardware(hw metal.MachineHardware) (*metal.Size, []*metal.SizeMatchingLog, error) { + return nil, nil, nil +} func (ds *datasource) CreateMachine(new *metal.Machine) error { return nil @@ -104,6 +116,18 @@ func (ds *datasource) CreateMachine(new *metal.Machine) error { func (ds *datasource) ProvisioningEventForMachine(log *zap.SugaredLogger, machineID, event, message string) (*metal.ProvisioningEventContainer, error) { return nil, nil } +func (ds *datasource) FindProvisioningEventContainer(id string) (*metal.ProvisioningEventContainer, error) { + return nil, nil +} +func (ds *datasource) CreateProvisioningEventContainer(ec *metal.ProvisioningEventContainer) error { + return nil +} +func (ds *datasource) SetVrfAtSwitches(m *metal.Machine, vrf string) ([]metal.Switch, error) { + return nil, nil +} +func (ds *datasource) ConnectMachineWithSwitches(m *metal.Machine) error { + return nil +} func (t *test) run() { defer t.shutdown() diff --git a/cmd/metal-api/internal/service/machine-service.go b/cmd/metal-api/internal/service/machine-service.go index ce1ea6652..98616b3eb 100644 --- a/cmd/metal-api/internal/service/machine-service.go +++ b/cmd/metal-api/internal/service/machine-service.go @@ -769,7 +769,7 @@ func (r machineResource) registerMachine(request *restful.Request, response *res old := *m err = retry.Do( func() error { - err := connectMachineWithSwitches(r.ds, m) + err := r.ds.ConnectMachineWithSwitches(m) if err != nil { return err } @@ -1737,7 +1737,7 @@ func (r machineResource) finalizeAllocation(request *restful.Request, response * err = retry.Do( func() error { - _, err := setVrfAtSwitches(r.ds, m, vrf) + _, err := r.ds.SetVrfAtSwitches(m, vrf) return err }, retry.Attempts(10), @@ -2012,7 +2012,7 @@ func deleteVRFSwitches(ds *datastore.RethinkStore, m *metal.Machine, logger *zap logger.Info("set VRF at switch", zap.String("machineID", m.ID)) err := retry.Do( func() error { - _, err := setVrfAtSwitches(ds, m, "") + _, err := ds.SetVrfAtSwitches(m, "") return err }, retry.Attempts(10), diff --git a/cmd/metal-api/internal/service/switch-service.go b/cmd/metal-api/internal/service/switch-service.go index 3cbd60d02..a0a9f2982 100644 --- a/cmd/metal-api/internal/service/switch-service.go +++ b/cmd/metal-api/internal/service/switch-service.go @@ -564,106 +564,7 @@ func updateSwitchNics(oldNics metal.NicMap, newNics metal.NicMap, currentConnect return finalNics, nil } -// SetVrfAtSwitches finds the switches connected to the given machine and puts the switch ports into the given vrf. -// Returns the updated switches. -func setVrfAtSwitches(ds *datastore.RethinkStore, m *metal.Machine, vrf string) ([]metal.Switch, error) { - switches, err := ds.SearchSwitchesConnectedToMachine(m) - if err != nil { - return nil, err - } - newSwitches := make([]metal.Switch, 0) - for i := range switches { - sw := switches[i] - oldSwitch := sw - setVrf(&sw, m.ID, vrf) - err := ds.UpdateSwitch(&oldSwitch, &sw) - if err != nil { - return nil, err - } - newSwitches = append(newSwitches, sw) - } - return newSwitches, nil -} - -func setVrf(s *metal.Switch, mid, vrf string) { - affectedMacs := map[metal.MacAddress]bool{} - for _, c := range s.MachineConnections[mid] { - mac := c.Nic.MacAddress - affectedMacs[mac] = true - } - - if len(affectedMacs) == 0 { - return - } - - nics := metal.Nics{} - for mac, old := range s.Nics.ByMac() { - e := old - if _, ok := affectedMacs[mac]; ok { - e.Vrf = vrf - } - nics = append(nics, *e) - } - s.Nics = nics -} - -func connectMachineWithSwitches(ds *datastore.RethinkStore, m *metal.Machine) error { - switches, err := ds.SearchSwitches("", nil) - if err != nil { - return err - } - oldSwitches := []metal.Switch{} - newSwitches := []metal.Switch{} - for _, sw := range switches { - oldSwitch := sw - if cons := sw.ConnectMachine(m); cons > 0 { - oldSwitches = append(oldSwitches, oldSwitch) - newSwitches = append(newSwitches, sw) - } - } - - if len(newSwitches) != 2 { - return fmt.Errorf("machine %v is not connected to exactly two switches, found connections to %d switches", m.ID, len(newSwitches)) - } - s1 := newSwitches[0] - s2 := newSwitches[1] - cons1 := s1.MachineConnections[m.ID] - cons2 := s2.MachineConnections[m.ID] - connectionMapError := fmt.Errorf("twin-switches do not have a connection map that is mirrored crosswise for machine %v, switch %v (connections: %v), switch %v (connections: %v)", m.ID, s1.Name, cons1, s2.Name, cons2) - if len(cons1) != len(cons2) { - return connectionMapError - } - - if s1.RackID != s2.RackID { - return fmt.Errorf("connected switches of a machine must reside in the same rack, rack of switch %s: %s, rack of switch %s: %s, machine: %s", s1.Name, s1.RackID, s2.Name, s2.RackID, m.ID) - } - // We detect the rackID of a machine by connections to leaf switches - m.RackID = s1.RackID - - byNicName, err := s2.MachineConnections.ByNicName() - if err != nil { - return err - } - for _, con := range s1.MachineConnections[m.ID] { - if con2, has := byNicName[con.Nic.Name]; has { - if con.Nic.Name != con2.Nic.Name { - return connectionMapError - } - } else { - return connectionMapError - } - } - - for i := range oldSwitches { - err = ds.UpdateSwitch(&oldSwitches[i], &newSwitches[i]) - if err != nil { - return err - } - } - - return nil -} func makeSwitchResponse(s *metal.Switch, ds *datastore.RethinkStore) (*v1.SwitchResponse, error) { p, ips, machines, err := findSwitchReferencedEntites(s, ds) diff --git a/cmd/metal-api/internal/service/switch-service_test.go b/cmd/metal-api/internal/service/switch-service_test.go index 7dd0eaeac..39d2f49fa 100644 --- a/cmd/metal-api/internal/service/switch-service_test.go +++ b/cmd/metal-api/internal/service/switch-service_test.go @@ -264,7 +264,7 @@ func TestConnectMachineWithSwitches(t *testing.T) { mock.On(r.DB("mockdb").Table("switch").Get(r.MockAnything()).Replace(r.MockAnything())).Return(testdata.EmptyResult, nil) t.Run(tt.name, func(t *testing.T) { - if err := connectMachineWithSwitches(ds, tt.machine); (err != nil) != tt.wantErr { + if err := ds.ConnectMachineWithSwitches(tt.machine); (err != nil) != tt.wantErr { t.Errorf("RethinkStore.connectMachineWithSwitches() error = %v, wantErr %v", err, tt.wantErr) } }) @@ -303,7 +303,7 @@ func TestSetVrfAtSwitch(t *testing.T) { Base: metal.Base{ID: "1"}, PartitionID: "1", } - switches, err := setVrfAtSwitches(ds, m, vrf) + switches, err := ds.SetVrfAtSwitches(m, vrf) require.NoError(t, err, "no error was expected: got %v", err) require.Len(t, switches, 1) for _, s := range switches { diff --git a/go.mod b/go.mod index 1eb6aeee6..d39152cea 100644 --- a/go.mod +++ b/go.mod @@ -5,12 +5,12 @@ go 1.18 require ( github.com/Masterminds/semver/v3 v3.1.1 github.com/avast/retry-go/v4 v4.0.4 - github.com/aws/aws-sdk-go v1.44.3 + github.com/aws/aws-sdk-go v1.44.7 github.com/dustin/go-humanize v1.0.0 github.com/emicklei/go-restful-openapi/v2 v2.9.0 github.com/emicklei/go-restful/v3 v3.7.4 github.com/go-logr/zapr v1.2.3 - github.com/go-openapi/spec v0.20.5 + github.com/go-openapi/spec v0.20.6 github.com/go-stack/stack v1.8.1 github.com/google/go-cmp v0.5.8 github.com/google/uuid v1.3.0 diff --git a/go.sum b/go.sum index 19d3572e2..782791be8 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,8 @@ github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevB github.com/avast/retry-go/v4 v4.0.4 h1:38hLf0DsRXh+hOF6HbTni0+5QGTNdw9zbaMD7KAO830= github.com/avast/retry-go/v4 v4.0.4/go.mod h1:HqmLvS2VLdStPCGDFjSuZ9pzlTqVRldCI4w2dO4m1Ms= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.44.3 h1:GA9bJsWeJdwPtcKK9Uq3jfMaPko0ROWzVuqwFM7BBP0= -github.com/aws/aws-sdk-go v1.44.3/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.7 h1:LpCM8Fpw/L58vgdve6A+UqJr8dzo6Xj7HX7DIIGHg2A= +github.com/aws/aws-sdk-go v1.44.7/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -439,8 +439,8 @@ github.com/go-openapi/spec v0.19.5/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHK github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= -github.com/go-openapi/spec v0.20.5 h1:skHa8av4VnAtJU5zyAUXrrdK/NDiVX8lchbG+BfcdrE= -github.com/go-openapi/spec v0.20.5/go.mod h1:QbfOSIVt3/sac+a1wzmKbbcLXm5NdZnyBZYtCijp43o= +github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ= +github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= @@ -1108,8 +1108,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA= -golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go new file mode 100644 index 000000000..d6ab93992 --- /dev/null +++ b/pkg/api/v1/boot.pb.go @@ -0,0 +1,1482 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.26.0 +// protoc v3.20.0 +// source: api/v1/boot.proto + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type RegisterState int32 + +const ( + RegisterState_REGISTER_STATE_UNSPECIFIED RegisterState = 0 + RegisterState_REGISTER_STATE_CREATED RegisterState = 1 + RegisterState_REGISTER_STATE_UPDATED RegisterState = 2 +) + +// Enum value maps for RegisterState. +var ( + RegisterState_name = map[int32]string{ + 0: "REGISTER_STATE_UNSPECIFIED", + 1: "REGISTER_STATE_CREATED", + 2: "REGISTER_STATE_UPDATED", + } + RegisterState_value = map[string]int32{ + "REGISTER_STATE_UNSPECIFIED": 0, + "REGISTER_STATE_CREATED": 1, + "REGISTER_STATE_UPDATED": 2, + } +) + +func (x RegisterState) Enum() *RegisterState { + p := new(RegisterState) + *p = x + return p +} + +func (x RegisterState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (RegisterState) Descriptor() protoreflect.EnumDescriptor { + return file_api_v1_boot_proto_enumTypes[0].Descriptor() +} + +func (RegisterState) Type() protoreflect.EnumType { + return &file_api_v1_boot_proto_enumTypes[0] +} + +func (x RegisterState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use RegisterState.Descriptor instead. +func (RegisterState) EnumDescriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{0} +} + +type BootServiceBootRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + PartitionId string `protobuf:"bytes,2,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` +} + +func (x *BootServiceBootRequest) Reset() { + *x = BootServiceBootRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceBootRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceBootRequest) ProtoMessage() {} + +func (x *BootServiceBootRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceBootRequest.ProtoReflect.Descriptor instead. +func (*BootServiceBootRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{0} +} + +func (x *BootServiceBootRequest) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *BootServiceBootRequest) GetPartitionId() string { + if x != nil { + return x.PartitionId + } + return "" +} + +type BootServiceBootResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Kernel string `protobuf:"bytes,1,opt,name=kernel,proto3" json:"kernel,omitempty"` + InitRamDisks []string `protobuf:"bytes,2,rep,name=init_ram_disks,json=initRamDisks,proto3" json:"init_ram_disks,omitempty"` + Cmdline *string `protobuf:"bytes,3,opt,name=cmdline,proto3,oneof" json:"cmdline,omitempty"` +} + +func (x *BootServiceBootResponse) Reset() { + *x = BootServiceBootResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceBootResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceBootResponse) ProtoMessage() {} + +func (x *BootServiceBootResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceBootResponse.ProtoReflect.Descriptor instead. +func (*BootServiceBootResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{1} +} + +func (x *BootServiceBootResponse) GetKernel() string { + if x != nil { + return x.Kernel + } + return "" +} + +func (x *BootServiceBootResponse) GetInitRamDisks() []string { + if x != nil { + return x.InitRamDisks + } + return nil +} + +func (x *BootServiceBootResponse) GetCmdline() string { + if x != nil && x.Cmdline != nil { + return *x.Cmdline + } + return "" +} + +type BootServiceRegisterRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Hardware *MachineHardware `protobuf:"bytes,2,opt,name=hardware,proto3" json:"hardware,omitempty"` + Bios *MachineBIOS `protobuf:"bytes,3,opt,name=bios,proto3" json:"bios,omitempty"` + Ipmi *MachineIPMI `protobuf:"bytes,4,opt,name=ipmi,proto3" json:"ipmi,omitempty"` + Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` +} + +func (x *BootServiceRegisterRequest) Reset() { + *x = BootServiceRegisterRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceRegisterRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceRegisterRequest) ProtoMessage() {} + +func (x *BootServiceRegisterRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceRegisterRequest.ProtoReflect.Descriptor instead. +func (*BootServiceRegisterRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{2} +} + +func (x *BootServiceRegisterRequest) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *BootServiceRegisterRequest) GetHardware() *MachineHardware { + if x != nil { + return x.Hardware + } + return nil +} + +func (x *BootServiceRegisterRequest) GetBios() *MachineBIOS { + if x != nil { + return x.Bios + } + return nil +} + +func (x *BootServiceRegisterRequest) GetIpmi() *MachineIPMI { + if x != nil { + return x.Ipmi + } + return nil +} + +func (x *BootServiceRegisterRequest) GetTags() []string { + if x != nil { + return x.Tags + } + return nil +} + +type BootServiceRegisterResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + PartitionId string `protobuf:"bytes,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` + RegisterState RegisterState `protobuf:"varint,4,opt,name=register_state,json=registerState,proto3,enum=api.v1.RegisterState" json:"register_state,omitempty"` +} + +func (x *BootServiceRegisterResponse) Reset() { + *x = BootServiceRegisterResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceRegisterResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceRegisterResponse) ProtoMessage() {} + +func (x *BootServiceRegisterResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceRegisterResponse.ProtoReflect.Descriptor instead. +func (*BootServiceRegisterResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{3} +} + +func (x *BootServiceRegisterResponse) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *BootServiceRegisterResponse) GetSize() string { + if x != nil { + return x.Size + } + return "" +} + +func (x *BootServiceRegisterResponse) GetPartitionId() string { + if x != nil { + return x.PartitionId + } + return "" +} + +func (x *BootServiceRegisterResponse) GetRegisterState() RegisterState { + if x != nil { + return x.RegisterState + } + return RegisterState_REGISTER_STATE_UNSPECIFIED +} + +type MachineHardware struct { + state protoimpl.MessageState + 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"` +} + +func (x *MachineHardware) Reset() { + *x = MachineHardware{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineHardware) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineHardware) ProtoMessage() {} + +func (x *MachineHardware) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineHardware.ProtoReflect.Descriptor instead. +func (*MachineHardware) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{4} +} + +func (x *MachineHardware) GetMemory() uint64 { + if x != nil { + return x.Memory + } + 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 + } + return nil +} + +func (x *MachineHardware) GetNics() []*MachineNic { + if x != nil { + return x.Nics + } + return nil +} + +type MachineNic struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Neighbor []*MachineNic `protobuf:"bytes,3,rep,name=neighbor,proto3" json:"neighbor,omitempty"` +} + +func (x *MachineNic) Reset() { + *x = MachineNic{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineNic) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineNic) ProtoMessage() {} + +func (x *MachineNic) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineNic.ProtoReflect.Descriptor instead. +func (*MachineNic) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{5} +} + +func (x *MachineNic) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *MachineNic) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MachineNic) GetNeighbor() []*MachineNic { + if x != nil { + return x.Neighbor + } + return nil +} + +type MachineBlockDevice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` +} + +func (x *MachineBlockDevice) Reset() { + *x = MachineBlockDevice{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineBlockDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineBlockDevice) ProtoMessage() {} + +func (x *MachineBlockDevice) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineBlockDevice.ProtoReflect.Descriptor instead. +func (*MachineBlockDevice) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{6} +} + +func (x *MachineBlockDevice) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *MachineBlockDevice) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +type MachineBIOS struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` + Vendor string `protobuf:"bytes,2,opt,name=vendor,proto3" json:"vendor,omitempty"` + Date string `protobuf:"bytes,3,opt,name=date,proto3" json:"date,omitempty"` +} + +func (x *MachineBIOS) Reset() { + *x = MachineBIOS{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineBIOS) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineBIOS) ProtoMessage() {} + +func (x *MachineBIOS) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineBIOS.ProtoReflect.Descriptor instead. +func (*MachineBIOS) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{7} +} + +func (x *MachineBIOS) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *MachineBIOS) GetVendor() string { + if x != nil { + return x.Vendor + } + return "" +} + +func (x *MachineBIOS) GetDate() string { + if x != nil { + return x.Date + } + return "" +} + +type MachineIPMI struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Mac string `protobuf:"bytes,2,opt,name=mac,proto3" json:"mac,omitempty"` + User string `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` + Interface string `protobuf:"bytes,5,opt,name=interface,proto3" json:"interface,omitempty"` + Fru *MachineFRU `protobuf:"bytes,6,opt,name=fru,proto3" json:"fru,omitempty"` + BmcVersion string `protobuf:"bytes,7,opt,name=bmc_version,json=bmcVersion,proto3" json:"bmc_version,omitempty"` + PowerState string `protobuf:"bytes,8,opt,name=power_state,json=powerState,proto3" json:"power_state,omitempty"` +} + +func (x *MachineIPMI) Reset() { + *x = MachineIPMI{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineIPMI) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineIPMI) ProtoMessage() {} + +func (x *MachineIPMI) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineIPMI.ProtoReflect.Descriptor instead. +func (*MachineIPMI) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{8} +} + +func (x *MachineIPMI) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MachineIPMI) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +func (x *MachineIPMI) GetUser() string { + if x != nil { + return x.User + } + return "" +} + +func (x *MachineIPMI) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *MachineIPMI) GetInterface() string { + if x != nil { + return x.Interface + } + return "" +} + +func (x *MachineIPMI) GetFru() *MachineFRU { + if x != nil { + return x.Fru + } + return nil +} + +func (x *MachineIPMI) GetBmcVersion() string { + if x != nil { + return x.BmcVersion + } + return "" +} + +func (x *MachineIPMI) GetPowerState() string { + if x != nil { + return x.PowerState + } + return "" +} + +type MachineFRU struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChassisPartNumber *string `protobuf:"bytes,1,opt,name=chassis_part_number,json=chassisPartNumber,proto3,oneof" json:"chassis_part_number,omitempty"` + ChassisPartSerial *string `protobuf:"bytes,2,opt,name=chassis_part_serial,json=chassisPartSerial,proto3,oneof" json:"chassis_part_serial,omitempty"` + BoardMfg *string `protobuf:"bytes,3,opt,name=board_mfg,json=boardMfg,proto3,oneof" json:"board_mfg,omitempty"` + BoardMfgSerial *string `protobuf:"bytes,4,opt,name=board_mfg_serial,json=boardMfgSerial,proto3,oneof" json:"board_mfg_serial,omitempty"` + BoardPartNumber *string `protobuf:"bytes,5,opt,name=board_part_number,json=boardPartNumber,proto3,oneof" json:"board_part_number,omitempty"` + ProductManufacturer *string `protobuf:"bytes,6,opt,name=product_manufacturer,json=productManufacturer,proto3,oneof" json:"product_manufacturer,omitempty"` + ProductPartNumber *string `protobuf:"bytes,7,opt,name=product_part_number,json=productPartNumber,proto3,oneof" json:"product_part_number,omitempty"` + ProductSerial *string `protobuf:"bytes,8,opt,name=product_serial,json=productSerial,proto3,oneof" json:"product_serial,omitempty"` +} + +func (x *MachineFRU) Reset() { + *x = MachineFRU{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MachineFRU) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MachineFRU) ProtoMessage() {} + +func (x *MachineFRU) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use MachineFRU.ProtoReflect.Descriptor instead. +func (*MachineFRU) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{9} +} + +func (x *MachineFRU) GetChassisPartNumber() string { + if x != nil && x.ChassisPartNumber != nil { + return *x.ChassisPartNumber + } + return "" +} + +func (x *MachineFRU) GetChassisPartSerial() string { + if x != nil && x.ChassisPartSerial != nil { + return *x.ChassisPartSerial + } + return "" +} + +func (x *MachineFRU) GetBoardMfg() string { + if x != nil && x.BoardMfg != nil { + return *x.BoardMfg + } + return "" +} + +func (x *MachineFRU) GetBoardMfgSerial() string { + if x != nil && x.BoardMfgSerial != nil { + return *x.BoardMfgSerial + } + return "" +} + +func (x *MachineFRU) GetBoardPartNumber() string { + if x != nil && x.BoardPartNumber != nil { + return *x.BoardPartNumber + } + return "" +} + +func (x *MachineFRU) GetProductManufacturer() string { + if x != nil && x.ProductManufacturer != nil { + return *x.ProductManufacturer + } + return "" +} + +func (x *MachineFRU) GetProductPartNumber() string { + if x != nil && x.ProductPartNumber != nil { + return *x.ProductPartNumber + } + return "" +} + +func (x *MachineFRU) GetProductSerial() string { + if x != nil && x.ProductSerial != nil { + return *x.ProductSerial + } + return "" +} + +type BootServiceReportRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + ConsolePassword string `protobuf:"bytes,2,opt,name=console_password,json=consolePassword,proto3" json:"console_password,omitempty"` + PrimaryDisk string `protobuf:"bytes,3,opt,name=primary_disk,json=primaryDisk,proto3" json:"primary_disk,omitempty"` + OsPartition string `protobuf:"bytes,4,opt,name=os_partition,json=osPartition,proto3" json:"os_partition,omitempty"` + Initrd string `protobuf:"bytes,5,opt,name=initrd,proto3" json:"initrd,omitempty"` + Cmdline string `protobuf:"bytes,6,opt,name=cmdline,proto3" json:"cmdline,omitempty"` + Kernel string `protobuf:"bytes,7,opt,name=kernel,proto3" json:"kernel,omitempty"` + BootloaderId string `protobuf:"bytes,8,opt,name=bootloader_id,json=bootloaderId,proto3" json:"bootloader_id,omitempty"` +} + +func (x *BootServiceReportRequest) Reset() { + *x = BootServiceReportRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceReportRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceReportRequest) ProtoMessage() {} + +func (x *BootServiceReportRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceReportRequest.ProtoReflect.Descriptor instead. +func (*BootServiceReportRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{10} +} + +func (x *BootServiceReportRequest) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *BootServiceReportRequest) GetConsolePassword() string { + if x != nil { + return x.ConsolePassword + } + return "" +} + +func (x *BootServiceReportRequest) GetPrimaryDisk() string { + if x != nil { + return x.PrimaryDisk + } + return "" +} + +func (x *BootServiceReportRequest) GetOsPartition() string { + if x != nil { + return x.OsPartition + } + return "" +} + +func (x *BootServiceReportRequest) GetInitrd() string { + if x != nil { + return x.Initrd + } + return "" +} + +func (x *BootServiceReportRequest) GetCmdline() string { + if x != nil { + return x.Cmdline + } + return "" +} + +func (x *BootServiceReportRequest) GetKernel() string { + if x != nil { + return x.Kernel + } + return "" +} + +func (x *BootServiceReportRequest) GetBootloaderId() string { + if x != nil { + return x.BootloaderId + } + return "" +} + +type BootServiceReportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BootServiceReportResponse) Reset() { + *x = BootServiceReportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceReportResponse) ProtoMessage() {} + +func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceReportResponse.ProtoReflect.Descriptor instead. +func (*BootServiceReportResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{11} +} + +var File_api_v1_boot_proto protoreflect.FileDescriptor + +var file_api_v1_boot_proto_rawDesc = []byte{ + 0x0a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x4d, 0x0a, 0x16, 0x42, + 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x17, 0x42, + 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x24, + 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, + 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, + 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, + 0xcb, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, + 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, + 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, + 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x52, 0x08, 0x68, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, 0x49, 0x4f, 0x53, 0x52, 0x04, 0x62, 0x69, 0x6f, 0x73, + 0x12, 0x27, 0x0a, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, + 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, + 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, + 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, + 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa0, 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, 0x22, 0x62, 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, 0x2e, 0x0a, + 0x08, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 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, 0x08, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 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, 0x8e, 0x02, 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, + 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, + 0x03, 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, 0x04, 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, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, + 0x6c, 0x18, 0x07, 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, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x80, 0x02, 0x0a, 0x0b, 0x42, + 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 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, 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, 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, 0x42, 0x0a, 0x5a, + 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, +} + +var ( + file_api_v1_boot_proto_rawDescOnce sync.Once + file_api_v1_boot_proto_rawDescData = file_api_v1_boot_proto_rawDesc +) + +func file_api_v1_boot_proto_rawDescGZIP() []byte { + file_api_v1_boot_proto_rawDescOnce.Do(func() { + file_api_v1_boot_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_boot_proto_rawDescData) + }) + return file_api_v1_boot_proto_rawDescData +} + +var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_api_v1_boot_proto_goTypes = []interface{}{ + (RegisterState)(0), // 0: api.v1.RegisterState + (*BootServiceBootRequest)(nil), // 1: api.v1.BootServiceBootRequest + (*BootServiceBootResponse)(nil), // 2: api.v1.BootServiceBootResponse + (*BootServiceRegisterRequest)(nil), // 3: api.v1.BootServiceRegisterRequest + (*BootServiceRegisterResponse)(nil), // 4: api.v1.BootServiceRegisterResponse + (*MachineHardware)(nil), // 5: api.v1.MachineHardware + (*MachineNic)(nil), // 6: api.v1.MachineNic + (*MachineBlockDevice)(nil), // 7: api.v1.MachineBlockDevice + (*MachineBIOS)(nil), // 8: api.v1.MachineBIOS + (*MachineIPMI)(nil), // 9: api.v1.MachineIPMI + (*MachineFRU)(nil), // 10: api.v1.MachineFRU + (*BootServiceReportRequest)(nil), // 11: api.v1.BootServiceReportRequest + (*BootServiceReportResponse)(nil), // 12: api.v1.BootServiceReportResponse +} +var file_api_v1_boot_proto_depIdxs = []int32{ + 5, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware + 8, // 1: api.v1.BootServiceRegisterRequest.bios:type_name -> api.v1.MachineBIOS + 9, // 2: api.v1.BootServiceRegisterRequest.ipmi:type_name -> api.v1.MachineIPMI + 0, // 3: api.v1.BootServiceRegisterResponse.register_state:type_name -> api.v1.RegisterState + 7, // 4: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice + 6, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic + 6, // 6: api.v1.MachineNic.neighbor:type_name -> api.v1.MachineNic + 10, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU + 1, // 8: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest + 3, // 9: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest + 11, // 10: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest + 2, // 11: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse + 4, // 12: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse + 12, // 13: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse + 11, // [11:14] is the sub-list for method output_type + 8, // [8:11] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name +} + +func init() { file_api_v1_boot_proto_init() } +func file_api_v1_boot_proto_init() { + if File_api_v1_boot_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_api_v1_boot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceBootRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceBootResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceRegisterRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceRegisterResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineHardware); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineNic); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineBlockDevice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineBIOS); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineIPMI); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MachineFRU); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceReportRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceReportResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_api_v1_boot_proto_msgTypes[1].OneofWrappers = []interface{}{} + file_api_v1_boot_proto_msgTypes[9].OneofWrappers = []interface{}{} + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_api_v1_boot_proto_rawDesc, + NumEnums: 1, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_api_v1_boot_proto_goTypes, + DependencyIndexes: file_api_v1_boot_proto_depIdxs, + EnumInfos: file_api_v1_boot_proto_enumTypes, + MessageInfos: file_api_v1_boot_proto_msgTypes, + }.Build() + File_api_v1_boot_proto = out.File + file_api_v1_boot_proto_rawDesc = nil + file_api_v1_boot_proto_goTypes = nil + file_api_v1_boot_proto_depIdxs = nil +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// BootServiceClient is the client API for BootService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type BootServiceClient interface { + Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) + Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) + Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) +} + +type bootServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBootServiceClient(cc grpc.ClientConnInterface) BootServiceClient { + return &bootServiceClient{cc} +} + +func (c *bootServiceClient) Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) { + out := new(BootServiceBootResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Boot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) { + out := new(BootServiceRegisterResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Register", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) { + out := new(BootServiceReportResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Report", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BootServiceServer is the server API for BootService service. +type BootServiceServer interface { + Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) + Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) + Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) +} + +// UnimplementedBootServiceServer can be embedded to have forward compatible implementations. +type UnimplementedBootServiceServer struct { +} + +func (*UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Boot not implemented") +} +func (*UnimplementedBootServiceServer) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +} +func (*UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") +} + +func RegisterBootServiceServer(s *grpc.Server, srv BootServiceServer) { + s.RegisterService(&_BootService_serviceDesc, srv) +} + +func _BootService_Boot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceBootRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Boot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Boot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Boot(ctx, req.(*BootServiceBootRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceRegisterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Register(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Register", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Register(ctx, req.(*BootServiceRegisterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Report(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Report", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Report(ctx, req.(*BootServiceReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _BootService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.BootService", + HandlerType: (*BootServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Boot", + Handler: _BootService_Boot_Handler, + }, + { + MethodName: "Register", + Handler: _BootService_Register_Handler, + }, + { + MethodName: "Report", + Handler: _BootService_Report_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/boot.proto", +} diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto new file mode 100644 index 000000000..a0fee40a4 --- /dev/null +++ b/pkg/api/v1/boot.proto @@ -0,0 +1,103 @@ +syntax = "proto3"; + +package api.v1; + +option go_package = "./api/v1"; + +service BootService { + rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} + rpc Register(BootServiceRegisterRequest)returns (BootServiceRegisterResponse) {} + rpc Report(BootServiceReportRequest)returns (BootServiceReportResponse) {} +} + +message BootServiceBootRequest { + string mac = 1; + string partition_id = 2; +} + +message BootServiceBootResponse { + string kernel = 1; + repeated string init_ram_disks = 2; + optional string cmdline = 3; +} + +message BootServiceRegisterRequest { + string uuid = 1; + MachineHardware hardware = 2; + MachineBIOS bios = 3; + MachineIPMI ipmi = 4; + repeated string tags = 5; +} + +message BootServiceRegisterResponse { + string uuid = 1; + string size = 2; + string partition_id = 3; + RegisterState register_state = 4; +} + +message MachineHardware { + uint64 memory = 1; + uint32 cpu_cores = 2 ; + repeated MachineBlockDevice disks = 3; + repeated MachineNic nics = 4; +} + +message MachineNic { + string mac = 1; + string name = 2; + repeated MachineNic neighbor = 3; +} + +message MachineBlockDevice { + string name = 1; + uint64 size = 2; +} + +message MachineBIOS { + string version = 1; + string vendor = 2; + string date = 3; +} + +message MachineIPMI { + string address = 1; + string mac = 2; + string user = 3; + string password = 4; + string interface = 5; + MachineFRU fru = 6; + string bmc_version = 7; + string power_state = 8; +} + +message MachineFRU { + optional string chassis_part_number = 1; + optional string chassis_part_serial = 2; + optional string board_mfg = 3; + optional string board_mfg_serial = 4; + optional string board_part_number = 5; + optional string product_manufacturer = 6; + optional string product_part_number = 7; + optional string product_serial = 8; +} + +message BootServiceReportRequest { + string uuid = 1; + string console_password = 2; + string primary_disk = 3; + string os_partition = 4; + string initrd = 5; + string cmdline = 6; + string kernel = 7; + string bootloader_id = 8; + +} +message BootServiceReportResponse { +} + +enum RegisterState { + REGISTER_STATE_UNSPECIFIED = 0; + REGISTER_STATE_CREATED = 1; + REGISTER_STATE_UPDATED = 2; +} \ No newline at end of file From 520dc1b706ca1b92cb97064bf7fef4a7a69cf39c Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 6 May 2022 14:57:36 +0200 Subject: [PATCH 02/42] Report.success/message --- cmd/metal-api/internal/grpc/boot-service.go | 2 + pkg/api/v1/boot.pb.go | 73 +++++++++++++-------- pkg/api/v1/boot.proto | 3 +- 3 files changed, 50 insertions(+), 28 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index ed0d713ad..600998644 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -271,6 +271,8 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportRequest) (*v1.BootServiceReportResponse, error) { b.log.Infow("report", "req", req) + // FIXME implement success handling + m, err := b.ds.FindMachineByID(req.Uuid) if err != nil { return nil, err diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index d6ab93992..df848ac6f 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -812,6 +812,8 @@ type BootServiceReportRequest struct { Cmdline string `protobuf:"bytes,6,opt,name=cmdline,proto3" json:"cmdline,omitempty"` Kernel string `protobuf:"bytes,7,opt,name=kernel,proto3" json:"kernel,omitempty"` BootloaderId string `protobuf:"bytes,8,opt,name=bootloader_id,json=bootloaderId,proto3" json:"bootloader_id,omitempty"` + Success bool `protobuf:"varint,9,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,10,opt,name=message,proto3" json:"message,omitempty"` } func (x *BootServiceReportRequest) Reset() { @@ -902,6 +904,20 @@ func (x *BootServiceReportRequest) GetBootloaderId() string { return "" } +func (x *BootServiceReportRequest) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *BootServiceReportRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + type BootServiceReportResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1058,7 +1074,7 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0x8e, 0x02, 0x0a, 0x18, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x61, 0x6c, 0x22, 0xc2, 0x02, 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, @@ -1075,33 +1091,36 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 0x6c, 0x18, 0x07, 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, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x80, 0x02, 0x0a, 0x0b, 0x42, - 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 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, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x42, + 0x65, 0x72, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x09, 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, 0x0a, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x80, + 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 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, 0x42, 0x0a, 0x5a, - 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 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, 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, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index a0fee40a4..68abc437f 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -91,7 +91,8 @@ message BootServiceReportRequest { string cmdline = 6; string kernel = 7; string bootloader_id = 8; - + bool success = 9; + string message = 10; } message BootServiceReportResponse { } From 0e17d3d3d9babccfeb0d5407a5ef0f90e6e11a2b Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Sun, 8 May 2022 14:18:35 +0200 Subject: [PATCH 03/42] process nics with neighbors --- cmd/metal-api/internal/grpc/boot-service.go | 20 ++ pkg/api/v1/boot.pb.go | 232 ++++++++++---------- pkg/api/v1/boot.proto | 2 +- 3 files changed, 137 insertions(+), 117 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 600998644..03780530a 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -106,10 +106,30 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR Size: d.Size, }) } + nics := metal.Nics{} + + for i := range req.Hardware.Nics { + nic := req.Hardware.Nics[i] + neighs := metal.Nics{} + for j := range nic.Neighbors { + neigh := nic.Neighbors[j] + neighs = append(neighs, metal.Nic{ + Name: neigh.Name, + MacAddress: metal.MacAddress(neigh.Mac), + }) + } + nics = append(nics, metal.Nic{ + Name: nic.Name, + MacAddress: metal.MacAddress(nic.Mac), + Neighbors: neighs, + }) + } + machineHardware := metal.MachineHardware{ Memory: req.Hardware.Memory, CPUCores: int(req.Hardware.CpuCores), Disks: disks, + Nics: nics, } size, _, err := b.ds.FromHardware(machineHardware) if err != nil { diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index df848ac6f..8906d2cef 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -417,9 +417,9 @@ type MachineNic struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` - Neighbor []*MachineNic `protobuf:"bytes,3,rep,name=neighbor,proto3" json:"neighbor,omitempty"` + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Neighbors []*MachineNic `protobuf:"bytes,3,rep,name=neighbors,proto3" json:"neighbors,omitempty"` } func (x *MachineNic) Reset() { @@ -468,9 +468,9 @@ func (x *MachineNic) GetName() string { return "" } -func (x *MachineNic) GetNeighbor() []*MachineNic { +func (x *MachineNic) GetNeighbors() []*MachineNic { if x != nil { - return x.Neighbor + return x.Neighbors } return nil } @@ -1007,120 +1007,120 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0x22, 0x62, 0x0a, 0x0a, 0x4d, 0x61, 0x63, + 0x4e, 0x69, 0x63, 0x52, 0x04, 0x6e, 0x69, 0x63, 0x73, 0x22, 0x64, 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, 0x2e, 0x0a, - 0x08, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 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, 0x08, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 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, + 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, 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, 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, 0xc2, 0x02, 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, - 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x18, - 0x03, 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, 0x04, 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, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, 0x18, 0x0a, - 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, - 0x6c, 0x18, 0x07, 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, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, - 0x09, 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, 0x0a, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x80, - 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 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, 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, 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, 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, + 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, 0xc2, 0x02, 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, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, + 0x6b, 0x18, 0x03, 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, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, + 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, + 0x6e, 0x65, 0x6c, 0x18, 0x07, 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, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x09, 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, 0x0a, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, + 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, + 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, + 0x32, 0x80, 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 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, 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, 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, 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, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1159,7 +1159,7 @@ var file_api_v1_boot_proto_depIdxs = []int32{ 0, // 3: api.v1.BootServiceRegisterResponse.register_state:type_name -> api.v1.RegisterState 7, // 4: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice 6, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic - 6, // 6: api.v1.MachineNic.neighbor:type_name -> api.v1.MachineNic + 6, // 6: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic 10, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU 1, // 8: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest 3, // 9: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index 68abc437f..f6deb97f5 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -46,7 +46,7 @@ message MachineHardware { message MachineNic { string mac = 1; string name = 2; - repeated MachineNic neighbor = 3; + repeated MachineNic neighbors = 3; } message MachineBlockDevice { From 99bddd34433760459a835705b876b82a9f847e06 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 9 May 2022 08:21:32 +0200 Subject: [PATCH 04/42] Register BootService --- cmd/metal-api/internal/grpc/grpc-server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/metal-api/internal/grpc/grpc-server.go b/cmd/metal-api/internal/grpc/grpc-server.go index 838212494..2ef000bbc 100644 --- a/cmd/metal-api/internal/grpc/grpc-server.go +++ b/cmd/metal-api/internal/grpc/grpc-server.go @@ -146,6 +146,7 @@ func (s *Server) Serve() error { v1.RegisterSuperUserPasswordServer(s.server, s.SupwdService) v1.RegisterWaitServer(s.server, s.WaitService) v1.RegisterEventServiceServer(s.server, s.EventService) + v1.RegisterBootServiceServer(s.server, s.BootService) listener, err := net.Listen("tcp", addr) if err != nil { From 4c2b811b2f1f944a40600db6183fff0bab5efa05 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 9 May 2022 15:27:31 +0200 Subject: [PATCH 05/42] Return MachineNicExtended on machine get --- .../internal/service/machine-service.go | 30 ++++++++-------- .../machine-service_allocation_test.go | 2 +- .../machine-service_integration_test.go | 2 +- .../internal/service/machine-service_test.go | 2 +- .../internal/service/size-service.go | 4 +-- cmd/metal-api/internal/service/v1/machine.go | 36 ++++++++++--------- 6 files changed, 40 insertions(+), 36 deletions(-) diff --git a/cmd/metal-api/internal/service/machine-service.go b/cmd/metal-api/internal/service/machine-service.go index 730362a25..f0173f77a 100644 --- a/cmd/metal-api/internal/service/machine-service.go +++ b/cmd/metal-api/internal/service/machine-service.go @@ -2308,39 +2308,39 @@ func ResurrectMachines(ds *datastore.RethinkStore, publisher bus.Publisher, ep * } func (r machineResource) machineOn(request *restful.Request, response *restful.Response) { - r.machineCmd("machineOn", metal.MachineOnCmd, request, response) + r.machineCmd(metal.MachineOnCmd, request, response) } func (r machineResource) machineOff(request *restful.Request, response *restful.Response) { - r.machineCmd("machineOff", metal.MachineOffCmd, request, response) + r.machineCmd(metal.MachineOffCmd, request, response) } func (r machineResource) machineReset(request *restful.Request, response *restful.Response) { - r.machineCmd("machineReset", metal.MachineResetCmd, request, response) + r.machineCmd(metal.MachineResetCmd, request, response) } func (r machineResource) machineCycle(request *restful.Request, response *restful.Response) { - r.machineCmd("machineCycle", metal.MachineCycleCmd, request, response) + r.machineCmd(metal.MachineCycleCmd, request, response) } func (r machineResource) machineBios(request *restful.Request, response *restful.Response) { - r.machineCmd("machineBios", metal.MachineBiosCmd, request, response) + r.machineCmd(metal.MachineBiosCmd, request, response) } func (r machineResource) machineDisk(request *restful.Request, response *restful.Response) { - r.machineCmd("machineDisk", metal.MachineDiskCmd, request, response) + r.machineCmd(metal.MachineDiskCmd, request, response) } func (r machineResource) machinePxe(request *restful.Request, response *restful.Response) { - r.machineCmd("machinePxe", metal.MachinePxeCmd, request, response) + r.machineCmd(metal.MachinePxeCmd, request, response) } func (r machineResource) chassisIdentifyLEDOn(request *restful.Request, response *restful.Response) { - r.machineCmd("chassisIdentifyLEDOn", metal.ChassisIdentifyLEDOnCmd, request, response, request.QueryParameter("description")) + r.machineCmd(metal.ChassisIdentifyLEDOnCmd, request, response, request.QueryParameter("description")) } func (r machineResource) chassisIdentifyLEDOff(request *restful.Request, response *restful.Response) { - r.machineCmd("chassisIdentifyLEDOff", metal.ChassisIdentifyLEDOffCmd, request, response, request.QueryParameter("description")) + r.machineCmd(metal.ChassisIdentifyLEDOffCmd, request, response, request.QueryParameter("description")) } func (r machineResource) updateFirmware(request *restful.Request, response *restful.Response) { @@ -2387,22 +2387,22 @@ func (r machineResource) updateFirmware(request *restful.Request, response *rest return } - r.machineCmd("updateFirmware", metal.UpdateFirmwareCmd, request, response, p.Kind, p.Revision, p.Description, r.s3Client.Url, r.s3Client.Key, r.s3Client.Secret, r.s3Client.FirmwareBucket) + r.machineCmd(metal.UpdateFirmwareCmd, request, response, p.Kind, p.Revision, p.Description, r.s3Client.Url, r.s3Client.Key, r.s3Client.Secret, r.s3Client.FirmwareBucket) } -func (r machineResource) machineCmd(op string, cmd metal.MachineCommand, request *restful.Request, response *restful.Response, params ...string) { +func (r machineResource) machineCmd(cmd metal.MachineCommand, request *restful.Request, response *restful.Response, params ...string) { logger := utils.Logger(request).Sugar() id := request.PathParameter("id") m, err := r.ds.FindMachineByID(id) - if checkError(request, response, op, err) { + if checkError(request, response, string(cmd), err) { return } - switch op { - case "machineReset", "machineOff", "machineCycle": + switch cmd { + case metal.MachineResetCmd, metal.MachineOffCmd, metal.MachineCycleCmd: event := string(metal.ProvisioningEventPlannedReboot) - _, err = r.ds.ProvisioningEventForMachine(logger, id, event, op) + _, err = r.ds.ProvisioningEventForMachine(logger, id, event, string(cmd)) if checkError(request, response, utils.CurrentFuncName(), err) { return } 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 c26077ad5..d3c95aa30 100644 --- a/cmd/metal-api/internal/service/machine-service_allocation_test.go +++ b/cmd/metal-api/internal/service/machine-service_allocation_test.go @@ -259,7 +259,7 @@ func createMachineRegisterRequest(i int) v1.MachineRegisterRequest { return v1.MachineRegisterRequest{ UUID: fmt.Sprintf("WaitingMachine%d", i), PartitionID: "p1", - Hardware: v1.MachineHardwareExtended{ + Hardware: v1.MachineHardware{ MachineHardwareBase: v1.MachineHardwareBase{Memory: 4, CPUCores: 4}, Nics: v1.MachineNicsExtended{ { 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 1c4082298..50cc86480 100644 --- a/cmd/metal-api/internal/service/machine-service_integration_test.go +++ b/cmd/metal-api/internal/service/machine-service_integration_test.go @@ -23,7 +23,7 @@ func TestMachineAllocationIntegrationFullCycle(t *testing.T) { mrr := v1.MachineRegisterRequest{ UUID: "test-uuid", PartitionID: "test-partition", - Hardware: v1.MachineHardwareExtended{ + Hardware: v1.MachineHardware{ MachineHardwareBase: v1.MachineHardwareBase{ CPUCores: 8, Memory: 1500, diff --git a/cmd/metal-api/internal/service/machine-service_test.go b/cmd/metal-api/internal/service/machine-service_test.go index c245f232c..2a741b385 100644 --- a/cmd/metal-api/internal/service/machine-service_test.go +++ b/cmd/metal-api/internal/service/machine-service_test.go @@ -200,7 +200,7 @@ func TestRegisterMachine(t *testing.T) { ProductSerial: &testdata.IPMI1.Fru.ProductSerial, }, }, - Hardware: v1.MachineHardwareExtended{ + Hardware: v1.MachineHardware{ MachineHardwareBase: v1.MachineHardwareBase{ CPUCores: tt.numcores, Memory: uint64(tt.memory), diff --git a/cmd/metal-api/internal/service/size-service.go b/cmd/metal-api/internal/service/size-service.go index 933755294..ac38d09e1 100644 --- a/cmd/metal-api/internal/service/size-service.go +++ b/cmd/metal-api/internal/service/size-service.go @@ -94,7 +94,7 @@ func (r sizeResource) webService() *restful.WebService { Operation("fromHardware"). Doc("Searches all sizes for one to match the given hardwarespecs. If nothing is found, a list of entries is returned which describe the constraint which did not match"). Metadata(restfulspec.KeyOpenAPITags, tags). - Reads(v1.MachineHardwareExtended{}). + Reads(v1.MachineHardware{}). Returns(http.StatusOK, "OK", v1.SizeMatchingLog{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) @@ -274,7 +274,7 @@ func (r sizeResource) updateSize(request *restful.Request, response *restful.Res } func (r sizeResource) fromHardware(request *restful.Request, response *restful.Response) { - var requestPayload v1.MachineHardwareExtended + var requestPayload v1.MachineHardware err := request.ReadEntity(&requestPayload) if checkError(request, response, utils.CurrentFuncName(), err) { return diff --git a/cmd/metal-api/internal/service/v1/machine.go b/cmd/metal-api/internal/service/v1/machine.go index 9b03bbe5e..32a04b04a 100644 --- a/cmd/metal-api/internal/service/v1/machine.go +++ b/cmd/metal-api/internal/service/v1/machine.go @@ -80,12 +80,7 @@ type MachineHardwareBase struct { type MachineHardware struct { MachineHardwareBase - Nics MachineNics `json:"nics" description:"the list of network interfaces of this machine"` -} - -type MachineHardwareExtended struct { - MachineHardwareBase - Nics MachineNicsExtended `json:"nics" description:"the list of network interfaces of this machine with extended information"` + Nics MachineNicsExtended `json:"nics" description:"the list of network interfaces of this machine"` } type MachineState struct { @@ -168,11 +163,11 @@ type MachineRegisterRequest struct { UUID string `json:"uuid" description:"the product uuid of the machine to register"` PartitionID string `json:"partitionid" description:"the partition id to register this machine with"` // Deprecated: RackID is not used any longer, it is calculated by the switch connections of a machine. A metal-core instance might respond to pxe requests from all racks - RackID string `json:"rackid" description:"the rack id where this machine is connected to"` - Hardware MachineHardwareExtended `json:"hardware" description:"the hardware of this machine"` - BIOS MachineBIOS `json:"bios" description:"bios information of this machine"` - IPMI MachineIPMI `json:"ipmi" description:"the ipmi access infos"` - Tags []string `json:"tags" description:"tags for this machine"` + RackID string `json:"rackid" description:"the rack id where this machine is connected to"` + Hardware MachineHardware `json:"hardware" description:"the hardware of this machine"` + BIOS MachineBIOS `json:"bios" description:"bios information of this machine"` + IPMI MachineIPMI `json:"ipmi" description:"the ipmi access infos"` + Tags []string `json:"tags" description:"tags for this machine"` } type MachineAllocateRequest struct { @@ -267,7 +262,7 @@ type MachineAbortReinstallRequest struct { PrimaryDiskWiped bool `json:"primary_disk_wiped" description:"indicates whether the primary disk is already wiped"` } -func NewMetalMachineHardware(r *MachineHardwareExtended) metal.MachineHardware { +func NewMetalMachineHardware(r *MachineHardware) metal.MachineHardware { nics := metal.Nics{} for i := range r.Nics { var neighbors metal.Nics @@ -387,11 +382,20 @@ func NewMachineIPMIResponse(m *metal.Machine, s *metal.Size, p *metal.Partition, func NewMachineResponse(m *metal.Machine, s *metal.Size, p *metal.Partition, i *metal.Image, ec *metal.ProvisioningEventContainer) *MachineResponse { var hardware MachineHardware - nics := MachineNics{} + nics := MachineNicsExtended{} for i := range m.Hardware.Nics { - nic := MachineNic{ - MacAddress: string(m.Hardware.Nics[i].MacAddress), - Name: m.Hardware.Nics[i].Name, + n := m.Hardware.Nics[i] + neighs := []MachineNicExtended{} + for j := range n.Neighbors { + neigh := n.Neighbors[j] + neighs = append(neighs, MachineNicExtended{MachineNic: MachineNic{MacAddress: string(neigh.MacAddress), Name: neigh.Name}}) + } + nic := MachineNicExtended{ + MachineNic: MachineNic{ + MacAddress: string(n.MacAddress), + Name: n.Name, + }, + Neighbors: neighs, } nics = append(nics, nic) } From 78ce0e3e14ef7261d09ce6e45d30bd0833117ea6 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 9 May 2022 15:57:55 +0200 Subject: [PATCH 06/42] linter issue --- cmd/metal-api/internal/service/machine-service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/metal-api/internal/service/machine-service.go b/cmd/metal-api/internal/service/machine-service.go index f0173f77a..6f72f06b5 100644 --- a/cmd/metal-api/internal/service/machine-service.go +++ b/cmd/metal-api/internal/service/machine-service.go @@ -2399,7 +2399,7 @@ func (r machineResource) machineCmd(cmd metal.MachineCommand, request *restful.R return } - switch cmd { + switch cmd { // nolint:exhaustive case metal.MachineResetCmd, metal.MachineOffCmd, metal.MachineCycleCmd: event := string(metal.ProvisioningEventPlannedReboot) _, err = r.ds.ProvisioningEventForMachine(logger, id, event, string(cmd)) From 7dcb5e86cff64ca3a8f759630abfb13649734ca5 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 9 May 2022 16:07:44 +0200 Subject: [PATCH 07/42] spec adoption --- spec/metal-api.json | 40 +++------------------------------------- 1 file changed, 3 insertions(+), 37 deletions(-) diff --git a/spec/metal-api.json b/spec/metal-api.json index 61798b25e..489be1f75 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -2336,7 +2336,7 @@ "nics": { "description": "the list of network interfaces of this machine", "items": { - "$ref": "#/definitions/v1.MachineNic" + "$ref": "#/definitions/v1.MachineNicExtended" }, "type": "array" } @@ -2374,40 +2374,6 @@ "memory" ] }, - "v1.MachineHardwareExtended": { - "properties": { - "cpu_cores": { - "description": "the number of cpu cores", - "format": "int32", - "type": "integer" - }, - "disks": { - "description": "the list of block devices of this machine", - "items": { - "$ref": "#/definitions/v1.MachineBlockDevice" - }, - "type": "array" - }, - "memory": { - "description": "the total memory of the machine", - "format": "integer", - "type": "integer" - }, - "nics": { - "description": "the list of network interfaces of this machine with extended information", - "items": { - "$ref": "#/definitions/v1.MachineNicExtended" - }, - "type": "array" - } - }, - "required": [ - "cpu_cores", - "disks", - "memory", - "nics" - ] - }, "v1.MachineIPMI": { "description": "The IPMI connection data", "properties": { @@ -2790,7 +2756,7 @@ "description": "bios information of this machine" }, "hardware": { - "$ref": "#/definitions/v1.MachineHardwareExtended", + "$ref": "#/definitions/v1.MachineHardware", "description": "the hardware of this machine" }, "ipmi": { @@ -8269,7 +8235,7 @@ "name": "body", "required": true, "schema": { - "$ref": "#/definitions/v1.MachineHardwareExtended" + "$ref": "#/definitions/v1.MachineHardware" } } ], From cc88e7d3f2331ca29226f1210e7749a6a64feeb5 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 9 May 2022 16:19:32 +0200 Subject: [PATCH 08/42] Remove NicExtended --- .../machine-service_allocation_test.go | 30 ++++++---------- .../machine-service_integration_test.go | 36 ++++++++----------- .../internal/service/machine-service_test.go | 22 +++++------- cmd/metal-api/internal/service/v1/machine.go | 30 ++++++---------- spec/metal-api.json | 20 ++--------- 5 files changed, 47 insertions(+), 91 deletions(-) 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 d3c95aa30..dfdc9af26 100644 --- a/cmd/metal-api/internal/service/machine-service_allocation_test.go +++ b/cmd/metal-api/internal/service/machine-service_allocation_test.go @@ -261,32 +261,24 @@ func createMachineRegisterRequest(i int) v1.MachineRegisterRequest { PartitionID: "p1", Hardware: v1.MachineHardware{ MachineHardwareBase: v1.MachineHardwareBase{Memory: 4, CPUCores: 4}, - Nics: v1.MachineNicsExtended{ + Nics: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: "lan0", - MacAddress: fmt.Sprintf("aa:ba:%d", i), - }, - Neighbors: v1.MachineNicsExtended{ + Name: "lan0", + MacAddress: fmt.Sprintf("aa:ba:%d", i), + Neighbors: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: fmt.Sprintf("swp-%d", i), - MacAddress: fmt.Sprintf("%s:%d", swp1MacPrefix, i), - }, + Name: fmt.Sprintf("swp-%d", i), + MacAddress: fmt.Sprintf("%s:%d", swp1MacPrefix, i), }, }, }, { - MachineNic: v1.MachineNic{ - Name: "lan1", - MacAddress: fmt.Sprintf("aa:bb:%d", i), - }, - Neighbors: v1.MachineNicsExtended{ + Name: "lan1", + MacAddress: fmt.Sprintf("aa:bb:%d", i), + Neighbors: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: fmt.Sprintf("swp-%d", i), - MacAddress: fmt.Sprintf("%s:%d", swp2MacPrefix, i), - }, + Name: fmt.Sprintf("swp-%d", i), + MacAddress: fmt.Sprintf("%s:%d", swp2MacPrefix, i), }, }, }, 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 50cc86480..e3ceb8eb5 100644 --- a/cmd/metal-api/internal/service/machine-service_integration_test.go +++ b/cmd/metal-api/internal/service/machine-service_integration_test.go @@ -34,34 +34,26 @@ func TestMachineAllocationIntegrationFullCycle(t *testing.T) { }, }, }, - Nics: v1.MachineNicsExtended{ + Nics: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: "eth0", - MacAddress: "aa:aa:aa:aa:aa:aa", - }, - Neighbors: v1.MachineNicsExtended{ + Name: "eth0", + MacAddress: "aa:aa:aa:aa:aa:aa", + Neighbors: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: "swp1", - MacAddress: "bb:aa:aa:aa:aa:aa", - }, - Neighbors: v1.MachineNicsExtended{}, + Name: "swp1", + MacAddress: "bb:aa:aa:aa:aa:aa", + Neighbors: v1.MachineNics{}, }, }, }, { - MachineNic: v1.MachineNic{ - Name: "eth1", - MacAddress: "aa:aa:aa:aa:aa:aa", - }, - Neighbors: v1.MachineNicsExtended{ + Name: "eth1", + MacAddress: "aa:aa:aa:aa:aa:aa", + Neighbors: v1.MachineNics{ { - MachineNic: v1.MachineNic{ - Name: "swp1", - MacAddress: "aa:bb:aa:aa:aa:aa", - }, - Neighbors: v1.MachineNicsExtended{}, + Name: "swp1", + MacAddress: "aa:bb:aa:aa:aa:aa", + Neighbors: v1.MachineNics{}, }, }, }, @@ -76,7 +68,7 @@ func TestMachineAllocationIntegrationFullCycle(t *testing.T) { assert.Equal(t, mrr.PartitionID, registeredMachine.Partition.ID) assert.Equal(t, registeredMachine.RackID, "test-rack") assert.Len(t, mrr.Hardware.Nics, 2) - assert.Equal(t, mrr.Hardware.Nics[0].MachineNic.MacAddress, registeredMachine.Hardware.Nics[0].MacAddress) + assert.Equal(t, mrr.Hardware.Nics[0].MacAddress, registeredMachine.Hardware.Nics[0].MacAddress) err := te.machineWait("test-uuid") require.Nil(t, err) diff --git a/cmd/metal-api/internal/service/machine-service_test.go b/cmd/metal-api/internal/service/machine-service_test.go index 2a741b385..327cf3289 100644 --- a/cmd/metal-api/internal/service/machine-service_test.go +++ b/cmd/metal-api/internal/service/machine-service_test.go @@ -205,22 +205,18 @@ func TestRegisterMachine(t *testing.T) { CPUCores: tt.numcores, Memory: uint64(tt.memory), }, - Nics: v1.MachineNicsExtended{ - v1.MachineNicExtended{ - Neighbors: v1.MachineNicsExtended{ - v1.MachineNicExtended{ - MachineNic: v1.MachineNic{ - MacAddress: string(tt.neighbormac1), - }, + Nics: v1.MachineNics{ + v1.MachineNic{ + Neighbors: v1.MachineNics{ + v1.MachineNic{ + MacAddress: string(tt.neighbormac1), }, }, }, - v1.MachineNicExtended{ - Neighbors: v1.MachineNicsExtended{ - v1.MachineNicExtended{ - MachineNic: v1.MachineNic{ - MacAddress: string(tt.neighbormac2), - }, + v1.MachineNic{ + Neighbors: v1.MachineNics{ + v1.MachineNic{ + MacAddress: string(tt.neighbormac2), }, }, }, diff --git a/cmd/metal-api/internal/service/v1/machine.go b/cmd/metal-api/internal/service/v1/machine.go index 32a04b04a..01a075d63 100644 --- a/cmd/metal-api/internal/service/v1/machine.go +++ b/cmd/metal-api/internal/service/v1/machine.go @@ -80,7 +80,7 @@ type MachineHardwareBase struct { type MachineHardware struct { MachineHardwareBase - Nics MachineNicsExtended `json:"nics" description:"the list of network interfaces of this machine"` + Nics MachineNics `json:"nics" description:"the list of network interfaces of this machine"` } type MachineState struct { @@ -120,15 +120,9 @@ type MachineProvisioningEvents map[string]MachineProvisioningEvent type MachineNics []MachineNic type MachineNic struct { - MacAddress string `json:"mac" description:"the mac address of this network interface"` - Name string `json:"name" description:"the name of this network interface"` -} - -type MachineNicsExtended []MachineNicExtended - -type MachineNicExtended struct { - MachineNic - Neighbors MachineNicsExtended `json:"neighbors" description:"the neighbors visible to this network interface"` + MacAddress string `json:"mac" description:"the mac address of this network interface"` + Name string `json:"name" description:"the name of this network interface"` + Neighbors MachineNics `json:"neighbors" description:"the neighbors visible to this network interface"` } type MachineBIOS struct { @@ -382,20 +376,18 @@ func NewMachineIPMIResponse(m *metal.Machine, s *metal.Size, p *metal.Partition, func NewMachineResponse(m *metal.Machine, s *metal.Size, p *metal.Partition, i *metal.Image, ec *metal.ProvisioningEventContainer) *MachineResponse { var hardware MachineHardware - nics := MachineNicsExtended{} + nics := MachineNics{} for i := range m.Hardware.Nics { n := m.Hardware.Nics[i] - neighs := []MachineNicExtended{} + neighs := MachineNics{} for j := range n.Neighbors { neigh := n.Neighbors[j] - neighs = append(neighs, MachineNicExtended{MachineNic: MachineNic{MacAddress: string(neigh.MacAddress), Name: neigh.Name}}) + neighs = append(neighs, MachineNic{MacAddress: string(neigh.MacAddress), Name: neigh.Name}) } - nic := MachineNicExtended{ - MachineNic: MachineNic{ - MacAddress: string(n.MacAddress), - Name: n.Name, - }, - Neighbors: neighs, + nic := MachineNic{ + MacAddress: string(n.MacAddress), + Name: n.Name, + Neighbors: neighs, } nics = append(nics, nic) } diff --git a/spec/metal-api.json b/spec/metal-api.json index 489be1f75..97b8a4d8c 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -2336,7 +2336,7 @@ "nics": { "description": "the list of network interfaces of this machine", "items": { - "$ref": "#/definitions/v1.MachineNicExtended" + "$ref": "#/definitions/v1.MachineNic" }, "type": "array" } @@ -2639,22 +2639,6 @@ ] }, "v1.MachineNic": { - "properties": { - "mac": { - "description": "the mac address of this network interface", - "type": "string" - }, - "name": { - "description": "the name of this network interface", - "type": "string" - } - }, - "required": [ - "mac", - "name" - ] - }, - "v1.MachineNicExtended": { "properties": { "mac": { "description": "the mac address of this network interface", @@ -2667,7 +2651,7 @@ "neighbors": { "description": "the neighbors visible to this network interface", "items": { - "$ref": "#/definitions/v1.MachineNicExtended" + "$ref": "#/definitions/v1.MachineNic" }, "type": "array" } From 439ed12746d8e9736f254b335c6bb24c82122f2b Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 11 May 2022 07:40:16 +0200 Subject: [PATCH 09/42] Set boot order to hdd --- cmd/metal-api/internal/grpc/boot-service.go | 26 +++++++++++++++---- .../internal/service/machine-service.go | 8 +----- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 03780530a..745022b96 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -11,18 +11,21 @@ import ( "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" v1 "github.com/metal-stack/metal-api/pkg/api/v1" + "github.com/metal-stack/metal-lib/bus" "go.uber.org/zap" ) type BootService struct { - log *zap.SugaredLogger - ds Datasource + log *zap.SugaredLogger + ds Datasource + publisher bus.Publisher } func NewBootService(cfg *ServerConfig) *BootService { return &BootService{ - ds: cfg.Datasource, - log: cfg.Logger.Named("boot-service"), + ds: cfg.Datasource, + log: cfg.Logger.Named("boot-service"), + publisher: cfg.Publisher, } } @@ -349,7 +352,20 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque return nil, fmt.Errorf("the machine %q could not be enslaved into the vrf %s, error: %w", req.Uuid, vrf, err) } - // FIXME set boot order to disk + evt := metal.MachineEvent{ + Type: metal.COMMAND, + Cmd: &metal.MachineExecCommand{ + Command: metal.MachineDiskCmd, + Params: nil, + TargetMachineID: m.ID, + }, + } + + b.log.Infow("publish event", "event", evt, "command", *evt.Cmd) + err = b.publisher.Publish(metal.TopicMachine.GetFQN(m.PartitionID), evt) + if err != nil { + b.log.Errorw("unable to send boot via hd, continue anyway", "error", err) + } return &v1.BootServiceReportResponse{}, nil } diff --git a/cmd/metal-api/internal/service/machine-service.go b/cmd/metal-api/internal/service/machine-service.go index 6f72f06b5..880b19725 100644 --- a/cmd/metal-api/internal/service/machine-service.go +++ b/cmd/metal-api/internal/service/machine-service.go @@ -2426,17 +2426,11 @@ func (r machineResource) machineCmd(cmd metal.MachineCommand, request *restful.R } func publishMachineCmd(logger *zap.SugaredLogger, m *metal.Machine, publisher bus.Publisher, cmd metal.MachineCommand, params ...string) error { - pp := []string{} - for _, p := range params { - if len(p) > 0 { - pp = append(pp, p) - } - } evt := metal.MachineEvent{ Type: metal.COMMAND, Cmd: &metal.MachineExecCommand{ Command: cmd, - Params: pp, + Params: params, TargetMachineID: m.ID, }, } From 7cb35eafa79450c2e961efefda0048413e671055 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 11 May 2022 08:00:10 +0200 Subject: [PATCH 10/42] add abortreinstall --- cmd/metal-api/internal/grpc/boot-service.go | 57 ++- pkg/api/v1/boot.pb.go | 460 +++++++++++++++----- pkg/api/v1/boot.proto | 30 +- 3 files changed, 433 insertions(+), 114 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 745022b96..17f99fd8d 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -303,18 +303,23 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque if m.Allocation == nil { return nil, fmt.Errorf("the machine %q is not allocated", req.Uuid) } + if req.BootInfo == nil { + return nil, fmt.Errorf("the machine %q bootinfo is nil", req.Uuid) + } old := *m + bootInfo := req.BootInfo + m.Allocation.ConsolePassword = req.ConsolePassword m.Allocation.MachineSetup = &metal.MachineSetup{ ImageID: m.Allocation.ImageID, - PrimaryDisk: req.PrimaryDisk, - OSPartition: req.OsPartition, - Initrd: req.Initrd, - Cmdline: req.Cmdline, - Kernel: req.Kernel, - BootloaderID: req.BootloaderId, + PrimaryDisk: bootInfo.PrimaryDisk, + OSPartition: bootInfo.OsPartition, + Initrd: bootInfo.Initrd, + Cmdline: bootInfo.Cmdline, + Kernel: bootInfo.Kernel, + BootloaderID: bootInfo.BootloaderId, } m.Allocation.Reinstall = false @@ -369,3 +374,43 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque return &v1.BootServiceReportResponse{}, nil } +func (b *BootService) AbortReinstall(ctx context.Context, req *v1.BootServiceAbortReinstallRequest) (*v1.BootServiceAbortReinstallResponse, error) { + b.log.Infow("abortreinstall", "req", req) + m, err := b.ds.FindMachineByID(req.Uuid) + if err != nil { + return nil, err + } + + var bootInfo *v1.BootInfo + + if m.Allocation != nil && !req.PrimaryDiskWiped { + old := *m + + m.Allocation.Reinstall = false + if m.Allocation.MachineSetup != nil { + m.Allocation.ImageID = m.Allocation.MachineSetup.ImageID + } + + err = b.ds.UpdateMachine(&old, m) + if err != nil { + return nil, err + } + b.log.Infow("removed reinstall mark", "machineID", m.ID) + + if m.Allocation.MachineSetup != nil { + bootInfo = &v1.BootInfo{ + ImageId: m.Allocation.MachineSetup.ImageID, + PrimaryDisk: m.Allocation.MachineSetup.PrimaryDisk, + OsPartition: m.Allocation.MachineSetup.OSPartition, + Initrd: m.Allocation.MachineSetup.Initrd, + Cmdline: m.Allocation.MachineSetup.Cmdline, + Kernel: m.Allocation.MachineSetup.Kernel, + BootloaderId: m.Allocation.MachineSetup.BootloaderID, + } + } + } + + // FIXME what to do in the else case ? + + return &v1.BootServiceAbortReinstallResponse{BootInfo: bootInfo}, nil +} diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 8906d2cef..cf1d25c2d 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -804,16 +804,11 @@ type BootServiceReportRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - ConsolePassword string `protobuf:"bytes,2,opt,name=console_password,json=consolePassword,proto3" json:"console_password,omitempty"` - PrimaryDisk string `protobuf:"bytes,3,opt,name=primary_disk,json=primaryDisk,proto3" json:"primary_disk,omitempty"` - OsPartition string `protobuf:"bytes,4,opt,name=os_partition,json=osPartition,proto3" json:"os_partition,omitempty"` - Initrd string `protobuf:"bytes,5,opt,name=initrd,proto3" json:"initrd,omitempty"` - Cmdline string `protobuf:"bytes,6,opt,name=cmdline,proto3" json:"cmdline,omitempty"` - Kernel string `protobuf:"bytes,7,opt,name=kernel,proto3" json:"kernel,omitempty"` - BootloaderId string `protobuf:"bytes,8,opt,name=bootloader_id,json=bootloaderId,proto3" json:"bootloader_id,omitempty"` - Success bool `protobuf:"varint,9,opt,name=success,proto3" json:"success,omitempty"` - Message string `protobuf:"bytes,10,opt,name=message,proto3" json:"message,omitempty"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + ConsolePassword string `protobuf:"bytes,2,opt,name=console_password,json=consolePassword,proto3" json:"console_password,omitempty"` + BootInfo *BootInfo `protobuf:"bytes,3,opt,name=boot_info,json=bootInfo,proto3" json:"boot_info,omitempty"` + Success bool `protobuf:"varint,4,opt,name=success,proto3" json:"success,omitempty"` + Message string `protobuf:"bytes,5,opt,name=message,proto3" json:"message,omitempty"` } func (x *BootServiceReportRequest) Reset() { @@ -862,85 +857,240 @@ func (x *BootServiceReportRequest) GetConsolePassword() string { return "" } -func (x *BootServiceReportRequest) GetPrimaryDisk() string { +func (x *BootServiceReportRequest) GetBootInfo() *BootInfo { + if x != nil { + return x.BootInfo + } + return nil +} + +func (x *BootServiceReportRequest) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *BootServiceReportRequest) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +type BootServiceReportResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BootServiceReportResponse) Reset() { + *x = BootServiceReportResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceReportResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceReportResponse) ProtoMessage() {} + +func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceReportResponse.ProtoReflect.Descriptor instead. +func (*BootServiceReportResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{11} +} + +type BootInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ImageId string `protobuf:"bytes,1,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"` + PrimaryDisk string `protobuf:"bytes,2,opt,name=primary_disk,json=primaryDisk,proto3" json:"primary_disk,omitempty"` + OsPartition string `protobuf:"bytes,3,opt,name=os_partition,json=osPartition,proto3" json:"os_partition,omitempty"` + Initrd string `protobuf:"bytes,4,opt,name=initrd,proto3" json:"initrd,omitempty"` + Cmdline string `protobuf:"bytes,5,opt,name=cmdline,proto3" json:"cmdline,omitempty"` + Kernel string `protobuf:"bytes,6,opt,name=kernel,proto3" json:"kernel,omitempty"` + BootloaderId string `protobuf:"bytes,8,opt,name=bootloader_id,json=bootloaderId,proto3" json:"bootloader_id,omitempty"` +} + +func (x *BootInfo) Reset() { + *x = BootInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootInfo) ProtoMessage() {} + +func (x *BootInfo) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootInfo.ProtoReflect.Descriptor instead. +func (*BootInfo) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{12} +} + +func (x *BootInfo) GetImageId() string { + if x != nil { + return x.ImageId + } + return "" +} + +func (x *BootInfo) GetPrimaryDisk() string { if x != nil { return x.PrimaryDisk } return "" } -func (x *BootServiceReportRequest) GetOsPartition() string { +func (x *BootInfo) GetOsPartition() string { if x != nil { return x.OsPartition } return "" } -func (x *BootServiceReportRequest) GetInitrd() string { +func (x *BootInfo) GetInitrd() string { if x != nil { return x.Initrd } return "" } -func (x *BootServiceReportRequest) GetCmdline() string { +func (x *BootInfo) GetCmdline() string { if x != nil { return x.Cmdline } return "" } -func (x *BootServiceReportRequest) GetKernel() string { +func (x *BootInfo) GetKernel() string { if x != nil { return x.Kernel } return "" } -func (x *BootServiceReportRequest) GetBootloaderId() string { +func (x *BootInfo) GetBootloaderId() string { if x != nil { return x.BootloaderId } return "" } -func (x *BootServiceReportRequest) GetSuccess() bool { - if x != nil { - return x.Success +type BootServiceAbortReinstallRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + PrimaryDiskWiped bool `protobuf:"varint,2,opt,name=primary_disk_wiped,json=primaryDiskWiped,proto3" json:"primary_disk_wiped,omitempty"` +} + +func (x *BootServiceAbortReinstallRequest) Reset() { + *x = BootServiceAbortReinstallRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) } - return false } -func (x *BootServiceReportRequest) GetMessage() string { +func (x *BootServiceAbortReinstallRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceAbortReinstallRequest) ProtoMessage() {} + +func (x *BootServiceAbortReinstallRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceAbortReinstallRequest.ProtoReflect.Descriptor instead. +func (*BootServiceAbortReinstallRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{13} +} + +func (x *BootServiceAbortReinstallRequest) GetUuid() string { if x != nil { - return x.Message + return x.Uuid } return "" } -type BootServiceReportResponse struct { +func (x *BootServiceAbortReinstallRequest) GetPrimaryDiskWiped() bool { + if x != nil { + return x.PrimaryDiskWiped + } + return false +} + +type BootServiceAbortReinstallResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + BootInfo *BootInfo `protobuf:"bytes,1,opt,name=boot_info,json=bootInfo,proto3" json:"boot_info,omitempty"` } -func (x *BootServiceReportResponse) Reset() { - *x = BootServiceReportResponse{} +func (x *BootServiceAbortReinstallResponse) Reset() { + *x = BootServiceAbortReinstallResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[11] + mi := &file_api_v1_boot_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BootServiceReportResponse) String() string { +func (x *BootServiceAbortReinstallResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BootServiceReportResponse) ProtoMessage() {} +func (*BootServiceAbortReinstallResponse) ProtoMessage() {} -func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[11] +func (x *BootServiceAbortReinstallResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -951,9 +1101,16 @@ func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BootServiceReportResponse.ProtoReflect.Descriptor instead. -func (*BootServiceReportResponse) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{11} +// Deprecated: Use BootServiceAbortReinstallResponse.ProtoReflect.Descriptor instead. +func (*BootServiceAbortReinstallResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{14} +} + +func (x *BootServiceAbortReinstallResponse) GetBootInfo() *BootInfo { + if x != nil { + return x.BootInfo + } + return nil } var File_api_v1_boot_proto protoreflect.FileDescriptor @@ -1074,53 +1231,77 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0xc2, 0x02, 0x0a, 0x18, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, + 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, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x5f, 0x64, 0x69, 0x73, - 0x6b, 0x18, 0x03, 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, 0x04, 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, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x6e, 0x69, 0x74, 0x72, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, - 0x6e, 0x65, 0x6c, 0x18, 0x07, 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, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x18, 0x09, 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, 0x0a, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, - 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, - 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, - 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, - 0x32, 0x80, 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 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, 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, 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, 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, + 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, 0x00, 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, + 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, + 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, + 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x02, 0x32, 0xe9, 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 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, 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, 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, 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, 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, 0x0a, 0x5a, + 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1136,21 +1317,24 @@ func file_api_v1_boot_proto_rawDescGZIP() []byte { } var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_api_v1_boot_proto_goTypes = []interface{}{ - (RegisterState)(0), // 0: api.v1.RegisterState - (*BootServiceBootRequest)(nil), // 1: api.v1.BootServiceBootRequest - (*BootServiceBootResponse)(nil), // 2: api.v1.BootServiceBootResponse - (*BootServiceRegisterRequest)(nil), // 3: api.v1.BootServiceRegisterRequest - (*BootServiceRegisterResponse)(nil), // 4: api.v1.BootServiceRegisterResponse - (*MachineHardware)(nil), // 5: api.v1.MachineHardware - (*MachineNic)(nil), // 6: api.v1.MachineNic - (*MachineBlockDevice)(nil), // 7: api.v1.MachineBlockDevice - (*MachineBIOS)(nil), // 8: api.v1.MachineBIOS - (*MachineIPMI)(nil), // 9: api.v1.MachineIPMI - (*MachineFRU)(nil), // 10: api.v1.MachineFRU - (*BootServiceReportRequest)(nil), // 11: api.v1.BootServiceReportRequest - (*BootServiceReportResponse)(nil), // 12: api.v1.BootServiceReportResponse + (RegisterState)(0), // 0: api.v1.RegisterState + (*BootServiceBootRequest)(nil), // 1: api.v1.BootServiceBootRequest + (*BootServiceBootResponse)(nil), // 2: api.v1.BootServiceBootResponse + (*BootServiceRegisterRequest)(nil), // 3: api.v1.BootServiceRegisterRequest + (*BootServiceRegisterResponse)(nil), // 4: api.v1.BootServiceRegisterResponse + (*MachineHardware)(nil), // 5: api.v1.MachineHardware + (*MachineNic)(nil), // 6: api.v1.MachineNic + (*MachineBlockDevice)(nil), // 7: api.v1.MachineBlockDevice + (*MachineBIOS)(nil), // 8: api.v1.MachineBIOS + (*MachineIPMI)(nil), // 9: api.v1.MachineIPMI + (*MachineFRU)(nil), // 10: api.v1.MachineFRU + (*BootServiceReportRequest)(nil), // 11: api.v1.BootServiceReportRequest + (*BootServiceReportResponse)(nil), // 12: api.v1.BootServiceReportResponse + (*BootInfo)(nil), // 13: api.v1.BootInfo + (*BootServiceAbortReinstallRequest)(nil), // 14: api.v1.BootServiceAbortReinstallRequest + (*BootServiceAbortReinstallResponse)(nil), // 15: api.v1.BootServiceAbortReinstallResponse } var file_api_v1_boot_proto_depIdxs = []int32{ 5, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware @@ -1161,17 +1345,21 @@ var file_api_v1_boot_proto_depIdxs = []int32{ 6, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic 6, // 6: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic 10, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU - 1, // 8: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest - 3, // 9: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest - 11, // 10: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest - 2, // 11: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse - 4, // 12: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse - 12, // 13: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse - 11, // [11:14] is the sub-list for method output_type - 8, // [8:11] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 13, // 8: api.v1.BootServiceReportRequest.boot_info:type_name -> api.v1.BootInfo + 13, // 9: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo + 1, // 10: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest + 3, // 11: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest + 11, // 12: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest + 14, // 13: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest + 2, // 14: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse + 4, // 15: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse + 12, // 16: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse + 15, // 17: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse + 14, // [14:18] is the sub-list for method output_type + 10, // [10:14] is the sub-list for method input_type + 10, // [10:10] is the sub-list for extension type_name + 10, // [10:10] is the sub-list for extension extendee + 0, // [0:10] is the sub-list for field type_name } func init() { file_api_v1_boot_proto_init() } @@ -1324,6 +1512,42 @@ func file_api_v1_boot_proto_init() { return nil } } + file_api_v1_boot_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceAbortReinstallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceAbortReinstallResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_api_v1_boot_proto_msgTypes[1].OneofWrappers = []interface{}{} file_api_v1_boot_proto_msgTypes[9].OneofWrappers = []interface{}{} @@ -1333,7 +1557,7 @@ func file_api_v1_boot_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_boot_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, @@ -1363,6 +1587,7 @@ type BootServiceClient interface { Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) + AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) } type bootServiceClient struct { @@ -1400,11 +1625,21 @@ func (c *bootServiceClient) Report(ctx context.Context, in *BootServiceReportReq return out, nil } +func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) { + out := new(BootServiceAbortReinstallResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/AbortReinstall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // BootServiceServer is the server API for BootService service. type BootServiceServer interface { Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) + AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) } // UnimplementedBootServiceServer can be embedded to have forward compatible implementations. @@ -1420,6 +1655,9 @@ func (*UnimplementedBootServiceServer) Register(context.Context, *BootServiceReg func (*UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") } +func (*UnimplementedBootServiceServer) AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AbortReinstall not implemented") +} func RegisterBootServiceServer(s *grpc.Server, srv BootServiceServer) { s.RegisterService(&_BootService_serviceDesc, srv) @@ -1479,6 +1717,24 @@ func _BootService_Report_Handler(srv interface{}, ctx context.Context, dec func( return interceptor(ctx, in, info, handler) } +func _BootService_AbortReinstall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceAbortReinstallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).AbortReinstall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/AbortReinstall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).AbortReinstall(ctx, req.(*BootServiceAbortReinstallRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _BootService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.BootService", HandlerType: (*BootServiceServer)(nil), @@ -1495,6 +1751,10 @@ var _BootService_serviceDesc = grpc.ServiceDesc{ MethodName: "Report", Handler: _BootService_Report_Handler, }, + { + MethodName: "AbortReinstall", + Handler: _BootService_AbortReinstall_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/boot.proto", diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index f6deb97f5..ba2a54166 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -8,6 +8,7 @@ service BootService { rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} rpc Register(BootServiceRegisterRequest)returns (BootServiceRegisterResponse) {} rpc Report(BootServiceReportRequest)returns (BootServiceReportResponse) {} + rpc AbortReinstall(BootServiceAbortReinstallRequest) returns (BootServiceAbortReinstallResponse) {} } message BootServiceBootRequest { @@ -85,20 +86,33 @@ message MachineFRU { message BootServiceReportRequest { string uuid = 1; string console_password = 2; - string primary_disk = 3; - string os_partition = 4; - string initrd = 5; - string cmdline = 6; - string kernel = 7; - string bootloader_id = 8; - bool success = 9; - string message = 10; + BootInfo boot_info = 3; + bool success = 4; + string message = 5; } message BootServiceReportResponse { } +message BootInfo { + string image_id = 1; + string primary_disk = 2; + string os_partition = 3; + string initrd = 4; + string cmdline = 5; + string kernel = 6; + string bootloader_id = 8; +} + enum RegisterState { REGISTER_STATE_UNSPECIFIED = 0; REGISTER_STATE_CREATED = 1; REGISTER_STATE_UPDATED = 2; +} + +message BootServiceAbortReinstallRequest { + string uuid = 1; + bool primary_disk_wiped = 2; +} +message BootServiceAbortReinstallResponse { + BootInfo boot_info = 1; } \ No newline at end of file From 1730c3b7f1027b1b71204fe544a626078239b541 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Thu, 12 May 2022 10:30:20 +0200 Subject: [PATCH 11/42] add dhcp endpoint --- cmd/metal-api/internal/grpc/boot-service.go | 65 +- cmd/metal-api/internal/grpc/grpc-server.go | 2 +- pkg/api/v1/boot.pb.go | 722 ++++++++++++-------- pkg/api/v1/boot.proto | 10 + pkg/api/v1/event.pb.go | 2 +- pkg/api/v1/supwd.pb.go | 2 +- pkg/api/v1/wait.pb.go | 2 +- 7 files changed, 498 insertions(+), 307 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 17f99fd8d..82f66876a 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -16,18 +16,34 @@ import ( ) type BootService struct { - log *zap.SugaredLogger - ds Datasource - publisher bus.Publisher + log *zap.SugaredLogger + ds Datasource + publisher bus.Publisher + eventService *EventService } -func NewBootService(cfg *ServerConfig) *BootService { +func NewBootService(cfg *ServerConfig, eventService *EventService) *BootService { return &BootService{ - ds: cfg.Datasource, - log: cfg.Logger.Named("boot-service"), - publisher: cfg.Publisher, + ds: cfg.Datasource, + log: cfg.Logger.Named("boot-service"), + publisher: cfg.Publisher, + eventService: eventService, } } +func (b *BootService) Dhcp(ctx context.Context, req *v1.BootServiceDhcpRequest) (*v1.BootServiceDhcpResponse, error) { + b.log.Infow("dhcp", "req", req) + + _, err := b.eventService.Send(ctx, &v1.EventServiceSendRequest{Events: map[string]*v1.MachineProvisioningEvent{ + req.Mac: { + Event: string(metal.ProvisioningEventPXEBooting), + Message: "machine sent extended dhcp request", + }, + }}) + if err != nil { + return nil, err + } + return &v1.BootServiceDhcpResponse{}, nil +} func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) (*v1.BootServiceBootResponse, error) { b.log.Infow("boot", "req", req) @@ -357,21 +373,7 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque return nil, fmt.Errorf("the machine %q could not be enslaved into the vrf %s, error: %w", req.Uuid, vrf, err) } - evt := metal.MachineEvent{ - Type: metal.COMMAND, - Cmd: &metal.MachineExecCommand{ - Command: metal.MachineDiskCmd, - Params: nil, - TargetMachineID: m.ID, - }, - } - - b.log.Infow("publish event", "event", evt, "command", *evt.Cmd) - err = b.publisher.Publish(metal.TopicMachine.GetFQN(m.PartitionID), evt) - if err != nil { - b.log.Errorw("unable to send boot via hd, continue anyway", "error", err) - } - + b.setBootOrderDisk(m.ID, m.PartitionID) return &v1.BootServiceReportResponse{}, nil } func (b *BootService) AbortReinstall(ctx context.Context, req *v1.BootServiceAbortReinstallRequest) (*v1.BootServiceAbortReinstallResponse, error) { @@ -409,8 +411,25 @@ func (b *BootService) AbortReinstall(ctx context.Context, req *v1.BootServiceAbo } } } - + b.setBootOrderDisk(m.ID, m.PartitionID) // FIXME what to do in the else case ? return &v1.BootServiceAbortReinstallResponse{BootInfo: bootInfo}, nil } + +func (b *BootService) setBootOrderDisk(machineID, partitionID string) { + evt := metal.MachineEvent{ + Type: metal.COMMAND, + Cmd: &metal.MachineExecCommand{ + Command: metal.MachineDiskCmd, + Params: nil, + TargetMachineID: machineID, + }, + } + + b.log.Infow("publish event", "event", evt, "command", *evt.Cmd) + err := b.publisher.Publish(metal.TopicMachine.GetFQN(partitionID), evt) + if err != nil { + b.log.Errorw("unable to send boot via hd, continue anyway", "error", err) + } +} diff --git a/cmd/metal-api/internal/grpc/grpc-server.go b/cmd/metal-api/internal/grpc/grpc-server.go index 2ef000bbc..682f51545 100644 --- a/cmd/metal-api/internal/grpc/grpc-server.go +++ b/cmd/metal-api/internal/grpc/grpc-server.go @@ -90,7 +90,7 @@ func NewServer(cfg *ServerConfig) (*Server, error) { eventService := NewEventService(cfg) - bootService := NewBootService(cfg) + bootService := NewBootService(cfg, eventService) s := &Server{ WaitService: waitService, diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index cf1d25c2d..c6407d990 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.20.0 +// protoc v3.20.1 // source: api/v1/boot.proto package v1 @@ -73,6 +73,91 @@ func (RegisterState) EnumDescriptor() ([]byte, []int) { return file_api_v1_boot_proto_rawDescGZIP(), []int{0} } +type BootServiceDhcpRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` +} + +func (x *BootServiceDhcpRequest) Reset() { + *x = BootServiceDhcpRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceDhcpRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceDhcpRequest) ProtoMessage() {} + +func (x *BootServiceDhcpRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceDhcpRequest.ProtoReflect.Descriptor instead. +func (*BootServiceDhcpRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{0} +} + +func (x *BootServiceDhcpRequest) GetMac() string { + if x != nil { + return x.Mac + } + return "" +} + +type BootServiceDhcpResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *BootServiceDhcpResponse) Reset() { + *x = BootServiceDhcpResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *BootServiceDhcpResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BootServiceDhcpResponse) ProtoMessage() {} + +func (x *BootServiceDhcpResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BootServiceDhcpResponse.ProtoReflect.Descriptor instead. +func (*BootServiceDhcpResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{1} +} + type BootServiceBootRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -85,7 +170,7 @@ type BootServiceBootRequest struct { func (x *BootServiceBootRequest) Reset() { *x = BootServiceBootRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[0] + mi := &file_api_v1_boot_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -98,7 +183,7 @@ func (x *BootServiceBootRequest) String() string { func (*BootServiceBootRequest) ProtoMessage() {} func (x *BootServiceBootRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[0] + mi := &file_api_v1_boot_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -111,7 +196,7 @@ func (x *BootServiceBootRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceBootRequest.ProtoReflect.Descriptor instead. func (*BootServiceBootRequest) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{0} + return file_api_v1_boot_proto_rawDescGZIP(), []int{2} } func (x *BootServiceBootRequest) GetMac() string { @@ -141,7 +226,7 @@ type BootServiceBootResponse struct { func (x *BootServiceBootResponse) Reset() { *x = BootServiceBootResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[1] + mi := &file_api_v1_boot_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -154,7 +239,7 @@ func (x *BootServiceBootResponse) String() string { func (*BootServiceBootResponse) ProtoMessage() {} func (x *BootServiceBootResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[1] + mi := &file_api_v1_boot_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -167,7 +252,7 @@ func (x *BootServiceBootResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceBootResponse.ProtoReflect.Descriptor instead. func (*BootServiceBootResponse) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{1} + return file_api_v1_boot_proto_rawDescGZIP(), []int{3} } func (x *BootServiceBootResponse) GetKernel() string { @@ -206,7 +291,7 @@ type BootServiceRegisterRequest struct { func (x *BootServiceRegisterRequest) Reset() { *x = BootServiceRegisterRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[2] + mi := &file_api_v1_boot_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -219,7 +304,7 @@ func (x *BootServiceRegisterRequest) String() string { func (*BootServiceRegisterRequest) ProtoMessage() {} func (x *BootServiceRegisterRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[2] + mi := &file_api_v1_boot_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -232,7 +317,7 @@ func (x *BootServiceRegisterRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceRegisterRequest.ProtoReflect.Descriptor instead. func (*BootServiceRegisterRequest) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{2} + return file_api_v1_boot_proto_rawDescGZIP(), []int{4} } func (x *BootServiceRegisterRequest) GetUuid() string { @@ -284,7 +369,7 @@ type BootServiceRegisterResponse struct { func (x *BootServiceRegisterResponse) Reset() { *x = BootServiceRegisterResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[3] + mi := &file_api_v1_boot_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -297,7 +382,7 @@ func (x *BootServiceRegisterResponse) String() string { func (*BootServiceRegisterResponse) ProtoMessage() {} func (x *BootServiceRegisterResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[3] + mi := &file_api_v1_boot_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -310,7 +395,7 @@ func (x *BootServiceRegisterResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceRegisterResponse.ProtoReflect.Descriptor instead. func (*BootServiceRegisterResponse) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{3} + return file_api_v1_boot_proto_rawDescGZIP(), []int{5} } func (x *BootServiceRegisterResponse) GetUuid() string { @@ -355,7 +440,7 @@ type MachineHardware struct { func (x *MachineHardware) Reset() { *x = MachineHardware{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[4] + mi := &file_api_v1_boot_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -368,7 +453,7 @@ func (x *MachineHardware) String() string { func (*MachineHardware) ProtoMessage() {} func (x *MachineHardware) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[4] + mi := &file_api_v1_boot_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -381,7 +466,7 @@ func (x *MachineHardware) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineHardware.ProtoReflect.Descriptor instead. func (*MachineHardware) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{4} + return file_api_v1_boot_proto_rawDescGZIP(), []int{6} } func (x *MachineHardware) GetMemory() uint64 { @@ -425,7 +510,7 @@ type MachineNic struct { func (x *MachineNic) Reset() { *x = MachineNic{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[5] + mi := &file_api_v1_boot_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -438,7 +523,7 @@ func (x *MachineNic) String() string { func (*MachineNic) ProtoMessage() {} func (x *MachineNic) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[5] + mi := &file_api_v1_boot_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -451,7 +536,7 @@ func (x *MachineNic) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineNic.ProtoReflect.Descriptor instead. func (*MachineNic) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{5} + return file_api_v1_boot_proto_rawDescGZIP(), []int{7} } func (x *MachineNic) GetMac() string { @@ -487,7 +572,7 @@ type MachineBlockDevice struct { func (x *MachineBlockDevice) Reset() { *x = MachineBlockDevice{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[6] + mi := &file_api_v1_boot_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -500,7 +585,7 @@ func (x *MachineBlockDevice) String() string { func (*MachineBlockDevice) ProtoMessage() {} func (x *MachineBlockDevice) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[6] + mi := &file_api_v1_boot_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -513,7 +598,7 @@ func (x *MachineBlockDevice) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineBlockDevice.ProtoReflect.Descriptor instead. func (*MachineBlockDevice) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{6} + return file_api_v1_boot_proto_rawDescGZIP(), []int{8} } func (x *MachineBlockDevice) GetName() string { @@ -543,7 +628,7 @@ type MachineBIOS struct { func (x *MachineBIOS) Reset() { *x = MachineBIOS{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[7] + mi := &file_api_v1_boot_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -556,7 +641,7 @@ func (x *MachineBIOS) String() string { func (*MachineBIOS) ProtoMessage() {} func (x *MachineBIOS) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[7] + mi := &file_api_v1_boot_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -569,7 +654,7 @@ func (x *MachineBIOS) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineBIOS.ProtoReflect.Descriptor instead. func (*MachineBIOS) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{7} + return file_api_v1_boot_proto_rawDescGZIP(), []int{9} } func (x *MachineBIOS) GetVersion() string { @@ -611,7 +696,7 @@ type MachineIPMI struct { func (x *MachineIPMI) Reset() { *x = MachineIPMI{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[8] + mi := &file_api_v1_boot_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -624,7 +709,7 @@ func (x *MachineIPMI) String() string { func (*MachineIPMI) ProtoMessage() {} func (x *MachineIPMI) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[8] + mi := &file_api_v1_boot_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -637,7 +722,7 @@ func (x *MachineIPMI) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineIPMI.ProtoReflect.Descriptor instead. func (*MachineIPMI) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{8} + return file_api_v1_boot_proto_rawDescGZIP(), []int{10} } func (x *MachineIPMI) GetAddress() string { @@ -714,7 +799,7 @@ type MachineFRU struct { func (x *MachineFRU) Reset() { *x = MachineFRU{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[9] + mi := &file_api_v1_boot_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -727,7 +812,7 @@ func (x *MachineFRU) String() string { func (*MachineFRU) ProtoMessage() {} func (x *MachineFRU) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[9] + mi := &file_api_v1_boot_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -740,7 +825,7 @@ func (x *MachineFRU) ProtoReflect() protoreflect.Message { // Deprecated: Use MachineFRU.ProtoReflect.Descriptor instead. func (*MachineFRU) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{9} + return file_api_v1_boot_proto_rawDescGZIP(), []int{11} } func (x *MachineFRU) GetChassisPartNumber() string { @@ -814,7 +899,7 @@ type BootServiceReportRequest struct { func (x *BootServiceReportRequest) Reset() { *x = BootServiceReportRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[10] + mi := &file_api_v1_boot_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -827,7 +912,7 @@ func (x *BootServiceReportRequest) String() string { func (*BootServiceReportRequest) ProtoMessage() {} func (x *BootServiceReportRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[10] + mi := &file_api_v1_boot_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -840,7 +925,7 @@ func (x *BootServiceReportRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceReportRequest.ProtoReflect.Descriptor instead. func (*BootServiceReportRequest) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{10} + return file_api_v1_boot_proto_rawDescGZIP(), []int{12} } func (x *BootServiceReportRequest) GetUuid() string { @@ -887,7 +972,7 @@ type BootServiceReportResponse struct { func (x *BootServiceReportResponse) Reset() { *x = BootServiceReportResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[11] + mi := &file_api_v1_boot_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -900,7 +985,7 @@ func (x *BootServiceReportResponse) String() string { func (*BootServiceReportResponse) ProtoMessage() {} func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[11] + mi := &file_api_v1_boot_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -913,7 +998,7 @@ func (x *BootServiceReportResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceReportResponse.ProtoReflect.Descriptor instead. func (*BootServiceReportResponse) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{11} + return file_api_v1_boot_proto_rawDescGZIP(), []int{13} } type BootInfo struct { @@ -933,7 +1018,7 @@ type BootInfo struct { func (x *BootInfo) Reset() { *x = BootInfo{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[12] + mi := &file_api_v1_boot_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -946,7 +1031,7 @@ func (x *BootInfo) String() string { func (*BootInfo) ProtoMessage() {} func (x *BootInfo) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[12] + mi := &file_api_v1_boot_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -959,7 +1044,7 @@ func (x *BootInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use BootInfo.ProtoReflect.Descriptor instead. func (*BootInfo) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{12} + return file_api_v1_boot_proto_rawDescGZIP(), []int{14} } func (x *BootInfo) GetImageId() string { @@ -1023,7 +1108,7 @@ type BootServiceAbortReinstallRequest struct { func (x *BootServiceAbortReinstallRequest) Reset() { *x = BootServiceAbortReinstallRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[13] + mi := &file_api_v1_boot_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1036,7 +1121,7 @@ func (x *BootServiceAbortReinstallRequest) String() string { func (*BootServiceAbortReinstallRequest) ProtoMessage() {} func (x *BootServiceAbortReinstallRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[13] + mi := &file_api_v1_boot_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1049,7 +1134,7 @@ func (x *BootServiceAbortReinstallRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BootServiceAbortReinstallRequest.ProtoReflect.Descriptor instead. func (*BootServiceAbortReinstallRequest) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{13} + return file_api_v1_boot_proto_rawDescGZIP(), []int{15} } func (x *BootServiceAbortReinstallRequest) GetUuid() string { @@ -1077,7 +1162,7 @@ type BootServiceAbortReinstallResponse struct { func (x *BootServiceAbortReinstallResponse) Reset() { *x = BootServiceAbortReinstallResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_v1_boot_proto_msgTypes[14] + mi := &file_api_v1_boot_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1090,7 +1175,7 @@ func (x *BootServiceAbortReinstallResponse) String() string { func (*BootServiceAbortReinstallResponse) ProtoMessage() {} func (x *BootServiceAbortReinstallResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_boot_proto_msgTypes[14] + mi := &file_api_v1_boot_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1103,7 +1188,7 @@ func (x *BootServiceAbortReinstallResponse) ProtoReflect() protoreflect.Message // Deprecated: Use BootServiceAbortReinstallResponse.ProtoReflect.Descriptor instead. func (*BootServiceAbortReinstallResponse) Descriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{14} + return file_api_v1_boot_proto_rawDescGZIP(), []int{16} } func (x *BootServiceAbortReinstallResponse) GetBootInfo() *BootInfo { @@ -1117,191 +1202,200 @@ var File_api_v1_boot_proto protoreflect.FileDescriptor var file_api_v1_boot_proto_rawDesc = []byte{ 0x0a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x4d, 0x0a, 0x16, 0x42, - 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x2a, 0x0a, 0x16, 0x42, + 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, - 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x17, 0x42, - 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x24, - 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x72, 0x61, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, - 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, - 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, - 0xcb, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, - 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, - 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, - 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x52, 0x08, 0x68, - 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, 0x49, 0x4f, 0x53, 0x52, 0x04, 0x62, 0x69, 0x6f, 0x73, - 0x12, 0x27, 0x0a, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, - 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, - 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, - 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, - 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa0, 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, 0x22, 0x64, 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, + 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x22, 0x19, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x16, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x22, 0x82, 0x01, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, + 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x72, 0x61, + 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x69, + 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, + 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, + 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, + 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, 0x72, 0x64, + 0x77, 0x61, 0x72, 0x65, 0x52, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x27, + 0x0a, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, 0x49, 0x4f, + 0x53, 0x52, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, 0x6d, 0x69, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, + 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, + 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa0, 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, + 0x22, 0x64, 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, 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, 0x4e, 0x69, 0x63, 0x52, 0x09, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 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, + 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, 0x2a, + 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, + 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, + 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xb4, 0x03, 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, 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, + 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, 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, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, - 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, - 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, - 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, - 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, - 0x02, 0x32, 0xe9, 0x02, 0x0a, 0x0b, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 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, 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, 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, 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, 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, 0x0a, 0x5a, - 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 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, + 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -1317,46 +1411,50 @@ func file_api_v1_boot_proto_rawDescGZIP() []byte { } var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 15) +var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_api_v1_boot_proto_goTypes = []interface{}{ (RegisterState)(0), // 0: api.v1.RegisterState - (*BootServiceBootRequest)(nil), // 1: api.v1.BootServiceBootRequest - (*BootServiceBootResponse)(nil), // 2: api.v1.BootServiceBootResponse - (*BootServiceRegisterRequest)(nil), // 3: api.v1.BootServiceRegisterRequest - (*BootServiceRegisterResponse)(nil), // 4: api.v1.BootServiceRegisterResponse - (*MachineHardware)(nil), // 5: api.v1.MachineHardware - (*MachineNic)(nil), // 6: api.v1.MachineNic - (*MachineBlockDevice)(nil), // 7: api.v1.MachineBlockDevice - (*MachineBIOS)(nil), // 8: api.v1.MachineBIOS - (*MachineIPMI)(nil), // 9: api.v1.MachineIPMI - (*MachineFRU)(nil), // 10: api.v1.MachineFRU - (*BootServiceReportRequest)(nil), // 11: api.v1.BootServiceReportRequest - (*BootServiceReportResponse)(nil), // 12: api.v1.BootServiceReportResponse - (*BootInfo)(nil), // 13: api.v1.BootInfo - (*BootServiceAbortReinstallRequest)(nil), // 14: api.v1.BootServiceAbortReinstallRequest - (*BootServiceAbortReinstallResponse)(nil), // 15: api.v1.BootServiceAbortReinstallResponse + (*BootServiceDhcpRequest)(nil), // 1: api.v1.BootServiceDhcpRequest + (*BootServiceDhcpResponse)(nil), // 2: api.v1.BootServiceDhcpResponse + (*BootServiceBootRequest)(nil), // 3: api.v1.BootServiceBootRequest + (*BootServiceBootResponse)(nil), // 4: api.v1.BootServiceBootResponse + (*BootServiceRegisterRequest)(nil), // 5: api.v1.BootServiceRegisterRequest + (*BootServiceRegisterResponse)(nil), // 6: api.v1.BootServiceRegisterResponse + (*MachineHardware)(nil), // 7: api.v1.MachineHardware + (*MachineNic)(nil), // 8: api.v1.MachineNic + (*MachineBlockDevice)(nil), // 9: api.v1.MachineBlockDevice + (*MachineBIOS)(nil), // 10: api.v1.MachineBIOS + (*MachineIPMI)(nil), // 11: api.v1.MachineIPMI + (*MachineFRU)(nil), // 12: api.v1.MachineFRU + (*BootServiceReportRequest)(nil), // 13: api.v1.BootServiceReportRequest + (*BootServiceReportResponse)(nil), // 14: api.v1.BootServiceReportResponse + (*BootInfo)(nil), // 15: api.v1.BootInfo + (*BootServiceAbortReinstallRequest)(nil), // 16: api.v1.BootServiceAbortReinstallRequest + (*BootServiceAbortReinstallResponse)(nil), // 17: api.v1.BootServiceAbortReinstallResponse } var file_api_v1_boot_proto_depIdxs = []int32{ - 5, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware - 8, // 1: api.v1.BootServiceRegisterRequest.bios:type_name -> api.v1.MachineBIOS - 9, // 2: api.v1.BootServiceRegisterRequest.ipmi:type_name -> api.v1.MachineIPMI + 7, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware + 10, // 1: api.v1.BootServiceRegisterRequest.bios:type_name -> api.v1.MachineBIOS + 11, // 2: api.v1.BootServiceRegisterRequest.ipmi:type_name -> api.v1.MachineIPMI 0, // 3: api.v1.BootServiceRegisterResponse.register_state:type_name -> api.v1.RegisterState - 7, // 4: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice - 6, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic - 6, // 6: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic - 10, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU - 13, // 8: api.v1.BootServiceReportRequest.boot_info:type_name -> api.v1.BootInfo - 13, // 9: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo - 1, // 10: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest - 3, // 11: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest - 11, // 12: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest - 14, // 13: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest - 2, // 14: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse - 4, // 15: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse - 12, // 16: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse - 15, // 17: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse - 14, // [14:18] is the sub-list for method output_type - 10, // [10:14] is the sub-list for method input_type + 9, // 4: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice + 8, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic + 8, // 6: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic + 12, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU + 15, // 8: api.v1.BootServiceReportRequest.boot_info:type_name -> api.v1.BootInfo + 15, // 9: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo + 1, // 10: api.v1.BootService.Dhcp:input_type -> api.v1.BootServiceDhcpRequest + 3, // 11: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest + 5, // 12: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest + 13, // 13: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest + 16, // 14: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest + 2, // 15: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse + 4, // 16: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse + 6, // 17: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse + 14, // 18: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse + 17, // 19: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse + 15, // [15:20] is the sub-list for method output_type + 10, // [10:15] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name @@ -1369,7 +1467,7 @@ func file_api_v1_boot_proto_init() { } if !protoimpl.UnsafeEnabled { file_api_v1_boot_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceBootRequest); i { + switch v := v.(*BootServiceDhcpRequest); i { case 0: return &v.state case 1: @@ -1381,7 +1479,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceBootResponse); i { + switch v := v.(*BootServiceDhcpResponse); i { case 0: return &v.state case 1: @@ -1393,7 +1491,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceRegisterRequest); i { + switch v := v.(*BootServiceBootRequest); i { case 0: return &v.state case 1: @@ -1405,7 +1503,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceRegisterResponse); i { + switch v := v.(*BootServiceBootResponse); i { case 0: return &v.state case 1: @@ -1417,7 +1515,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineHardware); i { + switch v := v.(*BootServiceRegisterRequest); i { case 0: return &v.state case 1: @@ -1429,7 +1527,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineNic); i { + switch v := v.(*BootServiceRegisterResponse); i { case 0: return &v.state case 1: @@ -1441,7 +1539,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineBlockDevice); i { + switch v := v.(*MachineHardware); i { case 0: return &v.state case 1: @@ -1453,7 +1551,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineBIOS); i { + switch v := v.(*MachineNic); i { case 0: return &v.state case 1: @@ -1465,7 +1563,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineIPMI); i { + switch v := v.(*MachineBlockDevice); i { case 0: return &v.state case 1: @@ -1477,7 +1575,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MachineFRU); i { + switch v := v.(*MachineBIOS); i { case 0: return &v.state case 1: @@ -1489,7 +1587,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceReportRequest); i { + switch v := v.(*MachineIPMI); i { case 0: return &v.state case 1: @@ -1501,7 +1599,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceReportResponse); i { + switch v := v.(*MachineFRU); i { case 0: return &v.state case 1: @@ -1513,7 +1611,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootInfo); i { + switch v := v.(*BootServiceReportRequest); i { case 0: return &v.state case 1: @@ -1525,7 +1623,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BootServiceAbortReinstallRequest); i { + switch v := v.(*BootServiceReportResponse); i { case 0: return &v.state case 1: @@ -1537,6 +1635,30 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BootServiceAbortReinstallRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BootServiceAbortReinstallResponse); i { case 0: return &v.state @@ -1549,15 +1671,15 @@ func file_api_v1_boot_proto_init() { } } } - file_api_v1_boot_proto_msgTypes[1].OneofWrappers = []interface{}{} - file_api_v1_boot_proto_msgTypes[9].OneofWrappers = []interface{}{} + file_api_v1_boot_proto_msgTypes[3].OneofWrappers = []interface{}{} + file_api_v1_boot_proto_msgTypes[11].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_boot_proto_rawDesc, NumEnums: 1, - NumMessages: 15, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, @@ -1584,6 +1706,9 @@ const _ = grpc.SupportPackageIsVersion6 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type BootServiceClient interface { + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) + // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) @@ -1598,6 +1723,15 @@ func NewBootServiceClient(cc grpc.ClientConnInterface) BootServiceClient { return &bootServiceClient{cc} } +func (c *bootServiceClient) Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) { + out := new(BootServiceDhcpResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Dhcp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *bootServiceClient) Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) { out := new(BootServiceBootResponse) err := c.cc.Invoke(ctx, "/api.v1.BootService/Boot", in, out, opts...) @@ -1636,6 +1770,9 @@ func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceA // BootServiceServer is the server API for BootService service. type BootServiceServer interface { + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) + // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) @@ -1646,6 +1783,9 @@ type BootServiceServer interface { type UnimplementedBootServiceServer struct { } +func (*UnimplementedBootServiceServer) Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Dhcp not implemented") +} func (*UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Boot not implemented") } @@ -1663,6 +1803,24 @@ func RegisterBootServiceServer(s *grpc.Server, srv BootServiceServer) { s.RegisterService(&_BootService_serviceDesc, srv) } +func _BootService_Dhcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceDhcpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Dhcp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Dhcp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Dhcp(ctx, req.(*BootServiceDhcpRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BootService_Boot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BootServiceBootRequest) if err := dec(in); err != nil { @@ -1739,6 +1897,10 @@ var _BootService_serviceDesc = grpc.ServiceDesc{ ServiceName: "api.v1.BootService", HandlerType: (*BootServiceServer)(nil), Methods: []grpc.MethodDesc{ + { + MethodName: "Dhcp", + Handler: _BootService_Dhcp_Handler, + }, { MethodName: "Boot", Handler: _BootService_Boot_Handler, diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index ba2a54166..865e03691 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -5,12 +5,22 @@ package api.v1; option go_package = "./api/v1"; service BootService { + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + rpc Dhcp(BootServiceDhcpRequest) returns (BootServiceDhcpResponse) {} + // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} rpc Register(BootServiceRegisterRequest)returns (BootServiceRegisterResponse) {} rpc Report(BootServiceReportRequest)returns (BootServiceReportResponse) {} rpc AbortReinstall(BootServiceAbortReinstallRequest) returns (BootServiceAbortReinstallResponse) {} } +message BootServiceDhcpRequest { + string mac = 1; +} + +message BootServiceDhcpResponse { +} + message BootServiceBootRequest { string mac = 1; string partition_id = 2; diff --git a/pkg/api/v1/event.pb.go b/pkg/api/v1/event.pb.go index 7f2150c35..8229147b2 100644 --- a/pkg/api/v1/event.pb.go +++ b/pkg/api/v1/event.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.20.0 +// protoc v3.20.1 // source: api/v1/event.proto package v1 diff --git a/pkg/api/v1/supwd.pb.go b/pkg/api/v1/supwd.pb.go index e1596f3a3..c6c7a4205 100644 --- a/pkg/api/v1/supwd.pb.go +++ b/pkg/api/v1/supwd.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.20.0 +// protoc v3.20.1 // source: api/v1/supwd.proto package v1 diff --git a/pkg/api/v1/wait.pb.go b/pkg/api/v1/wait.pb.go index eb8965600..8a2cb5a3e 100644 --- a/pkg/api/v1/wait.pb.go +++ b/pkg/api/v1/wait.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.26.0 -// protoc v3.20.0 +// protoc v3.20.1 // source: api/v1/wait.proto package v1 From 687ece89614076c38c834ff4a29e1de911314809 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 16 May 2022 21:18:00 +0200 Subject: [PATCH 12/42] more logic --- cmd/metal-api/internal/grpc/boot-service.go | 56 ++++++++------------- 1 file changed, 21 insertions(+), 35 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 82f66876a..52a434d47 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -63,49 +63,35 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) return nil, fmt.Errorf("no machine for mac:%q found", req.Mac) } - // if allocateion.Succeed== false, the machine was already in the installation phase but crashed before finalizing allocation - // we can boot into metal-hammer again. - if m.Allocation == nil || !m.Allocation.Succeeded { - return b.response(req.PartitionId), nil + if m.PartitionID != req.PartitionId { + return nil, fmt.Errorf("partitionID:%q of machine with mac does not match partitionID:%q", m.PartitionID, req.PartitionId) + } + p, err := b.ds.FindPartition(req.PartitionId) + if err != nil { + return nil, err } - return &v1.BootServiceBootResponse{}, nil -} - -func (b *BootService) response(partitionID string) *v1.BootServiceBootResponse { - // cfg := e.Config - - // cidr, _, _ := net.ParseCIDR(cfg.CIDR) - // metalCoreAddress := fmt.Sprintf("METAL_CORE_ADDRESS=%v:%d", cidr.String(), cfg.Port) - // metalAPIURL := fmt.Sprintf("METAL_API_URL=%s://%s:%d%s", cfg.ApiProtocol, cfg.ApiIP, cfg.ApiPort, cfg.ApiBasePath) - - // var ( - // imageURL string - // kernel string - // cmd []string - // ) - // // try to update boot config - // p, err := b.ds.FindPartition(partitionID) - // if err == nil { - // imageURL = p.BootConfiguration.ImageURL - // kernel = p.BootConfiguration.KernelURL - // cmd = []string{p.BootConfiguration.CommandLine} - // } - + // TODO // cmdline := []string{bc.MetalHammerCommandLine, metalCoreAddress, metalAPIURL} // if strings.ToUpper(cfg.LogLevel) == "DEBUG" { // cmdline = append(cmdline, "DEBUG=1") // } // cmd := strings.Join(cmdline, " ") - // return &v1.BootServiceBootResponse{ - // Kernel: bc.MetalHammerKernelURL, - // InitRamDisks: []string{ - // bc.MetalHammerImageURL, - // }, - // Cmdline: &cmd, - // } - return nil + + resp := &v1.BootServiceBootResponse{ + Kernel: p.BootConfiguration.KernelURL, + InitRamDisks: []string{p.BootConfiguration.ImageURL}, + Cmdline: &p.BootConfiguration.CommandLine, + } + + // if allocateion.Succeed== false, the machine was already in the installation phase but crashed before finalizing allocation + // we can boot into metal-hammer again. + if m.Allocation == nil || !m.Allocation.Succeeded { + return resp, nil + } + + return &v1.BootServiceBootResponse{}, nil } func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterRequest) (*v1.BootServiceRegisterResponse, error) { From 2dc04af7cd8f54595e80007c66213a302d9b96fc Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 09:57:04 +0200 Subject: [PATCH 13/42] remove --- cmd/metal-api/internal/grpc/boot-service.go | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 52a434d47..e27a82b29 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -71,21 +71,13 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) return nil, err } - // TODO - // cmdline := []string{bc.MetalHammerCommandLine, metalCoreAddress, metalAPIURL} - // if strings.ToUpper(cfg.LogLevel) == "DEBUG" { - // cmdline = append(cmdline, "DEBUG=1") - // } - - // cmd := strings.Join(cmdline, " ") - resp := &v1.BootServiceBootResponse{ Kernel: p.BootConfiguration.KernelURL, InitRamDisks: []string{p.BootConfiguration.ImageURL}, Cmdline: &p.BootConfiguration.CommandLine, } - // if allocateion.Succeed== false, the machine was already in the installation phase but crashed before finalizing allocation + // if allocateion.Succeed==false, the machine was already in the installation phase but crashed before finalizing allocation // we can boot into metal-hammer again. if m.Allocation == nil || !m.Allocation.Succeeded { return resp, nil From b3ae53c5b8ea7be5bc55c77a440e91ee49f69d05 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 14:46:16 +0200 Subject: [PATCH 14/42] DHCP Request provides uuid instead of mac --- cmd/metal-api/internal/grpc/boot-service.go | 2 +- pkg/api/v1/boot.pb.go | 388 ++++++++++---------- pkg/api/v1/boot.proto | 2 +- 3 files changed, 196 insertions(+), 196 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index e27a82b29..6595745e6 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -34,7 +34,7 @@ func (b *BootService) Dhcp(ctx context.Context, req *v1.BootServiceDhcpRequest) b.log.Infow("dhcp", "req", req) _, err := b.eventService.Send(ctx, &v1.EventServiceSendRequest{Events: map[string]*v1.MachineProvisioningEvent{ - req.Mac: { + req.Uuid: { Event: string(metal.ProvisioningEventPXEBooting), Message: "machine sent extended dhcp request", }, diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index c6407d990..9ebec8238 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -78,7 +78,7 @@ type BootServiceDhcpRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac,omitempty"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` } func (x *BootServiceDhcpRequest) Reset() { @@ -113,9 +113,9 @@ func (*BootServiceDhcpRequest) Descriptor() ([]byte, []int) { return file_api_v1_boot_proto_rawDescGZIP(), []int{0} } -func (x *BootServiceDhcpRequest) GetMac() string { +func (x *BootServiceDhcpRequest) GetUuid() string { if x != nil { - return x.Mac + return x.Uuid } return "" } @@ -1202,200 +1202,200 @@ var File_api_v1_boot_proto protoreflect.FileDescriptor var file_api_v1_boot_proto_rawDesc = []byte{ 0x0a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x62, 0x6f, 0x6f, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x2a, 0x0a, 0x16, 0x42, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x2c, 0x0a, 0x16, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x22, 0x19, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x16, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, - 0x6d, 0x61, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0x82, 0x01, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6b, - 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x72, 0x61, - 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x69, - 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, - 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, - 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x63, - 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, 0x61, 0x72, - 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, 0x72, 0x64, - 0x77, 0x61, 0x72, 0x65, 0x52, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x12, 0x27, - 0x0a, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, - 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, 0x49, 0x4f, - 0x53, 0x52, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, 0x6d, 0x69, - 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, - 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, - 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0d, - 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, 0xa0, 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, - 0x22, 0x64, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4e, 0x69, 0x63, 0x12, 0x10, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x42, 0x6f, 0x6f, + 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x68, 0x63, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x4d, 0x0a, 0x16, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 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, 0x2a, - 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, - 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, - 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, - 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xb4, 0x03, 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, 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, - 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, 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, 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, - 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x17, 0x42, 0x6f, 0x6f, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x16, 0x0a, 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6b, 0x65, 0x72, 0x6e, 0x65, 0x6c, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, + 0x72, 0x61, 0x6d, 0x5f, 0x64, 0x69, 0x73, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, + 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, + 0x5f, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x48, 0x61, + 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x52, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x12, 0x27, 0x0a, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x42, + 0x49, 0x4f, 0x53, 0x52, 0x04, 0x62, 0x69, 0x6f, 0x73, 0x12, 0x27, 0x0a, 0x04, 0x69, 0x70, 0x6d, + 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, + 0x6d, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, + 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, + 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, + 0xa0, 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, 0x22, 0x64, 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, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, + 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xb4, 0x03, 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, 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, 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, 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, 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, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index 865e03691..9d4db1e70 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -15,7 +15,7 @@ service BootService { } message BootServiceDhcpRequest { - string mac = 1; + string uuid = 1; } message BootServiceDhcpResponse { From 88d0a56f21d8acae7137efb0fcc287a0712c7d19 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 15:27:45 +0200 Subject: [PATCH 15/42] fixes --- cmd/metal-api/internal/grpc/boot-service.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 6595745e6..c662f3110 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -56,19 +56,16 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) NicsMacAddresses: []string{req.Mac}, PartitionID: &req.PartitionId, }, m) - if err != nil { + if err != nil && !metal.IsNotFound(err) { return nil, err } - if m == nil { - return nil, fmt.Errorf("no machine for mac:%q found", req.Mac) - } - if m.PartitionID != req.PartitionId { + if m != nil && m.PartitionID != req.PartitionId { return nil, fmt.Errorf("partitionID:%q of machine with mac does not match partitionID:%q", m.PartitionID, req.PartitionId) } p, err := b.ds.FindPartition(req.PartitionId) - if err != nil { - return nil, err + if err != nil || p == nil { + return nil, fmt.Errorf("no partition with id:%q found %w", req.PartitionId, err) } resp := &v1.BootServiceBootResponse{ From d8b91ff46e0fe777261e1ec05f6ba6dea955d5fc Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 15:38:15 +0200 Subject: [PATCH 16/42] Fix --- cmd/metal-api/internal/grpc/boot-service.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index c662f3110..07fd8961b 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -74,13 +74,14 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) Cmdline: &p.BootConfiguration.CommandLine, } + return resp, nil + // if allocateion.Succeed==false, the machine was already in the installation phase but crashed before finalizing allocation // we can boot into metal-hammer again. - if m.Allocation == nil || !m.Allocation.Succeeded { - return resp, nil - } + // if m != nil && m.Allocation == nil || !m.Allocation.Succeeded { + // return resp, nil + // } - return &v1.BootServiceBootResponse{}, nil } func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterRequest) (*v1.BootServiceRegisterResponse, error) { From 775cecc381fd9297f727e9fc2625da8f5cf832fe Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 15:50:14 +0200 Subject: [PATCH 17/42] more debug --- cmd/metal-api/internal/grpc/boot-service.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 07fd8961b..3bbc2d75b 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -73,7 +73,7 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) InitRamDisks: []string{p.BootConfiguration.ImageURL}, Cmdline: &p.BootConfiguration.CommandLine, } - + b.log.Infow("boot", "resp", resp) return resp, nil // if allocateion.Succeed==false, the machine was already in the installation phase but crashed before finalizing allocation From 1562faf8a2ccc59ec29d39fd26ca2914fafe6a48 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 15:59:07 +0200 Subject: [PATCH 18/42] Log stack grpc panics --- cmd/metal-api/internal/grpc/grpc-server.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/cmd/metal-api/internal/grpc/grpc-server.go b/cmd/metal-api/internal/grpc/grpc-server.go index 682f51545..3a8343feb 100644 --- a/cmd/metal-api/internal/grpc/grpc-server.go +++ b/cmd/metal-api/internal/grpc/grpc-server.go @@ -1,11 +1,13 @@ package grpc import ( + "context" "crypto/tls" "crypto/x509" "fmt" "net" "os" + "runtime/debug" "time" grpc_middleware "github.com/grpc-ecosystem/go-grpc-middleware" @@ -15,7 +17,9 @@ import ( grpc_prometheus "github.com/grpc-ecosystem/go-grpc-prometheus" "github.com/metal-stack/masterdata-api/pkg/interceptors/grpc_internalerror" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/keepalive" + "google.golang.org/grpc/status" "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" @@ -123,6 +127,14 @@ func (s *Server) Serve() error { grpcLogger := s.logger.Named("grpc").Desugar() grpc_zap.ReplaceGrpcLoggerV2(grpcLogger) + + recoveryOpt := grpc_recovery.WithRecoveryHandlerContext( + func(ctx context.Context, p any) error { + grpcLogger.Sugar().Errorf("[PANIC] %s stack:%s", p, string(debug.Stack())) + return status.Errorf(codes.Internal, "%s", p) + }, + ) + s.server = grpc.NewServer( grpc.KeepaliveEnforcementPolicy(kaep), grpc.KeepaliveParams(kasp), @@ -131,14 +143,14 @@ func (s *Server) Serve() error { grpc_prometheus.StreamServerInterceptor, grpc_zap.StreamServerInterceptor(grpcLogger), grpc_internalerror.StreamServerInterceptor(), - grpc_recovery.StreamServerInterceptor(), + grpc_recovery.StreamServerInterceptor(recoveryOpt), )), grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer( grpc_ctxtags.UnaryServerInterceptor(), grpc_prometheus.UnaryServerInterceptor, grpc_zap.UnaryServerInterceptor(grpcLogger), grpc_internalerror.UnaryServerInterceptor(), - grpc_recovery.UnaryServerInterceptor(), + grpc_recovery.UnaryServerInterceptor(recoveryOpt), )), ) grpc_prometheus.Register(s.server) From e0231b8144941011d5b195c42441af861c144c9b Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 17 May 2022 16:14:28 +0200 Subject: [PATCH 19/42] fix integration --- .github/workflows/latest.yaml | 4 ++-- .github/workflows/pull_request.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index 2d2f8ac01..8a9567337 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -47,10 +47,10 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up Go 1.17 + - name: Set up Go 1.18 uses: actions/setup-go@v2 with: - go-version: '1.17.x' + go-version: '1.18.x' - name: Run integration tests run: | diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index d2fecd127..5232d6863 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -53,7 +53,7 @@ jobs: - name: Set up Go 1.17 uses: actions/setup-go@v2 with: - go-version: '1.17.x' + go-version: '1.18.x' - name: Run integration tests run: | From c51809ec3feb348fd3aa4c9edcc806166e75dbfb Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 18 May 2022 08:01:32 +0200 Subject: [PATCH 20/42] Docu and fixes --- cmd/metal-api/internal/grpc/boot-service.go | 2 +- pkg/api/v1/boot.proto | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 3bbc2d75b..f1c8f25c6 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -6,7 +6,7 @@ import ( "fmt" "strings" - "github.com/avast/retry-go" + "github.com/avast/retry-go/v4" "github.com/dustin/go-humanize" "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index 9d4db1e70..ddf80445e 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -7,10 +7,13 @@ option go_package = "./api/v1"; service BootService { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired rpc Dhcp(BootServiceDhcpRequest) returns (BootServiceDhcpResponse) {} - // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd + // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine rpc Register(BootServiceRegisterRequest)returns (BootServiceRegisterResponse) {} + // Report tells metal-api installation was either sucessful or failed rpc Report(BootServiceReportRequest)returns (BootServiceReportResponse) {} + // If reinstall failed and tell metal-api to restore to previous state rpc AbortReinstall(BootServiceAbortReinstallRequest) returns (BootServiceAbortReinstallResponse) {} } From 8f99886aa1f4a8bf04d0bb1f026516d024b31b0d Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 18 May 2022 08:04:25 +0200 Subject: [PATCH 21/42] Add hints for later removal --- cmd/metal-api/internal/service/machine-service.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/metal-api/internal/service/machine-service.go b/cmd/metal-api/internal/service/machine-service.go index 880b19725..0d75145b0 100644 --- a/cmd/metal-api/internal/service/machine-service.go +++ b/cmd/metal-api/internal/service/machine-service.go @@ -191,6 +191,7 @@ func (r machineResource) webService() *restful.WebService { Returns(http.StatusConflict, "Conflict", httperrors.HTTPErrorResponse{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) + // FIXME can be removed once https://github.com/metal-stack/metal-api/pull/279 is merged ws.Route(ws.POST("/register"). To(editor(r.registerMachine)). Operation("registerMachine"). @@ -212,6 +213,7 @@ func (r machineResource) webService() *restful.WebService { Returns(http.StatusOK, "OK", v1.MachineResponse{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) + // FIXME can be removed once https://github.com/metal-stack/metal-api/pull/279 is merged ws.Route(ws.POST("/{id}/finalize-allocation"). To(editor(r.finalizeAllocation)). Operation("finalizeAllocation"). @@ -307,6 +309,7 @@ func (r machineResource) webService() *restful.WebService { Returns(http.StatusBadRequest, "Bad Request", httperrors.HTTPErrorResponse{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) + // FIXME can be removed once https://github.com/metal-stack/metal-api/pull/279 is merged ws.Route(ws.POST("/{id}/abort-reinstall"). To(editor(r.abortReinstallMachine)). Operation("abortReinstallMachine"). @@ -318,6 +321,7 @@ func (r machineResource) webService() *restful.WebService { Returns(http.StatusOK, "OK", v1.BootInfo{}). DefaultReturns("Error", httperrors.HTTPErrorResponse{})) + // FIXME can be removed once metal-hammer and metal-core are updated with events via grpc ws.Route(ws.GET("/{id}/event"). To(viewer(r.getProvisioningEventContainer)). Operation("getProvisioningEventContainer"). From 767e4d9fa7b83c148bac6bd5e9b059c146e58c0b Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 18 May 2022 08:14:42 +0200 Subject: [PATCH 22/42] missed protoc --- pkg/api/v1/boot.pb.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 9ebec8238..3227f038c 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1708,10 +1708,13 @@ const _ = grpc.SupportPackageIsVersion6 type BootServiceClient interface { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) - // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd + // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) + // Report tells metal-api installation was either sucessful or failed Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) + // If reinstall failed and tell metal-api to restore to previous state AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) } @@ -1772,10 +1775,13 @@ func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceA type BootServiceServer interface { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) - // Boot is called from pixiecore once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd + // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) + // Report tells metal-api installation was either sucessful or failed Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) + // If reinstall failed and tell metal-api to restore to previous state AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) } From 9dfdd4d91ebe33fc4055273cd441341548371818 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 25 May 2022 08:42:39 +0200 Subject: [PATCH 23/42] Update deps --- go.mod | 8 ++++---- go.sum | 15 ++++++++------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/go.mod b/go.mod index d39152cea..c009a1c34 100644 --- a/go.mod +++ b/go.mod @@ -22,16 +22,16 @@ require ( github.com/metal-stack/security v0.6.4 github.com/metal-stack/v v1.0.3 github.com/nsqio/go-nsq v1.1.0 - github.com/prometheus/client_golang v1.12.1 + github.com/prometheus/client_golang v1.12.2 github.com/spf13/cobra v1.4.0 github.com/spf13/viper v1.11.0 github.com/stretchr/testify v1.7.1 github.com/testcontainers/testcontainers-go v0.13.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 - golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f - golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - google.golang.org/grpc v1.46.0 + golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 + golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 + google.golang.org/grpc v1.46.2 google.golang.org/protobuf v1.28.0 gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 ) diff --git a/go.sum b/go.sum index 782791be8..72ad70416 100644 --- a/go.sum +++ b/go.sum @@ -892,8 +892,8 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= -github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk= -github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= +github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34= +github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -1108,8 +1108,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f h1:OeJjE6G4dgCY4PIXvIRQbE8+RX+uXZyGhUy/ksMGJoc= -golang.org/x/crypto v0.0.0-20220427172511-eb4f295cb31f/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 h1:SLP7Q4Di66FONjDJbCYrCRrh97focO6sLogHO7/g8F0= +golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1228,8 +1228,9 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= +golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1519,8 +1520,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= -google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= +google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= From 398eba538f8dccd76ecb6b3462da2ba4aec48daf Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 25 May 2022 15:05:24 +0200 Subject: [PATCH 24/42] format proto with buf --- pkg/api/v1/boot.proto | 150 ++++++++++++++++++++--------------------- pkg/api/v1/event.proto | 32 +++++---- pkg/api/v1/supwd.proto | 9 ++- pkg/api/v1/wait.proto | 4 +- 4 files changed, 95 insertions(+), 100 deletions(-) diff --git a/pkg/api/v1/boot.proto b/pkg/api/v1/boot.proto index ddf80445e..410127fcc 100644 --- a/pkg/api/v1/boot.proto +++ b/pkg/api/v1/boot.proto @@ -5,127 +5,125 @@ package api.v1; option go_package = "./api/v1"; service BootService { - // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired - rpc Dhcp(BootServiceDhcpRequest) returns (BootServiceDhcpResponse) {} - // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd - rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} - // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine - rpc Register(BootServiceRegisterRequest)returns (BootServiceRegisterResponse) {} - // Report tells metal-api installation was either sucessful or failed - rpc Report(BootServiceReportRequest)returns (BootServiceReportResponse) {} - // If reinstall failed and tell metal-api to restore to previous state - rpc AbortReinstall(BootServiceAbortReinstallRequest) returns (BootServiceAbortReinstallResponse) {} + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + rpc Dhcp(BootServiceDhcpRequest) returns (BootServiceDhcpResponse) {} + // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd + rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine + rpc Register(BootServiceRegisterRequest) returns (BootServiceRegisterResponse) {} + // Report tells metal-api installation was either sucessful or failed + rpc Report(BootServiceReportRequest) returns (BootServiceReportResponse) {} + // If reinstall failed and tell metal-api to restore to previous state + rpc AbortReinstall(BootServiceAbortReinstallRequest) returns (BootServiceAbortReinstallResponse) {} } message BootServiceDhcpRequest { - string uuid = 1; + string uuid = 1; } -message BootServiceDhcpResponse { -} +message BootServiceDhcpResponse {} message BootServiceBootRequest { - string mac = 1; - string partition_id = 2; + string mac = 1; + string partition_id = 2; } message BootServiceBootResponse { - string kernel = 1; - repeated string init_ram_disks = 2; - optional string cmdline = 3; + string kernel = 1; + repeated string init_ram_disks = 2; + optional string cmdline = 3; } message BootServiceRegisterRequest { - string uuid = 1; - MachineHardware hardware = 2; - MachineBIOS bios = 3; - MachineIPMI ipmi = 4; - repeated string tags = 5; + string uuid = 1; + MachineHardware hardware = 2; + MachineBIOS bios = 3; + MachineIPMI ipmi = 4; + repeated string tags = 5; } message BootServiceRegisterResponse { - string uuid = 1; - string size = 2; - string partition_id = 3; - RegisterState register_state = 4; + string uuid = 1; + string size = 2; + string partition_id = 3; + RegisterState register_state = 4; } message MachineHardware { - uint64 memory = 1; - uint32 cpu_cores = 2 ; - repeated MachineBlockDevice disks = 3; - repeated MachineNic nics = 4; + uint64 memory = 1; + uint32 cpu_cores = 2; + repeated MachineBlockDevice disks = 3; + repeated MachineNic nics = 4; } message MachineNic { - string mac = 1; - string name = 2; - repeated MachineNic neighbors = 3; + string mac = 1; + string name = 2; + repeated MachineNic neighbors = 3; } message MachineBlockDevice { - string name = 1; - uint64 size = 2; + string name = 1; + uint64 size = 2; } message MachineBIOS { - string version = 1; - string vendor = 2; - string date = 3; + string version = 1; + string vendor = 2; + string date = 3; } message MachineIPMI { - string address = 1; - string mac = 2; - string user = 3; - string password = 4; - string interface = 5; - MachineFRU fru = 6; - string bmc_version = 7; - string power_state = 8; + string address = 1; + string mac = 2; + string user = 3; + string password = 4; + string interface = 5; + MachineFRU fru = 6; + string bmc_version = 7; + string power_state = 8; } message MachineFRU { - optional string chassis_part_number = 1; - optional string chassis_part_serial = 2; - optional string board_mfg = 3; - optional string board_mfg_serial = 4; - optional string board_part_number = 5; - optional string product_manufacturer = 6; - optional string product_part_number = 7; - optional string product_serial = 8; + optional string chassis_part_number = 1; + optional string chassis_part_serial = 2; + optional string board_mfg = 3; + optional string board_mfg_serial = 4; + optional string board_part_number = 5; + optional string product_manufacturer = 6; + optional string product_part_number = 7; + optional string product_serial = 8; } message BootServiceReportRequest { - string uuid = 1; - string console_password = 2; - BootInfo boot_info = 3; - bool success = 4; - string message = 5; -} -message BootServiceReportResponse { + string uuid = 1; + string console_password = 2; + BootInfo boot_info = 3; + bool success = 4; + string message = 5; } +message BootServiceReportResponse {} message BootInfo { - string image_id = 1; - string primary_disk = 2; - string os_partition = 3; - string initrd = 4; - string cmdline = 5; - string kernel = 6; - string bootloader_id = 8; + string image_id = 1; + string primary_disk = 2; + string os_partition = 3; + string initrd = 4; + string cmdline = 5; + string kernel = 6; + string bootloader_id = 8; } enum RegisterState { - REGISTER_STATE_UNSPECIFIED = 0; - REGISTER_STATE_CREATED = 1; - REGISTER_STATE_UPDATED = 2; + REGISTER_STATE_UNSPECIFIED = 0; + REGISTER_STATE_CREATED = 1; + REGISTER_STATE_UPDATED = 2; } message BootServiceAbortReinstallRequest { - string uuid = 1; - bool primary_disk_wiped = 2; + string uuid = 1; + bool primary_disk_wiped = 2; } message BootServiceAbortReinstallResponse { - BootInfo boot_info = 1; -} \ No newline at end of file + BootInfo boot_info = 1; +} diff --git a/pkg/api/v1/event.proto b/pkg/api/v1/event.proto index 7485140b7..0e404ba4f 100644 --- a/pkg/api/v1/event.proto +++ b/pkg/api/v1/event.proto @@ -2,34 +2,32 @@ syntax = "proto3"; package api.v1; -option go_package = "./api/v1"; - import "google/protobuf/timestamp.proto"; +option go_package = "./api/v1"; service EventService { - rpc Send(EventServiceSendRequest) returns (EventServiceSendResponse) {} + rpc Send(EventServiceSendRequest) returns (EventServiceSendResponse) {} } message EventServiceSendRequest { - map events = 1; + map events = 1; } message EventServiceSendResponse { - // number of events stored - uint64 events = 1; - // slice of machineIDs for which event was not published - repeated string failed = 2; - + // number of events stored + uint64 events = 1; + // slice of machineIDs for which event was not published + repeated string failed = 2; } message MachineProvisioningEvent { - // timestamp when the event occured - google.protobuf.Timestamp time= 1; - // the event type - // must be one of metal.ProvisioningEventType, otherwise event will be skipped - // TODO should be migrated to be an enum - string event = 2; - // an additional message describing the event more detailed - string message = 3; + // timestamp when the event occured + google.protobuf.Timestamp time = 1; + // the event type + // must be one of metal.ProvisioningEventType, otherwise event will be skipped + // TODO should be migrated to be an enum + string event = 2; + // an additional message describing the event more detailed + string message = 3; } diff --git a/pkg/api/v1/supwd.proto b/pkg/api/v1/supwd.proto index 74bbed179..524b183bc 100644 --- a/pkg/api/v1/supwd.proto +++ b/pkg/api/v1/supwd.proto @@ -4,14 +4,13 @@ package v1; option go_package = "api/v1"; -message SuperUserPasswordRequest { -} +message SuperUserPasswordRequest {} message SuperUserPasswordResponse { - bool featureDisabled = 1; - string superUserPassword = 2; + bool featureDisabled = 1; + string superUserPassword = 2; } service SuperUserPassword { - rpc FetchSuperUserPassword (SuperUserPasswordRequest) returns (SuperUserPasswordResponse); + rpc FetchSuperUserPassword(SuperUserPasswordRequest) returns (SuperUserPasswordResponse); } diff --git a/pkg/api/v1/wait.proto b/pkg/api/v1/wait.proto index b7e4bfa37..69c96719a 100644 --- a/pkg/api/v1/wait.proto +++ b/pkg/api/v1/wait.proto @@ -5,11 +5,11 @@ package v1; option go_package = "api/v1"; message WaitRequest { - string machineID = 1; + string machineID = 1; } message KeepPatientResponse {} service Wait { - rpc Wait (WaitRequest) returns (stream KeepPatientResponse); + rpc Wait(WaitRequest) returns (stream KeepPatientResponse); } From 511b4d657caa1eba2f68f514624d1a5c88a75226 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 25 May 2022 15:30:41 +0200 Subject: [PATCH 25/42] Fix comment --- pkg/api/v1/boot.pb.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 3227f038c..ad6ad6ee8 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1708,7 +1708,7 @@ const _ = grpc.SupportPackageIsVersion6 type BootServiceClient interface { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) - // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd + // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) @@ -1775,7 +1775,7 @@ func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceA type BootServiceServer interface { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) - // Boot is called from pixie once the nachine got the first dhcp response and ipxie asks for subsequent kernel and initrd + // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) From 754fea30edaeb61d62e3e11668a8e9df50dc9115 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 30 May 2022 13:28:43 +0200 Subject: [PATCH 26/42] move proto files to new directory, use buf --- .github/workflows/pull_request.yaml | 6 + .gitignore | 4 +- Dockerfile | 2 +- Makefile | 6 +- cmd/metal-api/internal/grpc/wait-service.go | 2 +- .../internal/grpc/wait-service_int_test.go | 2 +- .../internal/service/integration_test.go | 2 +- pkg/api/v1/boot.pb.go | 246 +---------------- pkg/api/v1/boot_grpc.pb.go | 253 ++++++++++++++++++ pkg/api/v1/event.pb.go | 91 +------ pkg/api/v1/event_grpc.pb.go | 99 +++++++ pkg/api/v1/supwd.pb.go | 135 ++-------- pkg/api/v1/supwd_grpc.pb.go | 99 +++++++ pkg/api/v1/wait.pb.go | 150 ++--------- pkg/api/v1/wait_grpc.pb.go | 126 +++++++++ proto/Makefile | 8 + {pkg => proto}/api/v1/boot.proto | 2 +- {pkg => proto}/api/v1/event.proto | 2 +- {pkg => proto}/api/v1/supwd.proto | 8 +- {pkg => proto}/api/v1/wait.proto | 6 +- proto/buf.gen.yaml | 10 + proto/buf.yaml | 5 + 22 files changed, 677 insertions(+), 587 deletions(-) create mode 100644 pkg/api/v1/boot_grpc.pb.go create mode 100644 pkg/api/v1/event_grpc.pb.go create mode 100644 pkg/api/v1/supwd_grpc.pb.go create mode 100644 pkg/api/v1/wait_grpc.pb.go create mode 100644 proto/Makefile rename {pkg => proto}/api/v1/boot.proto (99%) rename {pkg => proto}/api/v1/event.proto (96%) rename {pkg => proto}/api/v1/supwd.proto (67%) rename {pkg => proto}/api/v1/wait.proto (69%) create mode 100644 proto/buf.gen.yaml create mode 100644 proto/buf.yaml diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 5232d6863..fdeeadbf2 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -17,6 +17,12 @@ jobs: with: go-version: '1.18.x' + - name: Proto generation using buf + uses: bufbuild/buf-setup-action@v1 + with: + version: '1.4.0' + - run: make protoc + - name: Figure out if running fork PR id: fork run: '["${{ secrets.DOCKER_REGISTRY_TOKEN }}" == ""] && echo "::set-output name=is_fork_pr::true" || echo "::set-output name=is_fork_pr::false"' diff --git a/.gitignore b/.gitignore index 503591b5f..564f528a0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ bin vendor .idea -.vscode/settings.json +.vscode generate coverage.out -__debug_bin \ No newline at end of file +__debug_bin diff --git a/Dockerfile b/Dockerfile index 03b6a308c..73eb832d2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM metalstack/builder:latest as builder -FROM alpine:3.15 +FROM alpine:3.16 RUN apk -U add ca-certificates COPY --from=builder /work/bin/metal-api /metal-api CMD ["/metal-api"] diff --git a/Makefile b/Makefile index f5d31c1dd..bcef3d753 100644 --- a/Makefile +++ b/Makefile @@ -22,12 +22,12 @@ redoc: .PHONY: protoc protoc: - protoc -I pkg --go_out plugins=grpc:pkg pkg/api/v1/*.proto + make -C proto protoc .PHONY: protoc-docker protoc-docker: - docker pull metalstack/builder - docker run --rm --user $$(id -u):$$(id -g) -v $(PWD):/work -w /work metalstack/builder protoc -I pkg --go_out plugins=grpc:pkg pkg/api/v1/*.proto + docker pull bufbuild/buf:1.4.0 + docker run --rm --user $$(id -u):$$(id -g) -v $(PWD):/work --tmpfs /.cache -w /work/proto bufbuild/buf:1.4.0 generate -v .PHONY: mini-lab-push mini-lab-push: diff --git a/cmd/metal-api/internal/grpc/wait-service.go b/cmd/metal-api/internal/grpc/wait-service.go index 78aee8f0e..c390d4b88 100644 --- a/cmd/metal-api/internal/grpc/wait-service.go +++ b/cmd/metal-api/internal/grpc/wait-service.go @@ -97,7 +97,7 @@ func (s *WaitService) timeoutHandler(err bus.TimeoutError) error { } func (s *WaitService) Wait(req *v1.WaitRequest, srv v1.Wait_WaitServer) error { - machineID := req.MachineID + machineID := req.MachineId s.Logger.Infow("wait for allocation called by", "machineID", machineID) m, err := s.ds.FindMachineByID(machineID) diff --git a/cmd/metal-api/internal/grpc/wait-service_int_test.go b/cmd/metal-api/internal/grpc/wait-service_int_test.go index 2174ecb50..f586273ac 100644 --- a/cmd/metal-api/internal/grpc/wait-service_int_test.go +++ b/cmd/metal-api/internal/grpc/wait-service_int_test.go @@ -279,7 +279,7 @@ func (t *test) startMachineInstances() { func (t *test) waitForAllocation(machineID string, c v1.WaitClient, ctx context.Context) error { req := &v1.WaitRequest{ - MachineID: machineID, + MachineId: machineID, } for { diff --git a/cmd/metal-api/internal/service/integration_test.go b/cmd/metal-api/internal/service/integration_test.go index fa5142d1c..cb66e2911 100644 --- a/cmd/metal-api/internal/service/integration_test.go +++ b/cmd/metal-api/internal/service/integration_test.go @@ -420,7 +420,7 @@ func (te *testEnv) machineWait(uuid string) error { func waitForAllocation(machineID string, c grpcv1.WaitClient, ctx context.Context) { req := &grpcv1.WaitRequest{ - MachineID: machineID, + MachineId: machineID, } for { diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index ad6ad6ee8..6e6be6427 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.20.1 +// protoc-gen-go v1.27.1 +// protoc (unknown) // source: api/v1/boot.proto package v1 import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -1394,8 +1390,8 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -1693,237 +1689,3 @@ func file_api_v1_boot_proto_init() { file_api_v1_boot_proto_goTypes = nil file_api_v1_boot_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// BootServiceClient is the client API for BootService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type BootServiceClient interface { - // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired - Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) - // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd - Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) - // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine - Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) - // Report tells metal-api installation was either sucessful or failed - Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) - // If reinstall failed and tell metal-api to restore to previous state - AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) -} - -type bootServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewBootServiceClient(cc grpc.ClientConnInterface) BootServiceClient { - return &bootServiceClient{cc} -} - -func (c *bootServiceClient) Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) { - out := new(BootServiceDhcpResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/Dhcp", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bootServiceClient) Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) { - out := new(BootServiceBootResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/Boot", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) { - out := new(BootServiceRegisterResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/Register", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bootServiceClient) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) { - out := new(BootServiceReportResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/Report", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) { - out := new(BootServiceAbortReinstallResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/AbortReinstall", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// BootServiceServer is the server API for BootService service. -type BootServiceServer interface { - // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired - Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) - // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd - Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) - // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine - Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) - // Report tells metal-api installation was either sucessful or failed - Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) - // If reinstall failed and tell metal-api to restore to previous state - AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) -} - -// UnimplementedBootServiceServer can be embedded to have forward compatible implementations. -type UnimplementedBootServiceServer struct { -} - -func (*UnimplementedBootServiceServer) Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Dhcp not implemented") -} -func (*UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Boot not implemented") -} -func (*UnimplementedBootServiceServer) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") -} -func (*UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") -} -func (*UnimplementedBootServiceServer) AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AbortReinstall not implemented") -} - -func RegisterBootServiceServer(s *grpc.Server, srv BootServiceServer) { - s.RegisterService(&_BootService_serviceDesc, srv) -} - -func _BootService_Dhcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceDhcpRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BootServiceServer).Dhcp(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.BootService/Dhcp", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).Dhcp(ctx, req.(*BootServiceDhcpRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BootService_Boot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceBootRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BootServiceServer).Boot(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.BootService/Boot", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).Boot(ctx, req.(*BootServiceBootRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceRegisterRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BootServiceServer).Register(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.BootService/Register", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).Register(ctx, req.(*BootServiceRegisterRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BootService_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceReportRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BootServiceServer).Report(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.BootService/Report", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).Report(ctx, req.(*BootServiceReportRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _BootService_AbortReinstall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceAbortReinstallRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(BootServiceServer).AbortReinstall(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.BootService/AbortReinstall", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).AbortReinstall(ctx, req.(*BootServiceAbortReinstallRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _BootService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.v1.BootService", - HandlerType: (*BootServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Dhcp", - Handler: _BootService_Dhcp_Handler, - }, - { - MethodName: "Boot", - Handler: _BootService_Boot_Handler, - }, - { - MethodName: "Register", - Handler: _BootService_Register_Handler, - }, - { - MethodName: "Report", - Handler: _BootService_Report_Handler, - }, - { - MethodName: "AbortReinstall", - Handler: _BootService_AbortReinstall_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/v1/boot.proto", -} diff --git a/pkg/api/v1/boot_grpc.pb.go b/pkg/api/v1/boot_grpc.pb.go new file mode 100644 index 000000000..b3aa082f8 --- /dev/null +++ b/pkg/api/v1/boot_grpc.pb.go @@ -0,0 +1,253 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// BootServiceClient is the client API for BootService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BootServiceClient interface { + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) + // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd + Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine + Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) + // Report tells metal-api installation was either sucessful or failed + Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) + // If reinstall failed and tell metal-api to restore to previous state + AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) +} + +type bootServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewBootServiceClient(cc grpc.ClientConnInterface) BootServiceClient { + return &bootServiceClient{cc} +} + +func (c *bootServiceClient) Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) { + out := new(BootServiceDhcpResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Dhcp", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) { + out := new(BootServiceBootResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Boot", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) { + out := new(BootServiceRegisterResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Register", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) { + out := new(BootServiceReportResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Report", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *bootServiceClient) AbortReinstall(ctx context.Context, in *BootServiceAbortReinstallRequest, opts ...grpc.CallOption) (*BootServiceAbortReinstallResponse, error) { + out := new(BootServiceAbortReinstallResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/AbortReinstall", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BootServiceServer is the server API for BootService service. +// All implementations should embed UnimplementedBootServiceServer +// for forward compatibility +type BootServiceServer interface { + // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired + Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) + // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd + Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) + // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine + Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) + // Report tells metal-api installation was either sucessful or failed + Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) + // If reinstall failed and tell metal-api to restore to previous state + AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) +} + +// UnimplementedBootServiceServer should be embedded to have forward compatible implementations. +type UnimplementedBootServiceServer struct { +} + +func (UnimplementedBootServiceServer) Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Dhcp not implemented") +} +func (UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Boot not implemented") +} +func (UnimplementedBootServiceServer) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") +} +func (UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") +} +func (UnimplementedBootServiceServer) AbortReinstall(context.Context, *BootServiceAbortReinstallRequest) (*BootServiceAbortReinstallResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AbortReinstall not implemented") +} + +// UnsafeBootServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BootServiceServer will +// result in compilation errors. +type UnsafeBootServiceServer interface { + mustEmbedUnimplementedBootServiceServer() +} + +func RegisterBootServiceServer(s grpc.ServiceRegistrar, srv BootServiceServer) { + s.RegisterService(&BootService_ServiceDesc, srv) +} + +func _BootService_Dhcp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceDhcpRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Dhcp(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Dhcp", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Dhcp(ctx, req.(*BootServiceDhcpRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_Boot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceBootRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Boot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Boot", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Boot(ctx, req.(*BootServiceBootRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceRegisterRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Register(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Register", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Register(ctx, req.(*BootServiceRegisterRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceReportRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).Report(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/Report", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).Report(ctx, req.(*BootServiceReportRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _BootService_AbortReinstall_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceAbortReinstallRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).AbortReinstall(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/AbortReinstall", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).AbortReinstall(ctx, req.(*BootServiceAbortReinstallRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// BootService_ServiceDesc is the grpc.ServiceDesc for BootService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var BootService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.BootService", + HandlerType: (*BootServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Dhcp", + Handler: _BootService_Dhcp_Handler, + }, + { + MethodName: "Boot", + Handler: _BootService_Boot_Handler, + }, + { + MethodName: "Register", + Handler: _BootService_Register_Handler, + }, + { + MethodName: "Report", + Handler: _BootService_Report_Handler, + }, + { + MethodName: "AbortReinstall", + Handler: _BootService_AbortReinstall_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/boot.proto", +} diff --git a/pkg/api/v1/event.pb.go b/pkg/api/v1/event.pb.go index 8229147b2..9ce265635 100644 --- a/pkg/api/v1/event.pb.go +++ b/pkg/api/v1/event.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.20.1 +// protoc-gen-go v1.27.1 +// protoc (unknown) // source: api/v1/event.proto package v1 import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" timestamppb "google.golang.org/protobuf/types/known/timestamppb" @@ -234,8 +230,7 @@ var file_api_v1_event_proto_rawDesc = []byte{ 0x65, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x53, 0x65, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0x0a, 0x5a, 0x08, 0x2e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -333,83 +328,3 @@ func file_api_v1_event_proto_init() { file_api_v1_event_proto_goTypes = nil file_api_v1_event_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// EventServiceClient is the client API for EventService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type EventServiceClient interface { - Send(ctx context.Context, in *EventServiceSendRequest, opts ...grpc.CallOption) (*EventServiceSendResponse, error) -} - -type eventServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { - return &eventServiceClient{cc} -} - -func (c *eventServiceClient) Send(ctx context.Context, in *EventServiceSendRequest, opts ...grpc.CallOption) (*EventServiceSendResponse, error) { - out := new(EventServiceSendResponse) - err := c.cc.Invoke(ctx, "/api.v1.EventService/Send", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// EventServiceServer is the server API for EventService service. -type EventServiceServer interface { - Send(context.Context, *EventServiceSendRequest) (*EventServiceSendResponse, error) -} - -// UnimplementedEventServiceServer can be embedded to have forward compatible implementations. -type UnimplementedEventServiceServer struct { -} - -func (*UnimplementedEventServiceServer) Send(context.Context, *EventServiceSendRequest) (*EventServiceSendResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") -} - -func RegisterEventServiceServer(s *grpc.Server, srv EventServiceServer) { - s.RegisterService(&_EventService_serviceDesc, srv) -} - -func _EventService_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(EventServiceSendRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(EventServiceServer).Send(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.EventService/Send", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(EventServiceServer).Send(ctx, req.(*EventServiceSendRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _EventService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "api.v1.EventService", - HandlerType: (*EventServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "Send", - Handler: _EventService_Send_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/v1/event.proto", -} diff --git a/pkg/api/v1/event_grpc.pb.go b/pkg/api/v1/event_grpc.pb.go new file mode 100644 index 000000000..fff0974fb --- /dev/null +++ b/pkg/api/v1/event_grpc.pb.go @@ -0,0 +1,99 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// EventServiceClient is the client API for EventService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type EventServiceClient interface { + Send(ctx context.Context, in *EventServiceSendRequest, opts ...grpc.CallOption) (*EventServiceSendResponse, error) +} + +type eventServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewEventServiceClient(cc grpc.ClientConnInterface) EventServiceClient { + return &eventServiceClient{cc} +} + +func (c *eventServiceClient) Send(ctx context.Context, in *EventServiceSendRequest, opts ...grpc.CallOption) (*EventServiceSendResponse, error) { + out := new(EventServiceSendResponse) + err := c.cc.Invoke(ctx, "/api.v1.EventService/Send", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// EventServiceServer is the server API for EventService service. +// All implementations should embed UnimplementedEventServiceServer +// for forward compatibility +type EventServiceServer interface { + Send(context.Context, *EventServiceSendRequest) (*EventServiceSendResponse, error) +} + +// UnimplementedEventServiceServer should be embedded to have forward compatible implementations. +type UnimplementedEventServiceServer struct { +} + +func (UnimplementedEventServiceServer) Send(context.Context, *EventServiceSendRequest) (*EventServiceSendResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") +} + +// UnsafeEventServiceServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to EventServiceServer will +// result in compilation errors. +type UnsafeEventServiceServer interface { + mustEmbedUnimplementedEventServiceServer() +} + +func RegisterEventServiceServer(s grpc.ServiceRegistrar, srv EventServiceServer) { + s.RegisterService(&EventService_ServiceDesc, srv) +} + +func _EventService_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(EventServiceSendRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(EventServiceServer).Send(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.EventService/Send", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(EventServiceServer).Send(ctx, req.(*EventServiceSendRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// EventService_ServiceDesc is the grpc.ServiceDesc for EventService service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var EventService_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.EventService", + HandlerType: (*EventServiceServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Send", + Handler: _EventService_Send_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/event.proto", +} diff --git a/pkg/api/v1/supwd.pb.go b/pkg/api/v1/supwd.pb.go index c6c7a4205..718b58319 100644 --- a/pkg/api/v1/supwd.pb.go +++ b/pkg/api/v1/supwd.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.20.1 +// protoc-gen-go v1.27.1 +// protoc (unknown) // source: api/v1/supwd.proto package v1 import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -67,8 +63,8 @@ type SuperUserPasswordResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - FeatureDisabled bool `protobuf:"varint,1,opt,name=featureDisabled,proto3" json:"featureDisabled,omitempty"` - SuperUserPassword string `protobuf:"bytes,2,opt,name=superUserPassword,proto3" json:"superUserPassword,omitempty"` + FeatureDisabled bool `protobuf:"varint,1,opt,name=feature_disabled,json=featureDisabled,proto3" json:"feature_disabled,omitempty"` + SuperUserPassword string `protobuf:"bytes,2,opt,name=super_user_password,json=superUserPassword,proto3" json:"super_user_password,omitempty"` } func (x *SuperUserPasswordResponse) Reset() { @@ -121,24 +117,25 @@ var File_api_v1_supwd_proto protoreflect.FileDescriptor var file_api_v1_supwd_proto_rawDesc = []byte{ 0x0a, 0x12, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x70, 0x77, 0x64, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, 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, 0x73, 0x0a, 0x19, 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, 0x28, 0x0a, 0x0f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x44, 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, 0x2c, 0x0a, 0x11, 0x73, - 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 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, 0x6a, 0x0a, 0x11, 0x53, 0x75, 0x70, - 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x55, - 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, - 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x1c, 0x2e, 0x76, 0x31, 0x2e, 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, 0x1d, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x75, 0x70, 0x65, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, + 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, 0x76, 0x0a, 0x19, 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, 0x42, 0x08, 0x5a, 0x06, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 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, 0x72, 0x0a, 0x11, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5d, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, + 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, + 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -155,12 +152,12 @@ func file_api_v1_supwd_proto_rawDescGZIP() []byte { var file_api_v1_supwd_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_api_v1_supwd_proto_goTypes = []interface{}{ - (*SuperUserPasswordRequest)(nil), // 0: v1.SuperUserPasswordRequest - (*SuperUserPasswordResponse)(nil), // 1: v1.SuperUserPasswordResponse + (*SuperUserPasswordRequest)(nil), // 0: api.v1.SuperUserPasswordRequest + (*SuperUserPasswordResponse)(nil), // 1: api.v1.SuperUserPasswordResponse } var file_api_v1_supwd_proto_depIdxs = []int32{ - 0, // 0: v1.SuperUserPassword.FetchSuperUserPassword:input_type -> v1.SuperUserPasswordRequest - 1, // 1: v1.SuperUserPassword.FetchSuperUserPassword:output_type -> v1.SuperUserPasswordResponse + 0, // 0: api.v1.SuperUserPassword.FetchSuperUserPassword:input_type -> api.v1.SuperUserPasswordRequest + 1, // 1: api.v1.SuperUserPassword.FetchSuperUserPassword:output_type -> api.v1.SuperUserPasswordResponse 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -218,83 +215,3 @@ func file_api_v1_supwd_proto_init() { file_api_v1_supwd_proto_goTypes = nil file_api_v1_supwd_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// SuperUserPasswordClient is the client API for SuperUserPassword service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type SuperUserPasswordClient interface { - FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) -} - -type superUserPasswordClient struct { - cc grpc.ClientConnInterface -} - -func NewSuperUserPasswordClient(cc grpc.ClientConnInterface) SuperUserPasswordClient { - return &superUserPasswordClient{cc} -} - -func (c *superUserPasswordClient) FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) { - out := new(SuperUserPasswordResponse) - err := c.cc.Invoke(ctx, "/v1.SuperUserPassword/FetchSuperUserPassword", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SuperUserPasswordServer is the server API for SuperUserPassword service. -type SuperUserPasswordServer interface { - FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) -} - -// UnimplementedSuperUserPasswordServer can be embedded to have forward compatible implementations. -type UnimplementedSuperUserPasswordServer struct { -} - -func (*UnimplementedSuperUserPasswordServer) FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSuperUserPassword not implemented") -} - -func RegisterSuperUserPasswordServer(s *grpc.Server, srv SuperUserPasswordServer) { - s.RegisterService(&_SuperUserPassword_serviceDesc, srv) -} - -func _SuperUserPassword_FetchSuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuperUserPasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/v1.SuperUserPassword/FetchSuperUserPassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, req.(*SuperUserPasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _SuperUserPassword_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.SuperUserPassword", - HandlerType: (*SuperUserPasswordServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchSuperUserPassword", - Handler: _SuperUserPassword_FetchSuperUserPassword_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/v1/supwd.proto", -} diff --git a/pkg/api/v1/supwd_grpc.pb.go b/pkg/api/v1/supwd_grpc.pb.go new file mode 100644 index 000000000..88f8574ba --- /dev/null +++ b/pkg/api/v1/supwd_grpc.pb.go @@ -0,0 +1,99 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// SuperUserPasswordClient is the client API for SuperUserPassword service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type SuperUserPasswordClient interface { + FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) +} + +type superUserPasswordClient struct { + cc grpc.ClientConnInterface +} + +func NewSuperUserPasswordClient(cc grpc.ClientConnInterface) SuperUserPasswordClient { + return &superUserPasswordClient{cc} +} + +func (c *superUserPasswordClient) FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) { + out := new(SuperUserPasswordResponse) + err := c.cc.Invoke(ctx, "/api.v1.SuperUserPassword/FetchSuperUserPassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// SuperUserPasswordServer is the server API for SuperUserPassword service. +// All implementations should embed UnimplementedSuperUserPasswordServer +// for forward compatibility +type SuperUserPasswordServer interface { + FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) +} + +// UnimplementedSuperUserPasswordServer should be embedded to have forward compatible implementations. +type UnimplementedSuperUserPasswordServer struct { +} + +func (UnimplementedSuperUserPasswordServer) FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchSuperUserPassword not implemented") +} + +// UnsafeSuperUserPasswordServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to SuperUserPasswordServer will +// result in compilation errors. +type UnsafeSuperUserPasswordServer interface { + mustEmbedUnimplementedSuperUserPasswordServer() +} + +func RegisterSuperUserPasswordServer(s grpc.ServiceRegistrar, srv SuperUserPasswordServer) { + s.RegisterService(&SuperUserPassword_ServiceDesc, srv) +} + +func _SuperUserPassword_FetchSuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuperUserPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.SuperUserPassword/FetchSuperUserPassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, req.(*SuperUserPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// SuperUserPassword_ServiceDesc is the grpc.ServiceDesc for SuperUserPassword service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var SuperUserPassword_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.SuperUserPassword", + HandlerType: (*SuperUserPasswordServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "FetchSuperUserPassword", + Handler: _SuperUserPassword_FetchSuperUserPassword_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "api/v1/supwd.proto", +} diff --git a/pkg/api/v1/wait.pb.go b/pkg/api/v1/wait.pb.go index 8a2cb5a3e..cdc597b6e 100644 --- a/pkg/api/v1/wait.pb.go +++ b/pkg/api/v1/wait.pb.go @@ -1,16 +1,12 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.20.1 +// protoc-gen-go v1.27.1 +// protoc (unknown) // source: api/v1/wait.proto package v1 import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" @@ -29,7 +25,7 @@ type WaitRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - MachineID string `protobuf:"bytes,1,opt,name=machineID,proto3" json:"machineID,omitempty"` + MachineId string `protobuf:"bytes,1,opt,name=machine_id,json=machineId,proto3" json:"machine_id,omitempty"` } func (x *WaitRequest) Reset() { @@ -64,9 +60,9 @@ func (*WaitRequest) Descriptor() ([]byte, []int) { return file_api_v1_wait_proto_rawDescGZIP(), []int{0} } -func (x *WaitRequest) GetMachineID() string { +func (x *WaitRequest) GetMachineId() string { if x != nil { - return x.MachineID + return x.MachineId } return "" } @@ -113,16 +109,17 @@ var File_api_v1_wait_proto protoreflect.FileDescriptor var file_api_v1_wait_proto_rawDesc = []byte{ 0x0a, 0x11, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x77, 0x61, 0x69, 0x74, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x02, 0x76, 0x31, 0x22, 0x2b, 0x0a, 0x0b, 0x57, 0x61, 0x69, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, - 0x65, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x63, 0x68, 0x69, - 0x6e, 0x65, 0x49, 0x44, 0x22, 0x15, 0x0a, 0x13, 0x4b, 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x69, - 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x3a, 0x0a, 0x04, 0x57, - 0x61, 0x69, 0x74, 0x12, 0x32, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x0f, 0x2e, 0x76, 0x31, - 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, - 0x31, 0x2e, 0x4b, 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x08, 0x5a, 0x06, 0x61, 0x70, 0x69, 0x2f, 0x76, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x2c, 0x0a, 0x0b, 0x57, + 0x61, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 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, 0x15, 0x0a, 0x13, 0x4b, 0x65, 0x65, + 0x70, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0x42, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, 0x12, 0x3a, 0x0a, 0x04, 0x57, 0x61, 0x69, 0x74, + 0x12, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4b, + 0x65, 0x65, 0x70, 0x50, 0x61, 0x74, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x30, 0x01, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -139,12 +136,12 @@ func file_api_v1_wait_proto_rawDescGZIP() []byte { var file_api_v1_wait_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_api_v1_wait_proto_goTypes = []interface{}{ - (*WaitRequest)(nil), // 0: v1.WaitRequest - (*KeepPatientResponse)(nil), // 1: v1.KeepPatientResponse + (*WaitRequest)(nil), // 0: api.v1.WaitRequest + (*KeepPatientResponse)(nil), // 1: api.v1.KeepPatientResponse } var file_api_v1_wait_proto_depIdxs = []int32{ - 0, // 0: v1.Wait.Wait:input_type -> v1.WaitRequest - 1, // 1: v1.Wait.Wait:output_type -> v1.KeepPatientResponse + 0, // 0: api.v1.Wait.Wait:input_type -> api.v1.WaitRequest + 1, // 1: api.v1.Wait.Wait:output_type -> api.v1.KeepPatientResponse 1, // [1:2] is the sub-list for method output_type 0, // [0:1] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -202,110 +199,3 @@ func file_api_v1_wait_proto_init() { file_api_v1_wait_proto_goTypes = nil file_api_v1_wait_proto_depIdxs = nil } - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// WaitClient is the client API for Wait service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type WaitClient interface { - Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (Wait_WaitClient, error) -} - -type waitClient struct { - cc grpc.ClientConnInterface -} - -func NewWaitClient(cc grpc.ClientConnInterface) WaitClient { - return &waitClient{cc} -} - -func (c *waitClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (Wait_WaitClient, error) { - stream, err := c.cc.NewStream(ctx, &_Wait_serviceDesc.Streams[0], "/v1.Wait/Wait", opts...) - if err != nil { - return nil, err - } - x := &waitWaitClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Wait_WaitClient interface { - Recv() (*KeepPatientResponse, error) - grpc.ClientStream -} - -type waitWaitClient struct { - grpc.ClientStream -} - -func (x *waitWaitClient) Recv() (*KeepPatientResponse, error) { - m := new(KeepPatientResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// WaitServer is the server API for Wait service. -type WaitServer interface { - Wait(*WaitRequest, Wait_WaitServer) error -} - -// UnimplementedWaitServer can be embedded to have forward compatible implementations. -type UnimplementedWaitServer struct { -} - -func (*UnimplementedWaitServer) Wait(*WaitRequest, Wait_WaitServer) error { - return status.Errorf(codes.Unimplemented, "method Wait not implemented") -} - -func RegisterWaitServer(s *grpc.Server, srv WaitServer) { - s.RegisterService(&_Wait_serviceDesc, srv) -} - -func _Wait_Wait_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(WaitRequest) - if err := stream.RecvMsg(m); err != nil { - return err - } - return srv.(WaitServer).Wait(m, &waitWaitServer{stream}) -} - -type Wait_WaitServer interface { - Send(*KeepPatientResponse) error - grpc.ServerStream -} - -type waitWaitServer struct { - grpc.ServerStream -} - -func (x *waitWaitServer) Send(m *KeepPatientResponse) error { - return x.ServerStream.SendMsg(m) -} - -var _Wait_serviceDesc = grpc.ServiceDesc{ - ServiceName: "v1.Wait", - HandlerType: (*WaitServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Wait", - Handler: _Wait_Wait_Handler, - ServerStreams: true, - }, - }, - Metadata: "api/v1/wait.proto", -} diff --git a/pkg/api/v1/wait_grpc.pb.go b/pkg/api/v1/wait_grpc.pb.go new file mode 100644 index 000000000..5e010d74a --- /dev/null +++ b/pkg/api/v1/wait_grpc.pb.go @@ -0,0 +1,126 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package v1 + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// WaitClient is the client API for Wait service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WaitClient interface { + Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (Wait_WaitClient, error) +} + +type waitClient struct { + cc grpc.ClientConnInterface +} + +func NewWaitClient(cc grpc.ClientConnInterface) WaitClient { + return &waitClient{cc} +} + +func (c *waitClient) Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (Wait_WaitClient, error) { + stream, err := c.cc.NewStream(ctx, &Wait_ServiceDesc.Streams[0], "/api.v1.Wait/Wait", opts...) + if err != nil { + return nil, err + } + x := &waitWaitClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Wait_WaitClient interface { + Recv() (*KeepPatientResponse, error) + grpc.ClientStream +} + +type waitWaitClient struct { + grpc.ClientStream +} + +func (x *waitWaitClient) Recv() (*KeepPatientResponse, error) { + m := new(KeepPatientResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// WaitServer is the server API for Wait service. +// All implementations should embed UnimplementedWaitServer +// for forward compatibility +type WaitServer interface { + Wait(*WaitRequest, Wait_WaitServer) error +} + +// UnimplementedWaitServer should be embedded to have forward compatible implementations. +type UnimplementedWaitServer struct { +} + +func (UnimplementedWaitServer) Wait(*WaitRequest, Wait_WaitServer) error { + return status.Errorf(codes.Unimplemented, "method Wait not implemented") +} + +// UnsafeWaitServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WaitServer will +// result in compilation errors. +type UnsafeWaitServer interface { + mustEmbedUnimplementedWaitServer() +} + +func RegisterWaitServer(s grpc.ServiceRegistrar, srv WaitServer) { + s.RegisterService(&Wait_ServiceDesc, srv) +} + +func _Wait_Wait_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(WaitRequest) + if err := stream.RecvMsg(m); err != nil { + return err + } + return srv.(WaitServer).Wait(m, &waitWaitServer{stream}) +} + +type Wait_WaitServer interface { + Send(*KeepPatientResponse) error + grpc.ServerStream +} + +type waitWaitServer struct { + grpc.ServerStream +} + +func (x *waitWaitServer) Send(m *KeepPatientResponse) error { + return x.ServerStream.SendMsg(m) +} + +// Wait_ServiceDesc is the grpc.ServiceDesc for Wait service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Wait_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "api.v1.Wait", + HandlerType: (*WaitServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Wait", + Handler: _Wait_Wait_Handler, + ServerStreams: true, + }, + }, + Metadata: "api/v1/wait.proto", +} diff --git a/proto/Makefile b/proto/Makefile new file mode 100644 index 000000000..a0539e519 --- /dev/null +++ b/proto/Makefile @@ -0,0 +1,8 @@ +.PHONY: protoc +protoc: protolint + buf generate -v + +.PHONY: protolint +protolint: + buf format -w . + buf lint -v diff --git a/pkg/api/v1/boot.proto b/proto/api/v1/boot.proto similarity index 99% rename from pkg/api/v1/boot.proto rename to proto/api/v1/boot.proto index 410127fcc..560319fe5 100644 --- a/pkg/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package api.v1; -option go_package = "./api/v1"; +option go_package = "./v1"; service BootService { // Dhcp is the first dhcp request (option 97). A ProvisioningEventPXEBooting is fired diff --git a/pkg/api/v1/event.proto b/proto/api/v1/event.proto similarity index 96% rename from pkg/api/v1/event.proto rename to proto/api/v1/event.proto index 0e404ba4f..c5723dd76 100644 --- a/pkg/api/v1/event.proto +++ b/proto/api/v1/event.proto @@ -4,7 +4,7 @@ package api.v1; import "google/protobuf/timestamp.proto"; -option go_package = "./api/v1"; +option go_package = "./v1"; service EventService { rpc Send(EventServiceSendRequest) returns (EventServiceSendResponse) {} diff --git a/pkg/api/v1/supwd.proto b/proto/api/v1/supwd.proto similarity index 67% rename from pkg/api/v1/supwd.proto rename to proto/api/v1/supwd.proto index 524b183bc..db9681196 100644 --- a/pkg/api/v1/supwd.proto +++ b/proto/api/v1/supwd.proto @@ -1,14 +1,14 @@ syntax = "proto3"; -package v1; +package api.v1; -option go_package = "api/v1"; +option go_package = "./v1"; message SuperUserPasswordRequest {} message SuperUserPasswordResponse { - bool featureDisabled = 1; - string superUserPassword = 2; + bool feature_disabled = 1; + string super_user_password = 2; } service SuperUserPassword { diff --git a/pkg/api/v1/wait.proto b/proto/api/v1/wait.proto similarity index 69% rename from pkg/api/v1/wait.proto rename to proto/api/v1/wait.proto index 69c96719a..6f85e7181 100644 --- a/pkg/api/v1/wait.proto +++ b/proto/api/v1/wait.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package v1; +package api.v1; -option go_package = "api/v1"; +option go_package = "./v1"; message WaitRequest { - string machineID = 1; + string machine_id = 1; } message KeepPatientResponse {} diff --git a/proto/buf.gen.yaml b/proto/buf.gen.yaml new file mode 100644 index 000000000..636c55e4b --- /dev/null +++ b/proto/buf.gen.yaml @@ -0,0 +1,10 @@ +version: v1 +plugins: + # generate go structs for protocol buffer definition + - remote: buf.build/library/plugins/go:v1.27.1-1 + out: ../pkg/api + # generate gRPC stubs in golang + - remote: buf.build/library/plugins/go-grpc:v1.1.0-2 + out: ../pkg/api + opt: + - require_unimplemented_servers=false diff --git a/proto/buf.yaml b/proto/buf.yaml new file mode 100644 index 000000000..3f513558c --- /dev/null +++ b/proto/buf.yaml @@ -0,0 +1,5 @@ +version: v1 +lint: + use: + # TODO raise to DEFAULT + - BASIC From 7a413cd3e8029beb60b971099915c179a14535cb Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 30 May 2022 13:33:27 +0200 Subject: [PATCH 27/42] move proto files to new directory, use buf --- .github/workflows/pull_request.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index fdeeadbf2..451fc9f63 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -17,11 +17,18 @@ jobs: with: go-version: '1.18.x' - - name: Proto generation using buf + - name: setup buf uses: bufbuild/buf-setup-action@v1 with: version: '1.4.0' - - run: make protoc + - name: lint proto files + uses: bufbuild/buf-lint-action@v1 + with: + input: 'proto' + + - name: generate proto + working-directory: proto + run: buf generate -v - name: Figure out if running fork PR id: fork From 69802d5d059dd39d9ebf077b8642bec5201f7ba0 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 30 May 2022 13:39:07 +0200 Subject: [PATCH 28/42] Do not build protoc in docker, should already be compiled --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bcef3d753..6f68ab741 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ MINI_LAB_KUBECONFIG := $(shell pwd)/../mini-lab/.kubeconfig include $(COMMONDIR)/Makefile.inc -release:: protoc spec check-diff all ; +release:: spec check-diff all ; .PHONY: spec spec: all From fd84b28cbf13c3aecb6300541d8e79ba625990ed Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Mon, 30 May 2022 14:05:19 +0200 Subject: [PATCH 29/42] review findings --- .github/workflows/latest.yaml | 12 ++++ .github/workflows/pull_request.yaml | 1 - .github/workflows/release.yaml | 12 ++++ cmd/metal-api/internal/grpc/boot-service.go | 14 +---- go.mod | 28 ++++----- go.sum | 64 +++++++++++---------- 6 files changed, 72 insertions(+), 59 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index 8a9567337..f3906f124 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -17,6 +17,18 @@ jobs: with: go-version: '1.18.x' + - name: setup buf + uses: bufbuild/buf-setup-action@v1 + with: + version: '1.4.0' + - name: lint proto files + uses: bufbuild/buf-lint-action@v1 + with: + input: 'proto' + - name: generate proto + working-directory: proto + run: buf generate -v + - name: Docker Login uses: docker/login-action@v1 with: diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 451fc9f63..3d7bcf329 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -25,7 +25,6 @@ jobs: uses: bufbuild/buf-lint-action@v1 with: input: 'proto' - - name: generate proto working-directory: proto run: buf generate -v diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6e7a54dc1..de42e2cc5 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -17,6 +17,18 @@ jobs: with: go-version: '1.18.x' + - name: setup buf + uses: bufbuild/buf-setup-action@v1 + with: + version: '1.4.0' + - name: lint proto files + uses: bufbuild/buf-lint-action@v1 + with: + input: 'proto' + - name: generate proto + working-directory: proto + run: buf generate -v + - name: Docker Login uses: docker/login-action@v1 with: diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index f1c8f25c6..5fb3942fc 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -7,7 +7,6 @@ import ( "strings" "github.com/avast/retry-go/v4" - "github.com/dustin/go-humanize" "github.com/metal-stack/metal-api/cmd/metal-api/internal/datastore" "github.com/metal-stack/metal-api/cmd/metal-api/internal/metal" v1 "github.com/metal-stack/metal-api/pkg/api/v1" @@ -75,13 +74,6 @@ func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) } b.log.Infow("boot", "resp", resp) return resp, nil - - // if allocateion.Succeed==false, the machine was already in the installation phase but crashed before finalizing allocation - // we can boot into metal-hammer again. - // if m != nil && m.Allocation == nil || !m.Allocation.Succeeded { - // return resp, nil - // } - } func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterRequest) (*v1.BootServiceRegisterResponse, error) { @@ -185,13 +177,9 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR var registerState v1.RegisterState if m == nil { // machine is not in the database, create it - name := fmt.Sprintf("%d-core/%s", machineHardware.CPUCores, humanize.Bytes(machineHardware.Memory)) - descr := fmt.Sprintf("a machine with %d core(s) and %s of RAM", machineHardware.CPUCores, humanize.Bytes(machineHardware.Memory)) m = &metal.Machine{ Base: metal.Base{ - ID: req.Uuid, - Name: name, - Description: descr, + ID: req.Uuid, }, Allocation: nil, SizeID: size.ID, diff --git a/go.mod b/go.mod index c009a1c34..37c755f99 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.18 require ( github.com/Masterminds/semver/v3 v3.1.1 - github.com/avast/retry-go/v4 v4.0.4 - github.com/aws/aws-sdk-go v1.44.7 + github.com/avast/retry-go/v4 v4.0.5 + github.com/aws/aws-sdk-go v1.44.24 github.com/dustin/go-humanize v1.0.0 github.com/emicklei/go-restful-openapi/v2 v2.9.0 github.com/emicklei/go-restful/v3 v3.7.4 @@ -24,12 +24,12 @@ require ( github.com/nsqio/go-nsq v1.1.0 github.com/prometheus/client_golang v1.12.2 github.com/spf13/cobra v1.4.0 - github.com/spf13/viper v1.11.0 + github.com/spf13/viper v1.12.0 github.com/stretchr/testify v1.7.1 github.com/testcontainers/testcontainers-go v0.13.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 - golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 + golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 google.golang.org/grpc v1.46.2 google.golang.org/protobuf v1.28.0 @@ -55,7 +55,7 @@ require ( github.com/docker/docker v20.10.12+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect - github.com/fsnotify/fsnotify v1.5.1 // indirect + github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/go-logr/logr v1.2.2 // indirect github.com/go-openapi/errors v0.20.2 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect @@ -88,7 +88,7 @@ require ( github.com/magiconair/properties v1.8.6 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect - github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/moby/sys/mount v0.2.0 // indirect github.com/moby/sys/mountinfo v0.5.0 // indirect github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect @@ -100,8 +100,8 @@ require ( github.com/opencontainers/image-spec v1.0.2 // indirect github.com/opencontainers/runc v1.1.0 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect - github.com/pelletier/go-toml v1.9.4 // indirect - github.com/pelletier/go-toml/v2 v2.0.0-beta.8 // indirect + github.com/pelletier/go-toml v1.9.5 // indirect + github.com/pelletier/go-toml/v2 v2.0.1 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/prometheus/client_model v0.2.0 // indirect @@ -109,26 +109,26 @@ require ( github.com/prometheus/procfs v0.7.3 // indirect github.com/sirupsen/logrus v1.8.1 // indirect github.com/spf13/afero v1.8.2 // indirect - github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/objx v0.2.0 // indirect - github.com/subosito/gotenv v1.2.0 // indirect + github.com/subosito/gotenv v1.3.0 // indirect go.mongodb.org/mongo-driver v1.9.0 // indirect go.opencensus.io v0.23.0 // indirect go.uber.org/atomic v1.7.0 // indirect go4.org/intern v0.0.0-20210108033219-3eb7198706b2 // indirect go4.org/unsafe/assume-no-moving-gc v0.0.0-20211027215541-db492cf91b37 // indirect - golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect + golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 // indirect golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 // indirect - golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 // indirect + golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac // indirect + google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd // indirect gopkg.in/cenkalti/backoff.v2 v2.2.1 // indirect gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect + gopkg.in/yaml.v3 v3.0.0 // indirect inet.af/netaddr v0.0.0-20210511181906-37180328850c // indirect ) diff --git a/go.sum b/go.sum index 72ad70416..d0ecf5ca4 100644 --- a/go.sum +++ b/go.sum @@ -103,11 +103,11 @@ github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/avast/retry-go v3.0.0+incompatible h1:4SOWQ7Qs+oroOTQOYnAHqelpCO0biHSxpiH9JdtuBj0= github.com/avast/retry-go v3.0.0+incompatible/go.mod h1:XtSnn+n/sHqQIpZ10K1qAevBhOOCWBLXXy3hyiqqBrY= -github.com/avast/retry-go/v4 v4.0.4 h1:38hLf0DsRXh+hOF6HbTni0+5QGTNdw9zbaMD7KAO830= -github.com/avast/retry-go/v4 v4.0.4/go.mod h1:HqmLvS2VLdStPCGDFjSuZ9pzlTqVRldCI4w2dO4m1Ms= +github.com/avast/retry-go/v4 v4.0.5 h1:C0Fm9MjPCmgLW6Jb1zBTVRx0ycr+VUaaUZO5wpqYjqg= +github.com/avast/retry-go/v4 v4.0.5/go.mod h1:HqmLvS2VLdStPCGDFjSuZ9pzlTqVRldCI4w2dO4m1Ms= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= -github.com/aws/aws-sdk-go v1.44.7 h1:LpCM8Fpw/L58vgdve6A+UqJr8dzo6Xj7HX7DIIGHg2A= -github.com/aws/aws-sdk-go v1.44.7/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.24 h1:3nOkwJBJLiGBmJKWp3z0utyXuBkxyGkRRwWjrTItJaY= +github.com/aws/aws-sdk-go v1.44.24/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -160,7 +160,6 @@ github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnht github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= @@ -347,7 +346,6 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= @@ -355,10 +353,11 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= -github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= +github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= +github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= github.com/fullsailor/pkcs7 v0.0.0-20190404230743-d7302db945fa/go.mod h1:KnogPXtdwXqoenmZCw6S+25EAm2MkxbG0deNDu4cbSA= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -693,8 +692,8 @@ github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -771,8 +770,9 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= +github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/sys/mount v0.2.0 h1:WhCW5B355jtxndN5ovugJlMFJawbUODuW8fSnEH6SSM= @@ -870,10 +870,10 @@ github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/9 github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= -github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= -github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8 h1:dy81yyLYJDwMTifq24Oi/IslOslRrDSb3jwDggjz3Z0= -github.com/pelletier/go-toml/v2 v2.0.0-beta.8/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= +github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= +github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= +github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU= +github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/pierrre/gotestcover v0.0.0-20160517101806-924dca7d15f0/go.mod h1:4xpMLz7RBWyB+ElzHu8Llua96TRCB3YwX+l5EP1wmHk= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -929,6 +929,7 @@ github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6L github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= @@ -956,8 +957,8 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= @@ -973,8 +974,8 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= -github.com/spf13/viper v1.11.0 h1:7OX/1FS6n7jHD1zGrZTM7WtY13ZELRyosK4k93oPr44= -github.com/spf13/viper v1.11.0/go.mod h1:djo0X/bA5+tYVoCn+C7cAYJGcVn/qYLFTG8gdUsX7Zk= +github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ= +github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -990,8 +991,8 @@ github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= -github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= +github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1108,8 +1109,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898 h1:SLP7Q4Di66FONjDJbCYrCRrh97focO6sLogHO7/g8F0= -golang.org/x/crypto v0.0.0-20220518034528-6f7dac969898/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= +golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1201,8 +1202,8 @@ golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qx golang.org/x/net v0.0.0-20211108170745-6635138e15ea/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA= -golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2 h1:NWy5+hlRbC7HK+PmcXVUmW1IMyFce7to56IUvhUFm7Y= +golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1317,7 +1318,6 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1326,8 +1326,9 @@ golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= -golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1494,8 +1495,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac h1:qSNTkEN+L2mvWcLgJOR+8bdHX9rN/IdU3A1Ghpfb1Rg= -google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I= +google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1519,7 +1520,7 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= +google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -1577,8 +1578,9 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8= From e2de47939a7af6a2880f1f05ca0d554a386008d7 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 09:22:24 +0200 Subject: [PATCH 30/42] Ensure generated files are clean before generating --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 6f68ab741..f5aa21ef0 100644 --- a/Makefile +++ b/Makefile @@ -22,6 +22,7 @@ redoc: .PHONY: protoc protoc: + rm -rf pkg/api/v1 make -C proto protoc .PHONY: protoc-docker From 0a3554f943d8960539aa0af39814c1ebbf8fe95c Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 10:31:28 +0200 Subject: [PATCH 31/42] better proto linting --- proto/buf.yaml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/proto/buf.yaml b/proto/buf.yaml index 3f513558c..309f21b9c 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,5 +1,9 @@ version: v1 lint: use: - # TODO raise to DEFAULT - - BASIC + - DEFAULT + except: + # TODO remove these + - SERVICE_SUFFIX + - RPC_REQUEST_STANDARD_NAME + - RPC_RESPONSE_STANDARD_NAME From 87ee45edaab7bbd9fad78f8619f0d4aa56c9b74d Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 10:40:03 +0200 Subject: [PATCH 32/42] move superuserpassword service to boot as well --- cmd/metal-api/internal/grpc/boot-service.go | 22 ++ cmd/metal-api/internal/grpc/grpc-server.go | 5 - cmd/metal-api/internal/grpc/supwd-service.go | 41 ---- pkg/api/v1/boot.pb.go | 228 +++++++++++++++---- pkg/api/v1/boot_grpc.pb.go | 38 ++++ pkg/api/v1/supwd.pb.go | 217 ------------------ pkg/api/v1/supwd_grpc.pb.go | 99 -------- proto/api/v1/boot.proto | 8 + proto/api/v1/supwd.proto | 16 -- proto/api/v1/wait.proto | 1 + 10 files changed, 251 insertions(+), 424 deletions(-) delete mode 100644 cmd/metal-api/internal/grpc/supwd-service.go delete mode 100644 pkg/api/v1/supwd.pb.go delete mode 100644 pkg/api/v1/supwd_grpc.pb.go delete mode 100644 proto/api/v1/supwd.proto diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 5fb3942fc..99c87987e 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "os" "strings" "github.com/avast/retry-go/v4" @@ -17,6 +18,7 @@ import ( type BootService struct { log *zap.SugaredLogger ds Datasource + pwdFile string publisher bus.Publisher eventService *EventService } @@ -26,6 +28,7 @@ func NewBootService(cfg *ServerConfig, eventService *EventService) *BootService ds: cfg.Datasource, log: cfg.Logger.Named("boot-service"), publisher: cfg.Publisher, + pwdFile: cfg.BMCSuperUserPasswordFile, eventService: eventService, } } @@ -271,6 +274,25 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR }, nil } +func (b *BootService) FetchSuperUserPassword(ctx context.Context, req *v1.SuperUserPasswordRequest) (*v1.SuperUserPasswordResponse, error) { + defer ctx.Done() + + resp := &v1.SuperUserPasswordResponse{} + if b.pwdFile == "" { + resp.FeatureDisabled = true + return resp, nil + } + + bb, err := os.ReadFile(b.pwdFile) + if err != nil { + b.log.Errorw("failed to lookup BMC superuser password", "password file", b.pwdFile, "error", err) + return nil, err + } + resp.FeatureDisabled = false + resp.SuperUserPassword = strings.TrimSpace(string(bb)) + return resp, nil +} + func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportRequest) (*v1.BootServiceReportResponse, error) { b.log.Infow("report", "req", req) diff --git a/cmd/metal-api/internal/grpc/grpc-server.go b/cmd/metal-api/internal/grpc/grpc-server.go index 3a8343feb..e674a374a 100644 --- a/cmd/metal-api/internal/grpc/grpc-server.go +++ b/cmd/metal-api/internal/grpc/grpc-server.go @@ -65,7 +65,6 @@ type ServerConfig struct { type Server struct { *WaitService - *SupwdService *EventService *BootService ds Datasource @@ -90,15 +89,12 @@ func NewServer(cfg *ServerConfig) (*Server, error) { if err != nil { return nil, err } - supwdService := NewSupwdService(cfg) eventService := NewEventService(cfg) - bootService := NewBootService(cfg, eventService) s := &Server{ WaitService: waitService, - SupwdService: supwdService, EventService: eventService, BootService: bootService, ds: cfg.Datasource, @@ -155,7 +151,6 @@ func (s *Server) Serve() error { ) grpc_prometheus.Register(s.server) - v1.RegisterSuperUserPasswordServer(s.server, s.SupwdService) v1.RegisterWaitServer(s.server, s.WaitService) v1.RegisterEventServiceServer(s.server, s.EventService) v1.RegisterBootServiceServer(s.server, s.BootService) diff --git a/cmd/metal-api/internal/grpc/supwd-service.go b/cmd/metal-api/internal/grpc/supwd-service.go deleted file mode 100644 index 71a16c9e2..000000000 --- a/cmd/metal-api/internal/grpc/supwd-service.go +++ /dev/null @@ -1,41 +0,0 @@ -package grpc - -import ( - "context" - "os" - "strings" - - v1 "github.com/metal-stack/metal-api/pkg/api/v1" - "go.uber.org/zap" -) - -type SupwdService struct { - logger *zap.SugaredLogger - pwdFile string -} - -func NewSupwdService(cfg *ServerConfig) *SupwdService { - return &SupwdService{ - logger: cfg.Logger, - pwdFile: cfg.BMCSuperUserPasswordFile, - } -} - -func (s *SupwdService) FetchSuperUserPassword(ctx context.Context, req *v1.SuperUserPasswordRequest) (*v1.SuperUserPasswordResponse, error) { - defer ctx.Done() - - resp := &v1.SuperUserPasswordResponse{} - if s.pwdFile == "" { - resp.FeatureDisabled = true - return resp, nil - } - - bb, err := os.ReadFile(s.pwdFile) - if err != nil { - s.logger.Errorw("failed to lookup BMC superuser password", "password file", s.pwdFile, "error", err) - return nil, err - } - resp.FeatureDisabled = false - resp.SuperUserPassword = strings.TrimSpace(string(bb)) - return resp, nil -} diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 6e6be6427..784f51a27 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1194,6 +1194,99 @@ func (x *BootServiceAbortReinstallResponse) GetBootInfo() *BootInfo { return nil } +type SuperUserPasswordRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *SuperUserPasswordRequest) Reset() { + *x = SuperUserPasswordRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuperUserPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuperUserPasswordRequest) ProtoMessage() {} + +func (x *SuperUserPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuperUserPasswordRequest.ProtoReflect.Descriptor instead. +func (*SuperUserPasswordRequest) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{17} +} + +type SuperUserPasswordResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FeatureDisabled bool `protobuf:"varint,1,opt,name=feature_disabled,json=featureDisabled,proto3" json:"feature_disabled,omitempty"` + SuperUserPassword string `protobuf:"bytes,2,opt,name=super_user_password,json=superUserPassword,proto3" json:"super_user_password,omitempty"` +} + +func (x *SuperUserPasswordResponse) Reset() { + *x = SuperUserPasswordResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_v1_boot_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SuperUserPasswordResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SuperUserPasswordResponse) ProtoMessage() {} + +func (x *SuperUserPasswordResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_v1_boot_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SuperUserPasswordResponse.ProtoReflect.Descriptor instead. +func (*SuperUserPasswordResponse) Descriptor() ([]byte, []int) { + return file_api_v1_boot_proto_rawDescGZIP(), []int{18} +} + +func (x *SuperUserPasswordResponse) GetFeatureDisabled() bool { + if x != nil { + return x.FeatureDisabled + } + return false +} + +func (x *SuperUserPasswordResponse) GetSuperUserPassword() string { + if x != nil { + return x.SuperUserPassword + } + return "" +} + var File_api_v1_boot_proto protoreflect.FileDescriptor var file_api_v1_boot_proto_rawDesc = []byte{ @@ -1356,42 +1449,57 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xb4, 0x03, 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, + 0x6f, 0x22, 0x1a, 0x0a, 0x18, 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, 0x76, 0x0a, + 0x19, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, + 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x93, + 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, 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, 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, 0x5d, 0x0a, 0x16, 0x46, + 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, + 0x2e, 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, 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, 0x42, 0x6f, 0x6f, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 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, 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, 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, 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, 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 ( @@ -1407,7 +1515,7 @@ func file_api_v1_boot_proto_rawDescGZIP() []byte { } var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_api_v1_boot_proto_goTypes = []interface{}{ (RegisterState)(0), // 0: api.v1.RegisterState (*BootServiceDhcpRequest)(nil), // 1: api.v1.BootServiceDhcpRequest @@ -1427,6 +1535,8 @@ var file_api_v1_boot_proto_goTypes = []interface{}{ (*BootInfo)(nil), // 15: api.v1.BootInfo (*BootServiceAbortReinstallRequest)(nil), // 16: api.v1.BootServiceAbortReinstallRequest (*BootServiceAbortReinstallResponse)(nil), // 17: api.v1.BootServiceAbortReinstallResponse + (*SuperUserPasswordRequest)(nil), // 18: api.v1.SuperUserPasswordRequest + (*SuperUserPasswordResponse)(nil), // 19: api.v1.SuperUserPasswordResponse } var file_api_v1_boot_proto_depIdxs = []int32{ 7, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware @@ -1442,15 +1552,17 @@ var file_api_v1_boot_proto_depIdxs = []int32{ 1, // 10: api.v1.BootService.Dhcp:input_type -> api.v1.BootServiceDhcpRequest 3, // 11: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest 5, // 12: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest - 13, // 13: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest - 16, // 14: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest - 2, // 15: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse - 4, // 16: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse - 6, // 17: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse - 14, // 18: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse - 17, // 19: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse - 15, // [15:20] is the sub-list for method output_type - 10, // [10:15] is the sub-list for method input_type + 18, // 13: api.v1.BootService.FetchSuperUserPassword:input_type -> api.v1.SuperUserPasswordRequest + 13, // 14: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest + 16, // 15: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest + 2, // 16: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse + 4, // 17: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse + 6, // 18: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse + 19, // 19: api.v1.BootService.FetchSuperUserPassword:output_type -> api.v1.SuperUserPasswordResponse + 14, // 20: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse + 17, // 21: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse + 16, // [16:22] is the sub-list for method output_type + 10, // [10:16] is the sub-list for method input_type 10, // [10:10] is the sub-list for extension type_name 10, // [10:10] is the sub-list for extension extendee 0, // [0:10] is the sub-list for field type_name @@ -1666,6 +1778,30 @@ func file_api_v1_boot_proto_init() { return nil } } + file_api_v1_boot_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuperUserPasswordRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_v1_boot_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SuperUserPasswordResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_api_v1_boot_proto_msgTypes[3].OneofWrappers = []interface{}{} file_api_v1_boot_proto_msgTypes[11].OneofWrappers = []interface{}{} @@ -1675,7 +1811,7 @@ func file_api_v1_boot_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_boot_proto_rawDesc, NumEnums: 1, - NumMessages: 17, + NumMessages: 19, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/api/v1/boot_grpc.pb.go b/pkg/api/v1/boot_grpc.pb.go index b3aa082f8..e041cbbad 100644 --- a/pkg/api/v1/boot_grpc.pb.go +++ b/pkg/api/v1/boot_grpc.pb.go @@ -24,6 +24,8 @@ type BootServiceClient interface { Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) + // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) // Report tells metal-api installation was either sucessful or failed Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) // If reinstall failed and tell metal-api to restore to previous state @@ -65,6 +67,15 @@ func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegiste return out, nil } +func (c *bootServiceClient) FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) { + out := new(SuperUserPasswordResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/FetchSuperUserPassword", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *bootServiceClient) Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) { out := new(BootServiceReportResponse) err := c.cc.Invoke(ctx, "/api.v1.BootService/Report", in, out, opts...) @@ -93,6 +104,8 @@ type BootServiceServer interface { Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) + // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) // Report tells metal-api installation was either sucessful or failed Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) // If reinstall failed and tell metal-api to restore to previous state @@ -112,6 +125,9 @@ func (UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequ func (UnimplementedBootServiceServer) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") } +func (UnimplementedBootServiceServer) FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchSuperUserPassword not implemented") +} func (UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") } @@ -184,6 +200,24 @@ func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _BootService_FetchSuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SuperUserPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BootServiceServer).FetchSuperUserPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/api.v1.BootService/FetchSuperUserPassword", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BootServiceServer).FetchSuperUserPassword(ctx, req.(*SuperUserPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _BootService_Report_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BootServiceReportRequest) if err := dec(in); err != nil { @@ -239,6 +273,10 @@ var BootService_ServiceDesc = grpc.ServiceDesc{ MethodName: "Register", Handler: _BootService_Register_Handler, }, + { + MethodName: "FetchSuperUserPassword", + Handler: _BootService_FetchSuperUserPassword_Handler, + }, { MethodName: "Report", Handler: _BootService_Report_Handler, diff --git a/pkg/api/v1/supwd.pb.go b/pkg/api/v1/supwd.pb.go deleted file mode 100644 index 718b58319..000000000 --- a/pkg/api/v1/supwd.pb.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc (unknown) -// source: api/v1/supwd.proto - -package v1 - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type SuperUserPasswordRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *SuperUserPasswordRequest) Reset() { - *x = SuperUserPasswordRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_supwd_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SuperUserPasswordRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuperUserPasswordRequest) ProtoMessage() {} - -func (x *SuperUserPasswordRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_supwd_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuperUserPasswordRequest.ProtoReflect.Descriptor instead. -func (*SuperUserPasswordRequest) Descriptor() ([]byte, []int) { - return file_api_v1_supwd_proto_rawDescGZIP(), []int{0} -} - -type SuperUserPasswordResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - FeatureDisabled bool `protobuf:"varint,1,opt,name=feature_disabled,json=featureDisabled,proto3" json:"feature_disabled,omitempty"` - SuperUserPassword string `protobuf:"bytes,2,opt,name=super_user_password,json=superUserPassword,proto3" json:"super_user_password,omitempty"` -} - -func (x *SuperUserPasswordResponse) Reset() { - *x = SuperUserPasswordResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_api_v1_supwd_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SuperUserPasswordResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SuperUserPasswordResponse) ProtoMessage() {} - -func (x *SuperUserPasswordResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_v1_supwd_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SuperUserPasswordResponse.ProtoReflect.Descriptor instead. -func (*SuperUserPasswordResponse) Descriptor() ([]byte, []int) { - return file_api_v1_supwd_proto_rawDescGZIP(), []int{1} -} - -func (x *SuperUserPasswordResponse) GetFeatureDisabled() bool { - if x != nil { - return x.FeatureDisabled - } - return false -} - -func (x *SuperUserPasswordResponse) GetSuperUserPassword() string { - if x != nil { - return x.SuperUserPassword - } - return "" -} - -var File_api_v1_supwd_proto protoreflect.FileDescriptor - -var file_api_v1_supwd_proto_rawDesc = []byte{ - 0x0a, 0x12, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x75, 0x70, 0x77, 0x64, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x22, 0x1a, 0x0a, 0x18, - 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, 0x76, 0x0a, 0x19, 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, 0x72, 0x0a, 0x11, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5d, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, - 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_api_v1_supwd_proto_rawDescOnce sync.Once - file_api_v1_supwd_proto_rawDescData = file_api_v1_supwd_proto_rawDesc -) - -func file_api_v1_supwd_proto_rawDescGZIP() []byte { - file_api_v1_supwd_proto_rawDescOnce.Do(func() { - file_api_v1_supwd_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v1_supwd_proto_rawDescData) - }) - return file_api_v1_supwd_proto_rawDescData -} - -var file_api_v1_supwd_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_api_v1_supwd_proto_goTypes = []interface{}{ - (*SuperUserPasswordRequest)(nil), // 0: api.v1.SuperUserPasswordRequest - (*SuperUserPasswordResponse)(nil), // 1: api.v1.SuperUserPasswordResponse -} -var file_api_v1_supwd_proto_depIdxs = []int32{ - 0, // 0: api.v1.SuperUserPassword.FetchSuperUserPassword:input_type -> api.v1.SuperUserPasswordRequest - 1, // 1: api.v1.SuperUserPassword.FetchSuperUserPassword:output_type -> api.v1.SuperUserPasswordResponse - 1, // [1:2] is the sub-list for method output_type - 0, // [0:1] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_api_v1_supwd_proto_init() } -func file_api_v1_supwd_proto_init() { - if File_api_v1_supwd_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_api_v1_supwd_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuperUserPasswordRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_api_v1_supwd_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuperUserPasswordResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_api_v1_supwd_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_api_v1_supwd_proto_goTypes, - DependencyIndexes: file_api_v1_supwd_proto_depIdxs, - MessageInfos: file_api_v1_supwd_proto_msgTypes, - }.Build() - File_api_v1_supwd_proto = out.File - file_api_v1_supwd_proto_rawDesc = nil - file_api_v1_supwd_proto_goTypes = nil - file_api_v1_supwd_proto_depIdxs = nil -} diff --git a/pkg/api/v1/supwd_grpc.pb.go b/pkg/api/v1/supwd_grpc.pb.go deleted file mode 100644 index 88f8574ba..000000000 --- a/pkg/api/v1/supwd_grpc.pb.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by protoc-gen-go-grpc. DO NOT EDIT. - -package v1 - -import ( - context "context" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" -) - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.32.0 or later. -const _ = grpc.SupportPackageIsVersion7 - -// SuperUserPasswordClient is the client API for SuperUserPassword service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type SuperUserPasswordClient interface { - FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) -} - -type superUserPasswordClient struct { - cc grpc.ClientConnInterface -} - -func NewSuperUserPasswordClient(cc grpc.ClientConnInterface) SuperUserPasswordClient { - return &superUserPasswordClient{cc} -} - -func (c *superUserPasswordClient) FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) { - out := new(SuperUserPasswordResponse) - err := c.cc.Invoke(ctx, "/api.v1.SuperUserPassword/FetchSuperUserPassword", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// SuperUserPasswordServer is the server API for SuperUserPassword service. -// All implementations should embed UnimplementedSuperUserPasswordServer -// for forward compatibility -type SuperUserPasswordServer interface { - FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) -} - -// UnimplementedSuperUserPasswordServer should be embedded to have forward compatible implementations. -type UnimplementedSuperUserPasswordServer struct { -} - -func (UnimplementedSuperUserPasswordServer) FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSuperUserPassword not implemented") -} - -// UnsafeSuperUserPasswordServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to SuperUserPasswordServer will -// result in compilation errors. -type UnsafeSuperUserPasswordServer interface { - mustEmbedUnimplementedSuperUserPasswordServer() -} - -func RegisterSuperUserPasswordServer(s grpc.ServiceRegistrar, srv SuperUserPasswordServer) { - s.RegisterService(&SuperUserPassword_ServiceDesc, srv) -} - -func _SuperUserPassword_FetchSuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuperUserPasswordRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/api.v1.SuperUserPassword/FetchSuperUserPassword", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(SuperUserPasswordServer).FetchSuperUserPassword(ctx, req.(*SuperUserPasswordRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// SuperUserPassword_ServiceDesc is the grpc.ServiceDesc for SuperUserPassword service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var SuperUserPassword_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "api.v1.SuperUserPassword", - HandlerType: (*SuperUserPasswordServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "FetchSuperUserPassword", - Handler: _SuperUserPassword_FetchSuperUserPassword_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "api/v1/supwd.proto", -} diff --git a/proto/api/v1/boot.proto b/proto/api/v1/boot.proto index 560319fe5..641f5f1ee 100644 --- a/proto/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -11,6 +11,8 @@ service BootService { rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine rpc Register(BootServiceRegisterRequest) returns (BootServiceRegisterResponse) {} + // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + rpc FetchSuperUserPassword(SuperUserPasswordRequest) returns (SuperUserPasswordResponse); // Report tells metal-api installation was either sucessful or failed rpc Report(BootServiceReportRequest) returns (BootServiceReportResponse) {} // If reinstall failed and tell metal-api to restore to previous state @@ -127,3 +129,9 @@ message BootServiceAbortReinstallRequest { message BootServiceAbortReinstallResponse { BootInfo boot_info = 1; } +message SuperUserPasswordRequest {} + +message SuperUserPasswordResponse { + bool feature_disabled = 1; + string super_user_password = 2; +} diff --git a/proto/api/v1/supwd.proto b/proto/api/v1/supwd.proto deleted file mode 100644 index db9681196..000000000 --- a/proto/api/v1/supwd.proto +++ /dev/null @@ -1,16 +0,0 @@ -syntax = "proto3"; - -package api.v1; - -option go_package = "./v1"; - -message SuperUserPasswordRequest {} - -message SuperUserPasswordResponse { - bool feature_disabled = 1; - string super_user_password = 2; -} - -service SuperUserPassword { - rpc FetchSuperUserPassword(SuperUserPasswordRequest) returns (SuperUserPasswordResponse); -} diff --git a/proto/api/v1/wait.proto b/proto/api/v1/wait.proto index 6f85e7181..260e016c4 100644 --- a/proto/api/v1/wait.proto +++ b/proto/api/v1/wait.proto @@ -11,5 +11,6 @@ message WaitRequest { message KeepPatientResponse {} service Wait { + // FIXME move to boot.proto rpc Wait(WaitRequest) returns (stream KeepPatientResponse); } From 24c82cf77c5c6798bc7826208c46ad633d3527f7 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 10:52:37 +0200 Subject: [PATCH 33/42] add missing comment --- pkg/api/v1/wait_grpc.pb.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/v1/wait_grpc.pb.go b/pkg/api/v1/wait_grpc.pb.go index 5e010d74a..e1daa1040 100644 --- a/pkg/api/v1/wait_grpc.pb.go +++ b/pkg/api/v1/wait_grpc.pb.go @@ -18,6 +18,7 @@ const _ = grpc.SupportPackageIsVersion7 // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type WaitClient interface { + // FIXME move to boot.proto Wait(ctx context.Context, in *WaitRequest, opts ...grpc.CallOption) (Wait_WaitClient, error) } @@ -65,6 +66,7 @@ func (x *waitWaitClient) Recv() (*KeepPatientResponse, error) { // All implementations should embed UnimplementedWaitServer // for forward compatibility type WaitServer interface { + // FIXME move to boot.proto Wait(*WaitRequest, Wait_WaitServer) error } From 3cec500f41f248ade43f0e16b2701165c43aa1f8 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 11:00:05 +0200 Subject: [PATCH 34/42] Naming --- cmd/metal-api/internal/grpc/boot-service.go | 4 +- pkg/api/v1/boot.pb.go | 188 ++++++++++---------- pkg/api/v1/boot_grpc.pb.go | 54 +++--- proto/api/v1/boot.proto | 8 +- 4 files changed, 128 insertions(+), 126 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 99c87987e..d8665238a 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -274,10 +274,10 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR }, nil } -func (b *BootService) FetchSuperUserPassword(ctx context.Context, req *v1.SuperUserPasswordRequest) (*v1.SuperUserPasswordResponse, error) { +func (b *BootService) SuperUserPassword(ctx context.Context, req *v1.BootServiceSuperUserPasswordRequest) (*v1.BootServiceSuperUserPasswordResponse, error) { defer ctx.Done() - resp := &v1.SuperUserPasswordResponse{} + resp := &v1.BootServiceSuperUserPasswordResponse{} if b.pwdFile == "" { resp.FeatureDisabled = true return resp, nil diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index 784f51a27..ebce9d5f3 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -1194,14 +1194,14 @@ func (x *BootServiceAbortReinstallResponse) GetBootInfo() *BootInfo { return nil } -type SuperUserPasswordRequest struct { +type BootServiceSuperUserPasswordRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields } -func (x *SuperUserPasswordRequest) Reset() { - *x = SuperUserPasswordRequest{} +func (x *BootServiceSuperUserPasswordRequest) Reset() { + *x = BootServiceSuperUserPasswordRequest{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_boot_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1209,13 +1209,13 @@ func (x *SuperUserPasswordRequest) Reset() { } } -func (x *SuperUserPasswordRequest) String() string { +func (x *BootServiceSuperUserPasswordRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SuperUserPasswordRequest) ProtoMessage() {} +func (*BootServiceSuperUserPasswordRequest) ProtoMessage() {} -func (x *SuperUserPasswordRequest) ProtoReflect() protoreflect.Message { +func (x *BootServiceSuperUserPasswordRequest) ProtoReflect() protoreflect.Message { mi := &file_api_v1_boot_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1227,12 +1227,12 @@ func (x *SuperUserPasswordRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SuperUserPasswordRequest.ProtoReflect.Descriptor instead. -func (*SuperUserPasswordRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use BootServiceSuperUserPasswordRequest.ProtoReflect.Descriptor instead. +func (*BootServiceSuperUserPasswordRequest) Descriptor() ([]byte, []int) { return file_api_v1_boot_proto_rawDescGZIP(), []int{17} } -type SuperUserPasswordResponse struct { +type BootServiceSuperUserPasswordResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1241,8 +1241,8 @@ type SuperUserPasswordResponse struct { SuperUserPassword string `protobuf:"bytes,2,opt,name=super_user_password,json=superUserPassword,proto3" json:"super_user_password,omitempty"` } -func (x *SuperUserPasswordResponse) Reset() { - *x = SuperUserPasswordResponse{} +func (x *BootServiceSuperUserPasswordResponse) Reset() { + *x = BootServiceSuperUserPasswordResponse{} if protoimpl.UnsafeEnabled { mi := &file_api_v1_boot_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1250,13 +1250,13 @@ func (x *SuperUserPasswordResponse) Reset() { } } -func (x *SuperUserPasswordResponse) String() string { +func (x *BootServiceSuperUserPasswordResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SuperUserPasswordResponse) ProtoMessage() {} +func (*BootServiceSuperUserPasswordResponse) ProtoMessage() {} -func (x *SuperUserPasswordResponse) ProtoReflect() protoreflect.Message { +func (x *BootServiceSuperUserPasswordResponse) ProtoReflect() protoreflect.Message { mi := &file_api_v1_boot_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1268,19 +1268,19 @@ func (x *SuperUserPasswordResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SuperUserPasswordResponse.ProtoReflect.Descriptor instead. -func (*SuperUserPasswordResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use BootServiceSuperUserPasswordResponse.ProtoReflect.Descriptor instead. +func (*BootServiceSuperUserPasswordResponse) Descriptor() ([]byte, []int) { return file_api_v1_boot_proto_rawDescGZIP(), []int{18} } -func (x *SuperUserPasswordResponse) GetFeatureDisabled() bool { +func (x *BootServiceSuperUserPasswordResponse) GetFeatureDisabled() bool { if x != nil { return x.FeatureDisabled } return false } -func (x *SuperUserPasswordResponse) GetSuperUserPassword() string { +func (x *BootServiceSuperUserPasswordResponse) GetSuperUserPassword() string { if x != nil { return x.SuperUserPassword } @@ -1449,57 +1449,59 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 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, 0x1a, 0x0a, 0x18, 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, 0x76, 0x0a, - 0x19, 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, 0x2a, 0x67, 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, - 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0x93, - 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, 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, 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, 0x5d, 0x0a, 0x16, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x53, 0x75, 0x70, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x53, + 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, 0x2a, 0x67, 0x0a, 0x0d, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, + 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, + 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, + 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, + 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, + 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xa4, 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, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, - 0x2e, 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, 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, + 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, 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, + 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, 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, 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, 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 ( @@ -1517,26 +1519,26 @@ func file_api_v1_boot_proto_rawDescGZIP() []byte { var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_api_v1_boot_proto_goTypes = []interface{}{ - (RegisterState)(0), // 0: api.v1.RegisterState - (*BootServiceDhcpRequest)(nil), // 1: api.v1.BootServiceDhcpRequest - (*BootServiceDhcpResponse)(nil), // 2: api.v1.BootServiceDhcpResponse - (*BootServiceBootRequest)(nil), // 3: api.v1.BootServiceBootRequest - (*BootServiceBootResponse)(nil), // 4: api.v1.BootServiceBootResponse - (*BootServiceRegisterRequest)(nil), // 5: api.v1.BootServiceRegisterRequest - (*BootServiceRegisterResponse)(nil), // 6: api.v1.BootServiceRegisterResponse - (*MachineHardware)(nil), // 7: api.v1.MachineHardware - (*MachineNic)(nil), // 8: api.v1.MachineNic - (*MachineBlockDevice)(nil), // 9: api.v1.MachineBlockDevice - (*MachineBIOS)(nil), // 10: api.v1.MachineBIOS - (*MachineIPMI)(nil), // 11: api.v1.MachineIPMI - (*MachineFRU)(nil), // 12: api.v1.MachineFRU - (*BootServiceReportRequest)(nil), // 13: api.v1.BootServiceReportRequest - (*BootServiceReportResponse)(nil), // 14: api.v1.BootServiceReportResponse - (*BootInfo)(nil), // 15: api.v1.BootInfo - (*BootServiceAbortReinstallRequest)(nil), // 16: api.v1.BootServiceAbortReinstallRequest - (*BootServiceAbortReinstallResponse)(nil), // 17: api.v1.BootServiceAbortReinstallResponse - (*SuperUserPasswordRequest)(nil), // 18: api.v1.SuperUserPasswordRequest - (*SuperUserPasswordResponse)(nil), // 19: api.v1.SuperUserPasswordResponse + (RegisterState)(0), // 0: api.v1.RegisterState + (*BootServiceDhcpRequest)(nil), // 1: api.v1.BootServiceDhcpRequest + (*BootServiceDhcpResponse)(nil), // 2: api.v1.BootServiceDhcpResponse + (*BootServiceBootRequest)(nil), // 3: api.v1.BootServiceBootRequest + (*BootServiceBootResponse)(nil), // 4: api.v1.BootServiceBootResponse + (*BootServiceRegisterRequest)(nil), // 5: api.v1.BootServiceRegisterRequest + (*BootServiceRegisterResponse)(nil), // 6: api.v1.BootServiceRegisterResponse + (*MachineHardware)(nil), // 7: api.v1.MachineHardware + (*MachineNic)(nil), // 8: api.v1.MachineNic + (*MachineBlockDevice)(nil), // 9: api.v1.MachineBlockDevice + (*MachineBIOS)(nil), // 10: api.v1.MachineBIOS + (*MachineIPMI)(nil), // 11: api.v1.MachineIPMI + (*MachineFRU)(nil), // 12: api.v1.MachineFRU + (*BootServiceReportRequest)(nil), // 13: api.v1.BootServiceReportRequest + (*BootServiceReportResponse)(nil), // 14: api.v1.BootServiceReportResponse + (*BootInfo)(nil), // 15: api.v1.BootInfo + (*BootServiceAbortReinstallRequest)(nil), // 16: api.v1.BootServiceAbortReinstallRequest + (*BootServiceAbortReinstallResponse)(nil), // 17: api.v1.BootServiceAbortReinstallResponse + (*BootServiceSuperUserPasswordRequest)(nil), // 18: api.v1.BootServiceSuperUserPasswordRequest + (*BootServiceSuperUserPasswordResponse)(nil), // 19: api.v1.BootServiceSuperUserPasswordResponse } var file_api_v1_boot_proto_depIdxs = []int32{ 7, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware @@ -1551,14 +1553,14 @@ var file_api_v1_boot_proto_depIdxs = []int32{ 15, // 9: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo 1, // 10: api.v1.BootService.Dhcp:input_type -> api.v1.BootServiceDhcpRequest 3, // 11: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest - 5, // 12: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest - 18, // 13: api.v1.BootService.FetchSuperUserPassword:input_type -> api.v1.SuperUserPasswordRequest + 18, // 12: api.v1.BootService.SuperUserPassword:input_type -> api.v1.BootServiceSuperUserPasswordRequest + 5, // 13: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest 13, // 14: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest 16, // 15: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest 2, // 16: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse 4, // 17: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse - 6, // 18: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse - 19, // 19: api.v1.BootService.FetchSuperUserPassword:output_type -> api.v1.SuperUserPasswordResponse + 19, // 18: api.v1.BootService.SuperUserPassword:output_type -> api.v1.BootServiceSuperUserPasswordResponse + 6, // 19: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse 14, // 20: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse 17, // 21: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse 16, // [16:22] is the sub-list for method output_type @@ -1779,7 +1781,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuperUserPasswordRequest); i { + switch v := v.(*BootServiceSuperUserPasswordRequest); i { case 0: return &v.state case 1: @@ -1791,7 +1793,7 @@ func file_api_v1_boot_proto_init() { } } file_api_v1_boot_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SuperUserPasswordResponse); i { + switch v := v.(*BootServiceSuperUserPasswordResponse); i { case 0: return &v.state case 1: diff --git a/pkg/api/v1/boot_grpc.pb.go b/pkg/api/v1/boot_grpc.pb.go index e041cbbad..48dae38c2 100644 --- a/pkg/api/v1/boot_grpc.pb.go +++ b/pkg/api/v1/boot_grpc.pb.go @@ -22,10 +22,10 @@ type BootServiceClient interface { Dhcp(ctx context.Context, in *BootServiceDhcpRequest, opts ...grpc.CallOption) (*BootServiceDhcpResponse, error) // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(ctx context.Context, in *BootServiceBootRequest, opts ...grpc.CallOption) (*BootServiceBootResponse, error) + // SuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + SuperUserPassword(ctx context.Context, in *BootServiceSuperUserPasswordRequest, opts ...grpc.CallOption) (*BootServiceSuperUserPasswordResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) - // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly - FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) // Report tells metal-api installation was either sucessful or failed Report(ctx context.Context, in *BootServiceReportRequest, opts ...grpc.CallOption) (*BootServiceReportResponse, error) // If reinstall failed and tell metal-api to restore to previous state @@ -58,18 +58,18 @@ func (c *bootServiceClient) Boot(ctx context.Context, in *BootServiceBootRequest return out, nil } -func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) { - out := new(BootServiceRegisterResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/Register", in, out, opts...) +func (c *bootServiceClient) SuperUserPassword(ctx context.Context, in *BootServiceSuperUserPasswordRequest, opts ...grpc.CallOption) (*BootServiceSuperUserPasswordResponse, error) { + out := new(BootServiceSuperUserPasswordResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/SuperUserPassword", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *bootServiceClient) FetchSuperUserPassword(ctx context.Context, in *SuperUserPasswordRequest, opts ...grpc.CallOption) (*SuperUserPasswordResponse, error) { - out := new(SuperUserPasswordResponse) - err := c.cc.Invoke(ctx, "/api.v1.BootService/FetchSuperUserPassword", in, out, opts...) +func (c *bootServiceClient) Register(ctx context.Context, in *BootServiceRegisterRequest, opts ...grpc.CallOption) (*BootServiceRegisterResponse, error) { + out := new(BootServiceRegisterResponse) + err := c.cc.Invoke(ctx, "/api.v1.BootService/Register", in, out, opts...) if err != nil { return nil, err } @@ -102,10 +102,10 @@ type BootServiceServer interface { Dhcp(context.Context, *BootServiceDhcpRequest) (*BootServiceDhcpResponse, error) // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) + // SuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + SuperUserPassword(context.Context, *BootServiceSuperUserPasswordRequest) (*BootServiceSuperUserPasswordResponse, error) // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) - // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly - FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) // Report tells metal-api installation was either sucessful or failed Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) // If reinstall failed and tell metal-api to restore to previous state @@ -122,12 +122,12 @@ func (UnimplementedBootServiceServer) Dhcp(context.Context, *BootServiceDhcpRequ func (UnimplementedBootServiceServer) Boot(context.Context, *BootServiceBootRequest) (*BootServiceBootResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Boot not implemented") } +func (UnimplementedBootServiceServer) SuperUserPassword(context.Context, *BootServiceSuperUserPasswordRequest) (*BootServiceSuperUserPasswordResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SuperUserPassword not implemented") +} func (UnimplementedBootServiceServer) Register(context.Context, *BootServiceRegisterRequest) (*BootServiceRegisterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") } -func (UnimplementedBootServiceServer) FetchSuperUserPassword(context.Context, *SuperUserPasswordRequest) (*SuperUserPasswordResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSuperUserPassword not implemented") -} func (UnimplementedBootServiceServer) Report(context.Context, *BootServiceReportRequest) (*BootServiceReportResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Report not implemented") } @@ -182,38 +182,38 @@ func _BootService_Boot_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(BootServiceRegisterRequest) +func _BootService_SuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceSuperUserPasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BootServiceServer).Register(ctx, in) + return srv.(BootServiceServer).SuperUserPassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.v1.BootService/Register", + FullMethod: "/api.v1.BootService/SuperUserPassword", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).Register(ctx, req.(*BootServiceRegisterRequest)) + return srv.(BootServiceServer).SuperUserPassword(ctx, req.(*BootServiceSuperUserPasswordRequest)) } return interceptor(ctx, in, info, handler) } -func _BootService_FetchSuperUserPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SuperUserPasswordRequest) +func _BootService_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BootServiceRegisterRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(BootServiceServer).FetchSuperUserPassword(ctx, in) + return srv.(BootServiceServer).Register(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api.v1.BootService/FetchSuperUserPassword", + FullMethod: "/api.v1.BootService/Register", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(BootServiceServer).FetchSuperUserPassword(ctx, req.(*SuperUserPasswordRequest)) + return srv.(BootServiceServer).Register(ctx, req.(*BootServiceRegisterRequest)) } return interceptor(ctx, in, info, handler) } @@ -270,12 +270,12 @@ var BootService_ServiceDesc = grpc.ServiceDesc{ Handler: _BootService_Boot_Handler, }, { - MethodName: "Register", - Handler: _BootService_Register_Handler, + MethodName: "SuperUserPassword", + Handler: _BootService_SuperUserPassword_Handler, }, { - MethodName: "FetchSuperUserPassword", - Handler: _BootService_FetchSuperUserPassword_Handler, + MethodName: "Register", + Handler: _BootService_Register_Handler, }, { MethodName: "Report", diff --git a/proto/api/v1/boot.proto b/proto/api/v1/boot.proto index 641f5f1ee..bcb672a35 100644 --- a/proto/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -9,10 +9,10 @@ service BootService { rpc Dhcp(BootServiceDhcpRequest) returns (BootServiceDhcpResponse) {} // Boot is called from pixie once the machine got the first dhcp response and ipxie asks for subsequent kernel and initrd rpc Boot(BootServiceBootRequest) returns (BootServiceBootResponse) {} + // SuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly + rpc SuperUserPassword(BootServiceSuperUserPasswordRequest) returns (BootServiceSuperUserPasswordResponse); // Register is called from metal-hammer after hardware inventory is finished, tells metal-api all glory details about that machine rpc Register(BootServiceRegisterRequest) returns (BootServiceRegisterResponse) {} - // FetchSuperUserPassword metal-hammer takes the configured root password for the bmc from metal-api and configure the bmc accordingly - rpc FetchSuperUserPassword(SuperUserPasswordRequest) returns (SuperUserPasswordResponse); // Report tells metal-api installation was either sucessful or failed rpc Report(BootServiceReportRequest) returns (BootServiceReportResponse) {} // If reinstall failed and tell metal-api to restore to previous state @@ -129,9 +129,9 @@ message BootServiceAbortReinstallRequest { message BootServiceAbortReinstallResponse { BootInfo boot_info = 1; } -message SuperUserPasswordRequest {} +message BootServiceSuperUserPasswordRequest {} -message SuperUserPasswordResponse { +message BootServiceSuperUserPasswordResponse { bool feature_disabled = 1; string super_user_password = 2; } From 8f4f8a18a47ebd54f9e57a1d09070767124d6529 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 11:43:59 +0200 Subject: [PATCH 35/42] Log supwd req --- cmd/metal-api/internal/grpc/boot-service.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index d8665238a..dcccc989c 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -275,6 +275,7 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR } func (b *BootService) SuperUserPassword(ctx context.Context, req *v1.BootServiceSuperUserPasswordRequest) (*v1.BootServiceSuperUserPasswordResponse, error) { + b.log.Infow("superuserpassword", "req", req) defer ctx.Done() resp := &v1.BootServiceSuperUserPasswordResponse{} From df05de76199c4a8aeccfd5ef06332ea17c7cb047 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 14:47:35 +0200 Subject: [PATCH 36/42] Store version of metalhammer in the machinestate --- cmd/metal-api/internal/grpc/boot-service.go | 3 +- cmd/metal-api/internal/metal/machine.go | 5 +- cmd/metal-api/internal/service/v1/machine.go | 5 +- pkg/api/v1/boot.pb.go | 379 ++++++++++--------- proto/api/v1/boot.proto | 1 + 5 files changed, 204 insertions(+), 189 deletions(-) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index dcccc989c..0e183a32b 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -193,7 +193,8 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR Date: req.Bios.Date, }, State: metal.MachineState{ - Value: metal.AvailableState, + Value: metal.AvailableState, + MetalHammerVersion: req.MetalHammerVersion, }, LEDState: metal.ChassisIdentifyLEDState{ Value: metal.LEDStateOff, diff --git a/cmd/metal-api/internal/metal/machine.go b/cmd/metal-api/internal/metal/machine.go index 0026f0c97..10ab07fad 100644 --- a/cmd/metal-api/internal/metal/machine.go +++ b/cmd/metal-api/internal/metal/machine.go @@ -44,8 +44,9 @@ var ( // the machine will be available for allocation. In all other cases the allocation // must explicitly point to this machine. type MachineState struct { - Value MState `rethinkdb:"value" json:"value"` - Description string `rethinkdb:"description" json:"description"` + Value MState `rethinkdb:"value" json:"value"` + Description string `rethinkdb:"description" json:"description"` + MetalHammerVersion string `rethinkdb:"metal_hammer_version" json:"metal_hammer_version"` } // MachineStateFrom converts a machineState string to the type diff --git a/cmd/metal-api/internal/service/v1/machine.go b/cmd/metal-api/internal/service/v1/machine.go index 01a075d63..1d0238591 100644 --- a/cmd/metal-api/internal/service/v1/machine.go +++ b/cmd/metal-api/internal/service/v1/machine.go @@ -84,8 +84,9 @@ type MachineHardware struct { } type MachineState struct { - Value string `json:"value" description:"the state of this machine. empty means available for all"` - Description string `json:"description" description:"a description why this machine is in the given state"` + Value string `json:"value" description:"the state of this machine. empty means available for all"` + Description string `json:"description" description:"a description why this machine is in the given state"` + MetalHammerVersion string `json:"metal_hammer_version" description:"the version of metal hammer which put the machine in waiting state"` } type ChassisIdentifyLEDState struct { diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index ebce9d5f3..fb7b45466 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -277,11 +277,12 @@ type BootServiceRegisterRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Hardware *MachineHardware `protobuf:"bytes,2,opt,name=hardware,proto3" json:"hardware,omitempty"` - Bios *MachineBIOS `protobuf:"bytes,3,opt,name=bios,proto3" json:"bios,omitempty"` - Ipmi *MachineIPMI `protobuf:"bytes,4,opt,name=ipmi,proto3" json:"ipmi,omitempty"` - Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Hardware *MachineHardware `protobuf:"bytes,2,opt,name=hardware,proto3" json:"hardware,omitempty"` + Bios *MachineBIOS `protobuf:"bytes,3,opt,name=bios,proto3" json:"bios,omitempty"` + Ipmi *MachineIPMI `protobuf:"bytes,4,opt,name=ipmi,proto3" json:"ipmi,omitempty"` + Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"` + MetalHammerVersion string `protobuf:"bytes,6,opt,name=metal_hammer_version,json=metalHammerVersion,proto3" json:"metal_hammer_version,omitempty"` } func (x *BootServiceRegisterRequest) Reset() { @@ -351,6 +352,13 @@ func (x *BootServiceRegisterRequest) GetTags() []string { return nil } +func (x *BootServiceRegisterRequest) GetMetalHammerVersion() string { + if x != nil { + return x.MetalHammerVersion + } + return "" +} + type BootServiceRegisterResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1309,7 +1317,7 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x52, 0x61, 0x6d, 0x44, 0x69, 0x73, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x07, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x88, 0x01, 0x01, 0x42, 0x0a, 0x0a, 0x08, - 0x5f, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xcb, 0x01, 0x0a, 0x1a, 0x42, 0x6f, 0x6f, + 0x5f, 0x63, 0x6d, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0xfd, 0x01, 0x0a, 0x1a, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x33, 0x0a, 0x08, 0x68, @@ -1322,186 +1330,189 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x49, 0x50, 0x4d, 0x49, 0x52, 0x04, 0x69, 0x70, 0x6d, 0x69, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, - 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, - 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x21, - 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x22, - 0xa0, 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, 0x22, 0x64, 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, 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, 0x2a, 0x67, 0x0a, 0x0d, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1e, 0x0a, - 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1a, 0x0a, - 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, - 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, - 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, 0x44, 0x41, - 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xa4, 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, + 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, + 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x48, 0x61, 0x6d, 0x6d, 0x65, + 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x22, 0xa0, 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, 0x22, 0x64, 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, 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, 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, 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, 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, + 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, 0x2a, 0x67, + 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, + 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, + 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xa4, 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, 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, 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, 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, + 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, 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 bcb672a35..f4fc186de 100644 --- a/proto/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -42,6 +42,7 @@ message BootServiceRegisterRequest { MachineBIOS bios = 3; MachineIPMI ipmi = 4; repeated string tags = 5; + string metal_hammer_version = 6; } message BootServiceRegisterResponse { From 5cbc32ca6151a4294703a946ff7e4f823cd2e23f Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Tue, 31 May 2022 15:05:48 +0200 Subject: [PATCH 37/42] spec --- spec/metal-api.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/metal-api.json b/spec/metal-api.json index 97b8a4d8c..8cce75046 100644 --- a/spec/metal-api.json +++ b/spec/metal-api.json @@ -2897,6 +2897,10 @@ "description": "a description why this machine is in the given state", "type": "string" }, + "metal_hammer_version": { + "description": "the version of metal hammer which put the machine in waiting state", + "type": "string" + }, "value": { "description": "the state of this machine. empty means available for all", "type": "string" @@ -2904,6 +2908,7 @@ }, "required": [ "description", + "metal_hammer_version", "value" ] }, From 9452b54be4a1932b4d62e1e6624348cfd6650872 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Thu, 9 Jun 2022 09:58:14 +0200 Subject: [PATCH 38/42] last updates --- .github/workflows/pull_request.yaml | 2 +- go.mod | 10 +++++----- go.sum | 19 ++++++++++--------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 3d7bcf329..436fffc46 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -62,7 +62,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 - - name: Set up Go 1.17 + - name: Set up Go 1.18 uses: actions/setup-go@v2 with: go-version: '1.18.x' diff --git a/go.mod b/go.mod index 37c755f99..9632c9bae 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/aws/aws-sdk-go v1.44.24 github.com/dustin/go-humanize v1.0.0 github.com/emicklei/go-restful-openapi/v2 v2.9.0 - github.com/emicklei/go-restful/v3 v3.7.4 + github.com/emicklei/go-restful/v3 v3.8.0 github.com/go-logr/zapr v1.2.3 github.com/go-openapi/spec v0.20.6 github.com/go-stack/stack v1.8.1 @@ -25,13 +25,13 @@ require ( github.com/prometheus/client_golang v1.12.2 github.com/spf13/cobra v1.4.0 github.com/spf13/viper v1.12.0 - github.com/stretchr/testify v1.7.1 + github.com/stretchr/testify v1.7.2 github.com/testcontainers/testcontainers-go v0.13.0 go.uber.org/multierr v1.8.0 go.uber.org/zap v1.21.0 golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e - golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 - google.golang.org/grpc v1.46.2 + golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f + google.golang.org/grpc v1.47.0 google.golang.org/protobuf v1.28.0 gopkg.in/rethinkdb/rethinkdb-go.v6 v6.2.1 ) @@ -129,6 +129,6 @@ require ( gopkg.in/ini.v1 v1.66.4 // indirect gopkg.in/square/go-jose.v2 v2.6.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect - gopkg.in/yaml.v3 v3.0.0 // indirect + gopkg.in/yaml.v3 v3.0.1 // indirect inet.af/netaddr v0.0.0-20210511181906-37180328850c // indirect ) diff --git a/go.sum b/go.sum index d0ecf5ca4..3bc2e4b2e 100644 --- a/go.sum +++ b/go.sum @@ -338,8 +338,8 @@ github.com/emicklei/go-restful-openapi/v2 v2.9.0/go.mod h1:VKNgZyYviM1hnyrjD9RDz github.com/emicklei/go-restful/v3 v3.7.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.7.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/emicklei/go-restful/v3 v3.7.3/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= -github.com/emicklei/go-restful/v3 v3.7.4 h1:PVGUqKvvMzQYiO89TdXrH9EMks+okTaRIMQ3jgMdZ30= -github.com/emicklei/go-restful/v3 v3.7.4/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= +github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+S609eVw= +github.com/emicklei/go-restful/v3 v3.8.0/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= @@ -989,8 +989,9 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI= github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -1230,8 +1231,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29 h1:w8s32wxx3sY+OjLlv9qltkLU5yvJzxjjgiHWLjdIcw4= -golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f h1:Ax0t5p6N38Ga0dThY21weqDEyz2oklo4IvDkpigvkD8= +golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1521,8 +1522,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= -google.golang.org/grpc v1.46.2 h1:u+MLGgVf7vRdjEYZ8wDFhAVNmhkbJ5hmrA1LMWK1CAQ= -google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= +google.golang.org/grpc v1.47.0 h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8= +google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1579,8 +1580,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0 h1:hjy8E9ON/egN1tAYqKb61G10WtihqetD4sz2H+8nIeA= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/gotestsum v1.7.0/go.mod h1:V1m4Jw3eBerhI/A6qCxUE07RnCg7ACkKj9BYcAm09V8= From 861701102e7cb2d792ca24eb7843e5759fdf28b3 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 10 Jun 2022 09:53:42 +0200 Subject: [PATCH 39/42] Ensure protoc runs in ci --- .github/workflows/latest.yaml | 2 +- .github/workflows/pull_request.yaml | 2 +- .github/workflows/release.yaml | 2 +- Makefile | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index f3906f124..c8a342246 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -20,7 +20,7 @@ jobs: - name: setup buf uses: bufbuild/buf-setup-action@v1 with: - version: '1.4.0' + version: '1.5.0' - name: lint proto files uses: bufbuild/buf-lint-action@v1 with: diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 436fffc46..fe9727ee3 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -20,7 +20,7 @@ jobs: - name: setup buf uses: bufbuild/buf-setup-action@v1 with: - version: '1.4.0' + version: '1.5.0' - name: lint proto files uses: bufbuild/buf-lint-action@v1 with: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index de42e2cc5..456d2534e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - name: setup buf uses: bufbuild/buf-setup-action@v1 with: - version: '1.4.0' + version: '1.5.0' - name: lint proto files uses: bufbuild/buf-lint-action@v1 with: diff --git a/Makefile b/Makefile index f5aa21ef0..2fd363621 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ MINI_LAB_KUBECONFIG := $(shell pwd)/../mini-lab/.kubeconfig include $(COMMONDIR)/Makefile.inc -release:: spec check-diff all ; +release:: protoc spec check-diff all ; .PHONY: spec spec: all @@ -27,8 +27,8 @@ protoc: .PHONY: protoc-docker protoc-docker: - docker pull bufbuild/buf:1.4.0 - docker run --rm --user $$(id -u):$$(id -g) -v $(PWD):/work --tmpfs /.cache -w /work/proto bufbuild/buf:1.4.0 generate -v + docker pull bufbuild/buf:1.5.0 + docker run --rm --user $$(id -u):$$(id -g) -v $(PWD):/work --tmpfs /.cache -w /work/proto bufbuild/buf:1.5.0 generate -v .PHONY: mini-lab-push mini-lab-push: From 40a1c1b6d3a47996cc130323adbfb562d29e521a Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 10 Jun 2022 10:40:04 +0200 Subject: [PATCH 40/42] Better protoc --- .github/workflows/latest.yaml | 9 +++------ .github/workflows/pull_request.yaml | 9 +++------ .github/workflows/release.yaml | 9 +++------ Makefile | 2 +- 4 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/latest.yaml b/.github/workflows/latest.yaml index c8a342246..dc3ef2543 100644 --- a/.github/workflows/latest.yaml +++ b/.github/workflows/latest.yaml @@ -21,13 +21,10 @@ jobs: uses: bufbuild/buf-setup-action@v1 with: version: '1.5.0' - - name: lint proto files - uses: bufbuild/buf-lint-action@v1 - with: - input: 'proto' - - name: generate proto + + - name: generate proto and lint working-directory: proto - run: buf generate -v + run: make protoc - name: Docker Login uses: docker/login-action@v1 diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index fe9727ee3..fafebed6e 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -21,13 +21,10 @@ jobs: uses: bufbuild/buf-setup-action@v1 with: version: '1.5.0' - - name: lint proto files - uses: bufbuild/buf-lint-action@v1 - with: - input: 'proto' - - name: generate proto + + - name: generate proto and lint working-directory: proto - run: buf generate -v + run: make protoc - name: Figure out if running fork PR id: fork diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 456d2534e..5ea3fc68e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -21,13 +21,10 @@ jobs: uses: bufbuild/buf-setup-action@v1 with: version: '1.5.0' - - name: lint proto files - uses: bufbuild/buf-lint-action@v1 - with: - input: 'proto' - - name: generate proto + + - name: generate proto and lint working-directory: proto - run: buf generate -v + run: make protoc - name: Docker Login uses: docker/login-action@v1 diff --git a/Makefile b/Makefile index 2fd363621..dea03b7a3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ MINI_LAB_KUBECONFIG := $(shell pwd)/../mini-lab/.kubeconfig include $(COMMONDIR)/Makefile.inc -release:: protoc spec check-diff all ; +release:: spec check-diff all ; .PHONY: spec spec: all From 4e7fe1167390506880aa139fb48adcde1f2266f9 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 10 Jun 2022 11:06:10 +0200 Subject: [PATCH 41/42] performance and refactoring switch logic a bit --- cmd/metal-api/internal/datastore/switch.go | 45 +++++++++---------- cmd/metal-api/internal/metal/switch.go | 23 ++++++++++ .../internal/service/switch-service_test.go | 2 +- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/cmd/metal-api/internal/datastore/switch.go b/cmd/metal-api/internal/datastore/switch.go index 3d2db6173..8c67d8bfc 100644 --- a/cmd/metal-api/internal/datastore/switch.go +++ b/cmd/metal-api/internal/datastore/switch.go @@ -66,6 +66,25 @@ func (rs *RethinkStore) SearchSwitches(rackid string, macs []string) ([]metal.Sw return ss, nil } +// SearchSwitchesByPartition searches for switches by the given partition. +func (rs *RethinkStore) SearchSwitchesByPartition(partitionID string) ([]metal.Switch, error) { + q := *rs.switchTable() + + if partitionID != "" { + q = q.Filter(func(row r.Term) r.Term { + return row.Field("partitionid").Eq(partitionID) + }) + } + + var ss []metal.Switch + err := rs.searchEntities(&q, &ss) + if err != nil { + return nil, err + } + + return ss, nil +} + // SearchSwitchesConnectedToMachine searches switches that are connected to the given machine. func (rs *RethinkStore) SearchSwitchesConnectedToMachine(m *metal.Machine) ([]metal.Switch, error) { switches, err := rs.SearchSwitches(m.RackID, nil) @@ -93,7 +112,7 @@ func (rs *RethinkStore) SetVrfAtSwitches(m *metal.Machine, vrf string) ([]metal. for i := range switches { sw := switches[i] oldSwitch := sw - setVrf(&sw, m.ID, vrf) + sw.SetVrfOfMachine(m, vrf) err := rs.UpdateSwitch(&oldSwitch, &sw) if err != nil { return nil, err @@ -103,30 +122,8 @@ func (rs *RethinkStore) SetVrfAtSwitches(m *metal.Machine, vrf string) ([]metal. return newSwitches, nil } -func setVrf(s *metal.Switch, mid, vrf string) { - affectedMacs := map[metal.MacAddress]bool{} - for _, c := range s.MachineConnections[mid] { - mac := c.Nic.MacAddress - affectedMacs[mac] = true - } - - if len(affectedMacs) == 0 { - return - } - - nics := metal.Nics{} - for mac, old := range s.Nics.ByMac() { - e := old - if _, ok := affectedMacs[mac]; ok { - e.Vrf = vrf - } - nics = append(nics, *e) - } - s.Nics = nics -} - func (rs *RethinkStore) ConnectMachineWithSwitches(m *metal.Machine) error { - switches, err := rs.SearchSwitches("", nil) + switches, err := rs.SearchSwitchesByPartition(m.PartitionID) if err != nil { return err } diff --git a/cmd/metal-api/internal/metal/switch.go b/cmd/metal-api/internal/metal/switch.go index cbd7b25ff..e27b265c5 100644 --- a/cmd/metal-api/internal/metal/switch.go +++ b/cmd/metal-api/internal/metal/switch.go @@ -101,3 +101,26 @@ func (s *Switch) ConnectMachine(machine *Machine) int { } return len(s.MachineConnections[machine.ID]) } + +// SetVrfOfMachine set port on switch where machine is connected to given vrf +func (s *Switch) SetVrfOfMachine(m *Machine, vrf string) { + affectedMacs := map[MacAddress]bool{} + for _, c := range s.MachineConnections[m.ID] { + mac := c.Nic.MacAddress + affectedMacs[mac] = true + } + + if len(affectedMacs) == 0 { + return + } + + nics := Nics{} + for mac, old := range s.Nics.ByMac() { + e := old + if _, ok := affectedMacs[mac]; ok { + e.Vrf = vrf + } + nics = append(nics, *e) + } + s.Nics = nics +} diff --git a/cmd/metal-api/internal/service/switch-service_test.go b/cmd/metal-api/internal/service/switch-service_test.go index 39d2f49fa..21adad692 100644 --- a/cmd/metal-api/internal/service/switch-service_test.go +++ b/cmd/metal-api/internal/service/switch-service_test.go @@ -260,7 +260,7 @@ func TestConnectMachineWithSwitches(t *testing.T) { for i := range tests { tt := tests[i] ds, mock := datastore.InitMockDB() - mock.On(r.DB("mockdb").Table("switch")).Return(testSwitches, nil) + mock.On(r.DB("mockdb").Table("switch").Filter(r.MockAnything())).Return(testSwitches, nil) mock.On(r.DB("mockdb").Table("switch").Get(r.MockAnything()).Replace(r.MockAnything())).Return(testdata.EmptyResult, nil) t.Run(tt.name, func(t *testing.T) { From 34f20f3761c9768d67b59cf7dfd749ed16f0d454 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Fri, 10 Jun 2022 12:55:30 +0200 Subject: [PATCH 42/42] Review round with gerrit --- cmd/metal-api/internal/datastore/size.go | 4 +- cmd/metal-api/internal/grpc/boot-service.go | 98 ++-- pkg/api/v1/boot.pb.go | 505 +++++++++----------- proto/api/v1/boot.proto | 7 - 4 files changed, 266 insertions(+), 348 deletions(-) diff --git a/cmd/metal-api/internal/datastore/size.go b/cmd/metal-api/internal/datastore/size.go index 4151b2aba..850e28d8e 100644 --- a/cmd/metal-api/internal/datastore/size.go +++ b/cmd/metal-api/internal/datastore/size.go @@ -48,7 +48,7 @@ func (rs *RethinkStore) FromHardware(hw metal.MachineHardware) (*metal.Size, []* // this should not happen, so we do not return a notfound return nil, nil, errors.New("no sizes found in database") } - var sizes []metal.Size + var sizes metal.Sizes for _, s := range sz { if len(s.Constraints) < 1 { rs.Error("missing constraints", "size", s) @@ -56,5 +56,5 @@ func (rs *RethinkStore) FromHardware(hw metal.MachineHardware) (*metal.Size, []* } sizes = append(sizes, s) } - return metal.Sizes(sizes).FromHardware(hw) + return sizes.FromHardware(hw) } diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 0e183a32b..5e63c742e 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -16,20 +16,31 @@ import ( ) type BootService struct { - log *zap.SugaredLogger - ds Datasource - pwdFile string - publisher bus.Publisher - eventService *EventService + log *zap.SugaredLogger + ds Datasource + superUserPassword *string + publisher bus.Publisher + eventService *EventService } func NewBootService(cfg *ServerConfig, eventService *EventService) *BootService { + log := cfg.Logger.Named("boot-service") + + var superUserPassword *string + pwd, err := os.ReadFile(cfg.BMCSuperUserPasswordFile) + if err != nil { + log.Infow("superuserpassword not found, disabling feature", "error", err) + } else { + s := strings.TrimSpace(string(pwd)) + superUserPassword = &s + } + return &BootService{ - ds: cfg.Datasource, - log: cfg.Logger.Named("boot-service"), - publisher: cfg.Publisher, - pwdFile: cfg.BMCSuperUserPasswordFile, - eventService: eventService, + ds: cfg.Datasource, + log: log, + publisher: cfg.Publisher, + superUserPassword: superUserPassword, + eventService: eventService, } } func (b *BootService) Dhcp(ctx context.Context, req *v1.BootServiceDhcpRequest) (*v1.BootServiceDhcpResponse, error) { @@ -49,22 +60,7 @@ func (b *BootService) Dhcp(ctx context.Context, req *v1.BootServiceDhcpRequest) func (b *BootService) Boot(ctx context.Context, req *v1.BootServiceBootRequest) (*v1.BootServiceBootResponse, error) { b.log.Infow("boot", "req", req) - if req == nil { - return nil, fmt.Errorf("req is nil") - } - var m *metal.Machine - err := b.ds.FindMachine(&datastore.MachineSearchQuery{ - NicsMacAddresses: []string{req.Mac}, - PartitionID: &req.PartitionId, - }, m) - if err != nil && !metal.IsNotFound(err) { - return nil, err - } - - if m != nil && m.PartitionID != req.PartitionId { - return nil, fmt.Errorf("partitionID:%q of machine with mac does not match partitionID:%q", m.PartitionID, req.PartitionId) - } p, err := b.ds.FindPartition(req.PartitionId) if err != nil || p == nil { return nil, fmt.Errorf("no partition with id:%q found %w", req.PartitionId, err) @@ -84,6 +80,12 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR if req.Uuid == "" { return nil, errors.New("uuid is empty") } + + m, err := b.ds.FindMachineByID(req.Uuid) + if err != nil && !metal.IsNotFound(err) { + return nil, err + } + if req.Hardware == nil { return nil, errors.New("hardware is nil") } @@ -96,8 +98,8 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR Size: d.Size, }) } - nics := metal.Nics{} + nics := metal.Nics{} for i := range req.Hardware.Nics { nic := req.Hardware.Nics[i] neighs := metal.Nics{} @@ -121,17 +123,13 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR Disks: disks, Nics: nics, } + size, _, err := b.ds.FromHardware(machineHardware) if err != nil { size = metal.UnknownSize b.log.Errorw("no size found for hardware, defaulting to unknown size", "hardware", machineHardware, "error", err) } - m, err := b.ds.FindMachineByID(req.Uuid) - if err != nil && !metal.IsNotFound(err) { - return nil, err - } - var ipmi metal.IPMI if req.Ipmi != nil { i := req.Ipmi @@ -177,7 +175,6 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR } - var registerState v1.RegisterState if m == nil { // machine is not in the database, create it m = &metal.Machine{ @@ -208,8 +205,6 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR if err != nil { return nil, err } - - registerState = v1.RegisterState_REGISTER_STATE_CREATED } else { // machine has already registered, update it old := *m @@ -225,7 +220,6 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR if err != nil { return nil, err } - registerState = v1.RegisterState_REGISTER_STATE_UPDATED } ec, err := b.ds.FindProvisioningEventContainer(m.ID) @@ -268,10 +262,9 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR } return &v1.BootServiceRegisterResponse{ - Uuid: req.Uuid, - Size: size.ID, - PartitionId: m.PartitionID, - RegisterState: registerState, + Uuid: req.Uuid, + Size: size.ID, + PartitionId: m.PartitionID, }, nil } @@ -279,19 +272,15 @@ func (b *BootService) SuperUserPassword(ctx context.Context, req *v1.BootService b.log.Infow("superuserpassword", "req", req) defer ctx.Done() - resp := &v1.BootServiceSuperUserPasswordResponse{} - if b.pwdFile == "" { - resp.FeatureDisabled = true + resp := &v1.BootServiceSuperUserPasswordResponse{ + FeatureDisabled: true, + } + if b.superUserPassword == nil { return resp, nil } - bb, err := os.ReadFile(b.pwdFile) - if err != nil { - b.log.Errorw("failed to lookup BMC superuser password", "password file", b.pwdFile, "error", err) - return nil, err - } resp.FeatureDisabled = false - resp.SuperUserPassword = strings.TrimSpace(string(bb)) + resp.SuperUserPassword = *b.superUserPassword return resp, nil } @@ -333,16 +322,22 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque } vrf := "" - if m.IsFirewall() { - // if a machine has multiple networks, it serves as firewall, so it can not be enslaved into the tenant vrf + switch role := m.Allocation.Role; role { + case metal.RoleFirewall: + // firewalls are not enslaved into tenant vrfs vrf = "default" - } else { + case metal.RoleFirewall: for _, mn := range m.Allocation.MachineNetworks { if mn.Private { vrf = fmt.Sprintf("vrf%d", mn.Vrf) break } } + default: + return nil, fmt.Errorf("unknown allocation role:%q found", role) + } + if vrf == "" { + return nil, fmt.Errorf("the machine %q could not be enslaved into the vrf because no vrf was found, error: %w", req.Uuid, err) } err = retry.Do( @@ -364,6 +359,7 @@ func (b *BootService) Report(ctx context.Context, req *v1.BootServiceReportReque b.setBootOrderDisk(m.ID, m.PartitionID) return &v1.BootServiceReportResponse{}, nil } + func (b *BootService) AbortReinstall(ctx context.Context, req *v1.BootServiceAbortReinstallRequest) (*v1.BootServiceAbortReinstallResponse, error) { b.log.Infow("abortreinstall", "req", req) m, err := b.ds.FindMachineByID(req.Uuid) diff --git a/pkg/api/v1/boot.pb.go b/pkg/api/v1/boot.pb.go index fb7b45466..37aaf86d3 100644 --- a/pkg/api/v1/boot.pb.go +++ b/pkg/api/v1/boot.pb.go @@ -20,55 +20,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type RegisterState int32 - -const ( - RegisterState_REGISTER_STATE_UNSPECIFIED RegisterState = 0 - RegisterState_REGISTER_STATE_CREATED RegisterState = 1 - RegisterState_REGISTER_STATE_UPDATED RegisterState = 2 -) - -// Enum value maps for RegisterState. -var ( - RegisterState_name = map[int32]string{ - 0: "REGISTER_STATE_UNSPECIFIED", - 1: "REGISTER_STATE_CREATED", - 2: "REGISTER_STATE_UPDATED", - } - RegisterState_value = map[string]int32{ - "REGISTER_STATE_UNSPECIFIED": 0, - "REGISTER_STATE_CREATED": 1, - "REGISTER_STATE_UPDATED": 2, - } -) - -func (x RegisterState) Enum() *RegisterState { - p := new(RegisterState) - *p = x - return p -} - -func (x RegisterState) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RegisterState) Descriptor() protoreflect.EnumDescriptor { - return file_api_v1_boot_proto_enumTypes[0].Descriptor() -} - -func (RegisterState) Type() protoreflect.EnumType { - return &file_api_v1_boot_proto_enumTypes[0] -} - -func (x RegisterState) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RegisterState.Descriptor instead. -func (RegisterState) EnumDescriptor() ([]byte, []int) { - return file_api_v1_boot_proto_rawDescGZIP(), []int{0} -} - type BootServiceDhcpRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -364,10 +315,9 @@ type BootServiceRegisterResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` - PartitionId string `protobuf:"bytes,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` - RegisterState RegisterState `protobuf:"varint,4,opt,name=register_state,json=registerState,proto3,enum=api.v1.RegisterState" json:"register_state,omitempty"` + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Size string `protobuf:"bytes,2,opt,name=size,proto3" json:"size,omitempty"` + PartitionId string `protobuf:"bytes,3,opt,name=partition_id,json=partitionId,proto3" json:"partition_id,omitempty"` } func (x *BootServiceRegisterResponse) Reset() { @@ -423,13 +373,6 @@ func (x *BootServiceRegisterResponse) GetPartitionId() string { return "" } -func (x *BootServiceRegisterResponse) GetRegisterState() RegisterState { - if x != nil { - return x.RegisterState - } - return RegisterState_REGISTER_STATE_UNSPECIFIED -} - type MachineHardware struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1333,186 +1276,176 @@ var file_api_v1_boot_proto_rawDesc = []byte{ 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x5f, 0x68, 0x61, 0x6d, 0x6d, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x6d, 0x65, 0x74, 0x61, 0x6c, 0x48, 0x61, 0x6d, 0x6d, 0x65, - 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x01, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x49, 0x64, 0x12, 0x3c, 0x0a, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x61, 0x70, - 0x69, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x22, 0xa0, 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, 0x22, 0x64, 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, + 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x68, 0x0a, 0x1b, 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, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, + 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x22, 0xa0, 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, - 0x09, 0x6e, 0x65, 0x69, 0x67, 0x68, 0x62, 0x6f, 0x72, 0x73, 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, + 0x04, 0x6e, 0x69, 0x63, 0x73, 0x22, 0x64, 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, 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, + 0xa4, 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, 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, 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, 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, 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, 0x2a, 0x67, - 0x0a, 0x0d, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x1e, 0x0a, 0x1a, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x1a, 0x0a, 0x16, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x45, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x52, - 0x45, 0x47, 0x49, 0x53, 0x54, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x50, - 0x44, 0x41, 0x54, 0x45, 0x44, 0x10, 0x02, 0x32, 0xa4, 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, 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, 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, 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, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x76, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1527,58 +1460,55 @@ func file_api_v1_boot_proto_rawDescGZIP() []byte { return file_api_v1_boot_proto_rawDescData } -var file_api_v1_boot_proto_enumTypes = make([]protoimpl.EnumInfo, 1) var file_api_v1_boot_proto_msgTypes = make([]protoimpl.MessageInfo, 19) var file_api_v1_boot_proto_goTypes = []interface{}{ - (RegisterState)(0), // 0: api.v1.RegisterState - (*BootServiceDhcpRequest)(nil), // 1: api.v1.BootServiceDhcpRequest - (*BootServiceDhcpResponse)(nil), // 2: api.v1.BootServiceDhcpResponse - (*BootServiceBootRequest)(nil), // 3: api.v1.BootServiceBootRequest - (*BootServiceBootResponse)(nil), // 4: api.v1.BootServiceBootResponse - (*BootServiceRegisterRequest)(nil), // 5: api.v1.BootServiceRegisterRequest - (*BootServiceRegisterResponse)(nil), // 6: api.v1.BootServiceRegisterResponse - (*MachineHardware)(nil), // 7: api.v1.MachineHardware - (*MachineNic)(nil), // 8: api.v1.MachineNic - (*MachineBlockDevice)(nil), // 9: api.v1.MachineBlockDevice - (*MachineBIOS)(nil), // 10: api.v1.MachineBIOS - (*MachineIPMI)(nil), // 11: api.v1.MachineIPMI - (*MachineFRU)(nil), // 12: api.v1.MachineFRU - (*BootServiceReportRequest)(nil), // 13: api.v1.BootServiceReportRequest - (*BootServiceReportResponse)(nil), // 14: api.v1.BootServiceReportResponse - (*BootInfo)(nil), // 15: api.v1.BootInfo - (*BootServiceAbortReinstallRequest)(nil), // 16: api.v1.BootServiceAbortReinstallRequest - (*BootServiceAbortReinstallResponse)(nil), // 17: api.v1.BootServiceAbortReinstallResponse - (*BootServiceSuperUserPasswordRequest)(nil), // 18: api.v1.BootServiceSuperUserPasswordRequest - (*BootServiceSuperUserPasswordResponse)(nil), // 19: api.v1.BootServiceSuperUserPasswordResponse + (*BootServiceDhcpRequest)(nil), // 0: api.v1.BootServiceDhcpRequest + (*BootServiceDhcpResponse)(nil), // 1: api.v1.BootServiceDhcpResponse + (*BootServiceBootRequest)(nil), // 2: api.v1.BootServiceBootRequest + (*BootServiceBootResponse)(nil), // 3: api.v1.BootServiceBootResponse + (*BootServiceRegisterRequest)(nil), // 4: api.v1.BootServiceRegisterRequest + (*BootServiceRegisterResponse)(nil), // 5: api.v1.BootServiceRegisterResponse + (*MachineHardware)(nil), // 6: api.v1.MachineHardware + (*MachineNic)(nil), // 7: api.v1.MachineNic + (*MachineBlockDevice)(nil), // 8: api.v1.MachineBlockDevice + (*MachineBIOS)(nil), // 9: api.v1.MachineBIOS + (*MachineIPMI)(nil), // 10: api.v1.MachineIPMI + (*MachineFRU)(nil), // 11: api.v1.MachineFRU + (*BootServiceReportRequest)(nil), // 12: api.v1.BootServiceReportRequest + (*BootServiceReportResponse)(nil), // 13: api.v1.BootServiceReportResponse + (*BootInfo)(nil), // 14: api.v1.BootInfo + (*BootServiceAbortReinstallRequest)(nil), // 15: api.v1.BootServiceAbortReinstallRequest + (*BootServiceAbortReinstallResponse)(nil), // 16: api.v1.BootServiceAbortReinstallResponse + (*BootServiceSuperUserPasswordRequest)(nil), // 17: api.v1.BootServiceSuperUserPasswordRequest + (*BootServiceSuperUserPasswordResponse)(nil), // 18: api.v1.BootServiceSuperUserPasswordResponse } var file_api_v1_boot_proto_depIdxs = []int32{ - 7, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware - 10, // 1: api.v1.BootServiceRegisterRequest.bios:type_name -> api.v1.MachineBIOS - 11, // 2: api.v1.BootServiceRegisterRequest.ipmi:type_name -> api.v1.MachineIPMI - 0, // 3: api.v1.BootServiceRegisterResponse.register_state:type_name -> api.v1.RegisterState - 9, // 4: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice - 8, // 5: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic - 8, // 6: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic - 12, // 7: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU - 15, // 8: api.v1.BootServiceReportRequest.boot_info:type_name -> api.v1.BootInfo - 15, // 9: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo - 1, // 10: api.v1.BootService.Dhcp:input_type -> api.v1.BootServiceDhcpRequest - 3, // 11: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest - 18, // 12: api.v1.BootService.SuperUserPassword:input_type -> api.v1.BootServiceSuperUserPasswordRequest - 5, // 13: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest - 13, // 14: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest - 16, // 15: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest - 2, // 16: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse - 4, // 17: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse - 19, // 18: api.v1.BootService.SuperUserPassword:output_type -> api.v1.BootServiceSuperUserPasswordResponse - 6, // 19: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse - 14, // 20: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse - 17, // 21: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse - 16, // [16:22] is the sub-list for method output_type - 10, // [10:16] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 6, // 0: api.v1.BootServiceRegisterRequest.hardware:type_name -> api.v1.MachineHardware + 9, // 1: api.v1.BootServiceRegisterRequest.bios:type_name -> api.v1.MachineBIOS + 10, // 2: api.v1.BootServiceRegisterRequest.ipmi:type_name -> api.v1.MachineIPMI + 8, // 3: api.v1.MachineHardware.disks:type_name -> api.v1.MachineBlockDevice + 7, // 4: api.v1.MachineHardware.nics:type_name -> api.v1.MachineNic + 7, // 5: api.v1.MachineNic.neighbors:type_name -> api.v1.MachineNic + 11, // 6: api.v1.MachineIPMI.fru:type_name -> api.v1.MachineFRU + 14, // 7: api.v1.BootServiceReportRequest.boot_info:type_name -> api.v1.BootInfo + 14, // 8: api.v1.BootServiceAbortReinstallResponse.boot_info:type_name -> api.v1.BootInfo + 0, // 9: api.v1.BootService.Dhcp:input_type -> api.v1.BootServiceDhcpRequest + 2, // 10: api.v1.BootService.Boot:input_type -> api.v1.BootServiceBootRequest + 17, // 11: api.v1.BootService.SuperUserPassword:input_type -> api.v1.BootServiceSuperUserPasswordRequest + 4, // 12: api.v1.BootService.Register:input_type -> api.v1.BootServiceRegisterRequest + 12, // 13: api.v1.BootService.Report:input_type -> api.v1.BootServiceReportRequest + 15, // 14: api.v1.BootService.AbortReinstall:input_type -> api.v1.BootServiceAbortReinstallRequest + 1, // 15: api.v1.BootService.Dhcp:output_type -> api.v1.BootServiceDhcpResponse + 3, // 16: api.v1.BootService.Boot:output_type -> api.v1.BootServiceBootResponse + 18, // 17: api.v1.BootService.SuperUserPassword:output_type -> api.v1.BootServiceSuperUserPasswordResponse + 5, // 18: api.v1.BootService.Register:output_type -> api.v1.BootServiceRegisterResponse + 13, // 19: api.v1.BootService.Report:output_type -> api.v1.BootServiceReportResponse + 16, // 20: api.v1.BootService.AbortReinstall:output_type -> api.v1.BootServiceAbortReinstallResponse + 15, // [15:21] is the sub-list for method output_type + 9, // [9:15] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_api_v1_boot_proto_init() } @@ -1823,14 +1753,13 @@ func file_api_v1_boot_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_v1_boot_proto_rawDesc, - NumEnums: 1, + NumEnums: 0, NumMessages: 19, NumExtensions: 0, NumServices: 1, }, GoTypes: file_api_v1_boot_proto_goTypes, DependencyIndexes: file_api_v1_boot_proto_depIdxs, - EnumInfos: file_api_v1_boot_proto_enumTypes, MessageInfos: file_api_v1_boot_proto_msgTypes, }.Build() File_api_v1_boot_proto = out.File diff --git a/proto/api/v1/boot.proto b/proto/api/v1/boot.proto index f4fc186de..1a847b704 100644 --- a/proto/api/v1/boot.proto +++ b/proto/api/v1/boot.proto @@ -49,7 +49,6 @@ message BootServiceRegisterResponse { string uuid = 1; string size = 2; string partition_id = 3; - RegisterState register_state = 4; } message MachineHardware { @@ -117,12 +116,6 @@ message BootInfo { string bootloader_id = 8; } -enum RegisterState { - REGISTER_STATE_UNSPECIFIED = 0; - REGISTER_STATE_CREATED = 1; - REGISTER_STATE_UPDATED = 2; -} - message BootServiceAbortReinstallRequest { string uuid = 1; bool primary_disk_wiped = 2;