From 59690dbd997f4199368950856ba12b2ab6dabee7 Mon Sep 17 00:00:00 2001 From: Stefan Majer Date: Wed, 13 Nov 2024 13:34:17 +0100 Subject: [PATCH] Set PartitionID (#595) * Set PartitionID * Fix tests --- cmd/metal-api/internal/grpc/boot-service.go | 1 + .../internal/service/machine-service_allocation_test.go | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/metal-api/internal/grpc/boot-service.go b/cmd/metal-api/internal/grpc/boot-service.go index 65348870..2b31671e 100644 --- a/cmd/metal-api/internal/grpc/boot-service.go +++ b/cmd/metal-api/internal/grpc/boot-service.go @@ -244,6 +244,7 @@ func (b *BootService) Register(ctx context.Context, req *v1.BootServiceRegisterR m.BIOS.Date = req.Bios.Date m.IPMI = ipmi m.State.MetalHammerVersion = req.MetalHammerVersion + m.PartitionID = req.PartitionId err = b.ds.UpdateMachine(&old, m) if err != nil { 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 4c600fd7..35c734af 100644 --- a/cmd/metal-api/internal/service/machine-service_allocation_test.go +++ b/cmd/metal-api/internal/service/machine-service_allocation_test.go @@ -271,6 +271,7 @@ func createMachineRegisterRequest(i int) *grpcv1.BootServiceRegisterRequest { Vendor: "metal", Date: "1970", }, + PartitionId: "p1", Hardware: &grpcv1.MachineHardware{ Memory: 4, Cpus: []*grpcv1.MachineCPU{