From 7c7a37785711a5a90afd701921995ba88755ccce Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 14 Apr 2022 22:30:41 +0300 Subject: [PATCH] feat: add extended hardware information to Server and ServerClass CRDs This is final part of #735, previous part in #823. This imports all remaining changes with some fixups minus the webhook changes. This change adds detailed hardware information to the Server CRD. Hardware info is extracted by the agent from SMBIOS. The ServerClass CRD is also updated so more precise qualifiers can be used. Co-authored-by: Gerard de Leeuw Signed-off-by: Gerard de Leeuw Signed-off-by: Andrey Smirnov --- .../controllers/metalmachine_controller.go | 2 +- .../controllers/serverbinding_controller.go | 2 +- app/caps-controller-manager/main.go | 4 +- .../cmd/agent/main.go | 243 ++- .../cmd/agent/main_test.go | 15 + .../samples/metal_v1alpha2_environment.yaml | 28 + .../config/samples/metal_v1alpha2_server.yaml | 77 + .../samples/metal_v1alpha2_serverclass.yaml | 27 + .../controllers/environment_controller.go | 2 +- .../controllers/server_controller.go | 2 +- .../controllers/serverclass_controller.go | 2 +- .../controllers/suite_test.go | 2 +- .../internal/api/api.pb.go | 1359 ++++++++++++++--- .../internal/api/api.proto | 84 +- .../internal/ipxe/ipxe_server.go | 2 +- .../internal/metadata/metadata_server.go | 2 +- .../internal/power/api/api.go | 2 +- .../internal/power/factory.go | 2 +- .../internal/power/ipmi/ipmi.go | 2 +- .../internal/server/server.go | 107 +- go.mod | 2 +- go.sum | 4 +- hack/release.toml | 82 +- internal/client/client.go | 2 +- sfyra/go.sum | 1 + sfyra/pkg/capi/cluster.go | 2 +- sfyra/pkg/capi/metalclient.go | 2 +- sfyra/pkg/constants/constants.go | 2 +- sfyra/pkg/loadbalancer/loadbalancer.go | 2 +- sfyra/pkg/tests/compatibility.go | 12 +- sfyra/pkg/tests/environment.go | 2 +- sfyra/pkg/tests/match.go | 2 +- sfyra/pkg/tests/reset.go | 2 +- sfyra/pkg/tests/server.go | 32 +- sfyra/pkg/tests/server_class.go | 32 +- templates/cluster-template-talos-v0.13.4.yaml | 4 +- templates/cluster-template.yaml | 4 +- website/content/v0.6/Guides/patching.md | 2 +- .../Resource Configuration/environments.md | 6 +- .../v0.6/Resource Configuration/metadata.md | 26 +- .../Resource Configuration/serverclasses.md | 35 +- .../v0.6/Resource Configuration/servers.md | 75 +- 42 files changed, 1848 insertions(+), 451 deletions(-) create mode 100644 app/sidero-controller-manager/cmd/agent/main_test.go create mode 100644 app/sidero-controller-manager/config/samples/metal_v1alpha2_environment.yaml create mode 100644 app/sidero-controller-manager/config/samples/metal_v1alpha2_server.yaml create mode 100644 app/sidero-controller-manager/config/samples/metal_v1alpha2_serverclass.yaml diff --git a/app/caps-controller-manager/controllers/metalmachine_controller.go b/app/caps-controller-manager/controllers/metalmachine_controller.go index 402c1b35f..1fab77ca2 100644 --- a/app/caps-controller-manager/controllers/metalmachine_controller.go +++ b/app/caps-controller-manager/controllers/metalmachine_controller.go @@ -33,7 +33,7 @@ import ( infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" "github.com/talos-systems/sidero/app/caps-controller-manager/pkg/constants" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) var ErrNoServersInServerClass = errors.New("no servers available in serverclass") diff --git a/app/caps-controller-manager/controllers/serverbinding_controller.go b/app/caps-controller-manager/controllers/serverbinding_controller.go index 1da60e60a..03ee734a2 100644 --- a/app/caps-controller-manager/controllers/serverbinding_controller.go +++ b/app/caps-controller-manager/controllers/serverbinding_controller.go @@ -17,7 +17,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/controller" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // ServerBindingReconciler reconciles a ServerBinding object. diff --git a/app/caps-controller-manager/main.go b/app/caps-controller-manager/main.go index f2aee5496..a572f4ca8 100644 --- a/app/caps-controller-manager/main.go +++ b/app/caps-controller-manager/main.go @@ -23,7 +23,7 @@ import ( infrav1alpha2 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha2" infrav1alpha3 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" "github.com/talos-systems/sidero/app/caps-controller-manager/controllers" - metalv1alpha1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" // +kubebuilder:scaffold:imports ) @@ -43,7 +43,7 @@ func init() { _ = capiv1.AddToScheme(scheme) _ = infrav1alpha2.AddToScheme(scheme) _ = infrav1alpha3.AddToScheme(scheme) - _ = metalv1alpha1.AddToScheme(scheme) + _ = metalv1.AddToScheme(scheme) // +kubebuilder:scaffold:scheme } diff --git a/app/sidero-controller-manager/cmd/agent/main.go b/app/sidero-controller-manager/cmd/agent/main.go index 5513afe6c..7841d06bb 100644 --- a/app/sidero-controller-manager/cmd/agent/main.go +++ b/app/sidero-controller-manager/cmd/agent/main.go @@ -30,7 +30,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/api" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/ipmi" "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" @@ -94,25 +94,19 @@ func setup() error { } func create(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) (*api.CreateServerResponse, error) { - uuid, err := s.SystemInformation().UUID() + disks, err := disk.List() if err != nil { - return nil, err + log.Printf("encountered error fetching disks: %q", err) + } + + interfaces, err := net.Interfaces() + if err != nil { + log.Printf("encountered error fetching network interfaces: %q", err) } req := &api.CreateServerRequest{ - SystemInformation: &api.SystemInformation{ - Uuid: uuid.String(), - Manufacturer: s.SystemInformation().Manufacturer(), - ProductName: s.SystemInformation().ProductName(), - Version: s.SystemInformation().Version(), - SerialNumber: s.SystemInformation().SerialNumber(), - SkuNumber: s.SystemInformation().SKUNumber(), - Family: s.SystemInformation().Family(), - }, - Cpu: &api.CPU{ - Manufacturer: s.ProcessorInformation().ProcessorManufacturer(), - Version: s.ProcessorInformation().ProcessorVersion(), - }, + Hardware: MapHardwareInformation(s, disks, interfaces), + Hostname: "", } hostname, err := os.Hostname() @@ -140,16 +134,11 @@ func create(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) (*api } func wipe(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) error { - uuid, err := s.SystemInformation().UUID() - if err != nil { - return err - } - return retry.Constant(5*time.Minute, retry.WithUnits(30*time.Second), retry.WithErrorLogging(true)).Retry(func() error { ctx, cancel := context.WithTimeout(ctx, 30*time.Second) defer cancel() - _, err = client.MarkServerAsWiped(ctx, &api.MarkServerAsWipedRequest{Uuid: uuid.String()}) + _, err := client.MarkServerAsWiped(ctx, &api.MarkServerAsWipedRequest{Uuid: s.SystemInformation.UUID}) if err != nil { return retry.ExpectedError(err) } @@ -159,11 +148,6 @@ func wipe(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) error { } func reconcileIPs(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS, ips []net.IP) error { - uuid, err := s.SystemInformation().UUID() - if err != nil { - return err - } - addresses := make([]*api.Address, len(ips)) for i := range addresses { addresses[i] = &api.Address{ @@ -176,8 +160,8 @@ func reconcileIPs(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS, ctx, cancel := context.WithTimeout(ctx, 30*time.Second) defer cancel() - _, err = client.ReconcileServerAddresses(ctx, &api.ReconcileServerAddressesRequest{ - Uuid: uuid.String(), + _, err := client.ReconcileServerAddresses(ctx, &api.ReconcileServerAddressesRequest{ + Uuid: s.SystemInformation.UUID, Address: addresses, }) if err != nil { @@ -281,11 +265,6 @@ func mainFunc() error { shutdown(err) } - uuid, err := s.SystemInformation().UUID() - if err != nil { - shutdown(err) - } - var ( eg errgroup.Group wg sync.WaitGroup @@ -305,7 +284,7 @@ func mainFunc() error { for { callCtx, cancel := context.WithTimeout(ctx, heartbeatInterval) - if _, err := client.Heartbeat(callCtx, &api.HeartbeatRequest{Uuid: uuid.String()}); err != nil { + if _, err := client.Heartbeat(callCtx, &api.HeartbeatRequest{Uuid: s.SystemInformation.UUID}); err != nil { log.Printf("Failed to send wipe heartbeat %s", err) } @@ -396,11 +375,6 @@ func main() { } func attemptBMCIP(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) error { - uuid, err := s.SystemInformation().UUID() - if err != nil { - return err - } - bmcInfo := &api.BMCInfo{} // Create "open" client @@ -442,7 +416,7 @@ func attemptBMCIP(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) _, err = client.UpdateBMCInfo( ctx, &api.UpdateBMCInfoRequest{ - Uuid: uuid.String(), + Uuid: s.SystemInformation.UUID, BmcInfo: bmcInfo, }, ) @@ -458,11 +432,6 @@ func attemptBMCIP(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) } func attemptBMCUserSetup(ctx context.Context, client api.AgentClient, s *smbios.SMBIOS) error { - uuid, err := s.SystemInformation().UUID() - if err != nil { - return err - } - bmcInfo := &api.BMCInfo{} // Create "open" client @@ -575,7 +544,7 @@ func attemptBMCUserSetup(ctx context.Context, client api.AgentClient, s *smbios. _, err = client.UpdateBMCInfo( ctx, &api.UpdateBMCInfoRequest{ - Uuid: uuid.String(), + Uuid: s.SystemInformation.UUID, BmcInfo: bmcInfo, }, ) @@ -609,3 +578,183 @@ func genPass16() (string, error) { return string(b), nil } + +func MapHardwareInformation(s *smbios.SMBIOS, disks []*disk.Disk, interfaces []net.Interface) *api.HardwareInformation { + if s != nil { + return &api.HardwareInformation{ + System: MapSystemInformation(s), + Compute: MapComputeInformation(s), + Memory: MapMemoryInformation(s), + Storage: MapStorageInformation(disks), + Network: MapNetworkInformation(interfaces), + } + } + + return &api.HardwareInformation{ + Storage: MapStorageInformation(disks), + } +} + +func MapSystemInformation(s *smbios.SMBIOS) *api.SystemInformation { + return &api.SystemInformation{ + Manufacturer: s.SystemInformation.Manufacturer, + ProductName: s.SystemInformation.ProductName, + SerialNumber: s.SystemInformation.SerialNumber, + Uuid: s.SystemInformation.UUID, + SkuNumber: s.SystemInformation.SKUNumber, + Family: s.SystemInformation.Family, + } +} + +func MapComputeInformation(s *smbios.SMBIOS) *api.ComputeInformation { + var ( + totalCoreCount = 0 + totalThreadCount = 0 + processors []*api.Processor + ) + + for _, v := range s.ProcessorInformation { + if v.Status.SocketPopulated() { + totalCoreCount += int(v.CoreCount) + totalThreadCount += int(v.ThreadCount) + + processor := &api.Processor{ + Manufacturer: v.ProcessorManufacturer, + ProductName: v.ProcessorVersion, + SerialNumber: v.SerialNumber, + Speed: uint32(v.CurrentSpeed), + CoreCount: uint32(v.CoreCount), + ThreadCount: uint32(v.ThreadCount), + } + + processors = append(processors, processor) + } + } + + return &api.ComputeInformation{ + TotalCoreCount: uint32(totalCoreCount), + TotalThreadCount: uint32(totalThreadCount), + ProcessorCount: uint32(len(processors)), + Processors: processors, + } +} + +func MapMemoryInformation(s *smbios.SMBIOS) *api.MemoryInformation { + var ( + totalSize = 0 + modules []*api.MemoryModule + ) + + for _, v := range s.MemoryDevices { + if v.Size != 0 && v.Size != 0xFFFF { + var size uint32 + + if v.Size == 0x7FFF { + totalSize += int(v.ExtendedSize) + size = uint32(v.ExtendedSize) + } else { + totalSize += v.Size.Megabytes() + size = uint32(v.Size) + } + + memoryModule := &api.MemoryModule{ + Manufacturer: v.Manufacturer, + ProductName: v.PartNumber, + SerialNumber: v.SerialNumber, + Type: v.MemoryType.String(), + Size: size, + Speed: uint32(v.Speed), + } + + modules = append(modules, memoryModule) + } + } + + return &api.MemoryInformation{ + TotalSize: uint32(totalSize), + ModuleCount: uint32(len(modules)), + Modules: modules, + } +} + +func MapStorageInformation(s []*disk.Disk) *api.StorageInformation { + totalSize := uint64(0) + devices := make([]*api.StorageDevice, 0, len(s)) + + for _, v := range s { + totalSize += v.Size + + var storageType api.StorageType + + switch v.Type.String() { + case "ssd": + storageType = api.StorageType_SSD + case "hdd": + storageType = api.StorageType_HDD + case "nvme": + storageType = api.StorageType_NVMe + case "sd": + storageType = api.StorageType_SD + default: + storageType = api.StorageType_Unknown + } + + storageDevice := &api.StorageDevice{ + Model: v.Model, + Serial: v.Serial, + Type: storageType, + Size: v.Size, + Name: v.Name, + DeviceName: v.DeviceName, + Uuid: v.UUID, + Wwid: v.WWID, + } + + devices = append(devices, storageDevice) + } + + return &api.StorageInformation{ + TotalSize: totalSize, + DeviceCount: uint32(len(devices)), + Devices: devices, + } +} + +func MapNetworkInformation(s []net.Interface) *api.NetworkInformation { + interfaces := make([]*api.NetworkInterface, 0, len(s)) + + for _, v := range s { + if len(v.HardwareAddr) == 0 { + continue // skip interfaces without a hardware address + } + + addrs, err := v.Addrs() + if err != nil { + log.Printf("encountered error fetching addresses of network interface %q: %q", v.Name, err) + + addrs = make([]net.Addr, 0) + } + + var addresses []string + + for _, a := range addrs { + addresses = append(addresses, a.String()) + } + + networkInterface := &api.NetworkInterface{ + Index: uint32(v.Index), + Name: v.Name, + Flags: v.Flags.String(), + Mtu: uint32(v.MTU), + Mac: v.HardwareAddr.String(), + Addresses: addresses, + } + + interfaces = append(interfaces, networkInterface) + } + + return &api.NetworkInformation{ + InterfaceCount: uint32(len(interfaces)), + Interfaces: interfaces, + } +} diff --git a/app/sidero-controller-manager/cmd/agent/main_test.go b/app/sidero-controller-manager/cmd/agent/main_test.go new file mode 100644 index 000000000..dfe85aa50 --- /dev/null +++ b/app/sidero-controller-manager/cmd/agent/main_test.go @@ -0,0 +1,15 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at http://mozilla.org/MPL/2.0/. + +//nolint:scopelint,testpackage +package main + +import ( + "testing" +) + +//nolint:unparam +func TestMapHardwareInformation_DoesNotPanic(t *testing.T) { + MapHardwareInformation(nil, nil, nil) +} diff --git a/app/sidero-controller-manager/config/samples/metal_v1alpha2_environment.yaml b/app/sidero-controller-manager/config/samples/metal_v1alpha2_environment.yaml new file mode 100644 index 000000000..1b12a1e97 --- /dev/null +++ b/app/sidero-controller-manager/config/samples/metal_v1alpha2_environment.yaml @@ -0,0 +1,28 @@ +apiVersion: metal.sidero.dev/v1alpha2 +kind: Environment +metadata: + name: default +spec: + kernel: + url: "https://github.com/siderolabs/talos/releases/download/v1.0.0/vmlinuz-amd64" + sha512: "" + args: + - console=tty0 + - console=ttyS1,115200n8 + - consoleblank=0 + - earlyprintk=ttyS1,115200n8 + - ima_appraise=fix + - ima_hash=sha512 + - ima_template=ima-ng + - init_on_alloc=1 + - initrd=initramfs.xz + - nvme_core.io_timeout=4294967295 + - printk.devkmsg=on + - pti=on + - random.trust_cpu=on + - slab_nomerge= + - talos.config=http://192.168.1.10:8081/configdata?uuid= + - talos.platform=metal + initrd: + url: "https://github.com/siderolabs/talos/releases/download/v1.0.0/initramfs-amd64.xz" + sha512: "" diff --git a/app/sidero-controller-manager/config/samples/metal_v1alpha2_server.yaml b/app/sidero-controller-manager/config/samples/metal_v1alpha2_server.yaml new file mode 100644 index 000000000..2ffb570bb --- /dev/null +++ b/app/sidero-controller-manager/config/samples/metal_v1alpha2_server.yaml @@ -0,0 +1,77 @@ +apiVersion: metal.sidero.dev/v1alpha2 +kind: Server +metadata: + name: 00000000-0000-0000-0000-d05099d333e0 + labels: + common-label: "true" + zone: east + environment: test +spec: + accepted: false + configPatches: + - op: replace + path: /cluster/network/cni + value: + name: custom + urls: + - http://192.168.1.199/assets/cilium.yaml + hardware: + system: + manufacturer: Dell Inc. + productName: PowerEdge R630 + serialNumber: 790H8D2 + compute: + totalCoreCount: 8 + totalThreadCount: 16 + processorCount: 1 + processors: + - manufacturer: Intel + productName: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz + speed: 2400 + coreCount: 8 + threadCount: 16 + memory: + totalSize: 32 GB + moduleCount: 2 + modules: + - manufacturer: 002C00B3002C + productName: 18ASF2G72PDZ-2G3B1 + serialNumber: 12BDC045 + type: LPDDR3 + size: 16384 + speed: 2400 + - manufacturer: 002C00B3002C + productName: 18ASF2G72PDZ-2G3B1 + serialNumber: 12BDBF5D + type: LPDDR3 + size: 16384 + speed: 2400 + storage: + totalSize: 1116 GB + deviceCount: 1 + devices: + - productName: PERC H730 Mini + type: HDD + name: sda + deviceName: /dev/sda + size: 1199101181952 + wwid: naa.61866da055de070028d8e83307cc6df2 + network: + interfaceCount: 2 + interfaces: + - index: 1 + name: lo + flags: up|loopback + mtu: 65536 + mac: "" + addresses: + - 127.0.0.1/8 + - ::1/128 + - index: 2 + name: enp3s0 + flags: up|broadcast|multicast + mtu: 1500 + mac: "40:8d:5c:86:5a:14" + addresses: + - 192.168.2.8/24 + - fe80::dcb3:295c:755b:91bb/64 diff --git a/app/sidero-controller-manager/config/samples/metal_v1alpha2_serverclass.yaml b/app/sidero-controller-manager/config/samples/metal_v1alpha2_serverclass.yaml new file mode 100644 index 000000000..ab3c3336f --- /dev/null +++ b/app/sidero-controller-manager/config/samples/metal_v1alpha2_serverclass.yaml @@ -0,0 +1,27 @@ +apiVersion: metal.sidero.dev/v1alpha2 +kind: ServerClass +metadata: + name: serverclass-sample +spec: + selector: + matchLabels: + common-label: "true" + matchExpressions: + - key: zone + operator: In + values: + - central + - east + - key: environment + operator: NotIn + values: + - prod + qualifiers: + - system: + manufacturer: Dell Inc. + compute: + processors: + - manufacturer: "Intel" + productName: "Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz" + memory: + totalSize: 32 GB diff --git a/app/sidero-controller-manager/controllers/environment_controller.go b/app/sidero-controller-manager/controllers/environment_controller.go index 32ea581bc..460c21f70 100644 --- a/app/sidero-controller-manager/controllers/environment_controller.go +++ b/app/sidero-controller-manager/controllers/environment_controller.go @@ -24,7 +24,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/controller" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" ) diff --git a/app/sidero-controller-manager/controllers/server_controller.go b/app/sidero-controller-manager/controllers/server_controller.go index e18489a08..e82c39504 100644 --- a/app/sidero-controller-manager/controllers/server_controller.go +++ b/app/sidero-controller-manager/controllers/server_controller.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/source" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/metal" "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" diff --git a/app/sidero-controller-manager/controllers/serverclass_controller.go b/app/sidero-controller-manager/controllers/serverclass_controller.go index 47c8733da..7c494c7f4 100644 --- a/app/sidero-controller-manager/controllers/serverclass_controller.go +++ b/app/sidero-controller-manager/controllers/serverclass_controller.go @@ -20,7 +20,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/source" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // ServerClassReconciler reconciles a ServerClass object. diff --git a/app/sidero-controller-manager/controllers/suite_test.go b/app/sidero-controller-manager/controllers/suite_test.go index 142d78fc1..057160681 100644 --- a/app/sidero-controller-manager/controllers/suite_test.go +++ b/app/sidero-controller-manager/controllers/suite_test.go @@ -18,7 +18,7 @@ import ( logf "sigs.k8s.io/controller-runtime/pkg/log" "sigs.k8s.io/controller-runtime/pkg/log/zap" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" // +kubebuilder:scaffold:imports ) diff --git a/app/sidero-controller-manager/internal/api/api.pb.go b/app/sidero-controller-manager/internal/api/api.pb.go index 614ee0e7f..19861df24 100644 --- a/app/sidero-controller-manager/internal/api/api.pb.go +++ b/app/sidero-controller-manager/internal/api/api.pb.go @@ -21,6 +21,61 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type StorageType int32 + +const ( + StorageType_Unknown StorageType = 0 + StorageType_SSD StorageType = 1 + StorageType_HDD StorageType = 2 + StorageType_NVMe StorageType = 3 + StorageType_SD StorageType = 4 +) + +// Enum value maps for StorageType. +var ( + StorageType_name = map[int32]string{ + 0: "Unknown", + 1: "SSD", + 2: "HDD", + 3: "NVMe", + 4: "SD", + } + StorageType_value = map[string]int32{ + "Unknown": 0, + "SSD": 1, + "HDD": 2, + "NVMe": 3, + "SD": 4, + } +) + +func (x StorageType) Enum() *StorageType { + p := new(StorageType) + *p = x + return p +} + +func (x StorageType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StorageType) Descriptor() protoreflect.EnumDescriptor { + return file_api_proto_enumTypes[0].Descriptor() +} + +func (StorageType) Type() protoreflect.EnumType { + return &file_api_proto_enumTypes[0] +} + +func (x StorageType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StorageType.Descriptor instead. +func (StorageType) EnumDescriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{0} +} + type BMCInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -92,37 +147,605 @@ func (x *BMCInfo) GetPass() string { return "" } -type SystemInformation struct { +type SystemInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` + Manufacturer string `protobuf:"bytes,2,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` + ProductName string `protobuf:"bytes,3,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"` + Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` + SerialNumber string `protobuf:"bytes,5,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` + SkuNumber string `protobuf:"bytes,6,opt,name=sku_number,json=skuNumber,proto3" json:"sku_number,omitempty"` + Family string `protobuf:"bytes,7,opt,name=family,proto3" json:"family,omitempty"` +} + +func (x *SystemInformation) Reset() { + *x = SystemInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SystemInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SystemInformation) ProtoMessage() {} + +func (x *SystemInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_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 SystemInformation.ProtoReflect.Descriptor instead. +func (*SystemInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{1} +} + +func (x *SystemInformation) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *SystemInformation) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +func (x *SystemInformation) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *SystemInformation) GetVersion() string { + if x != nil { + return x.Version + } + return "" +} + +func (x *SystemInformation) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +func (x *SystemInformation) GetSkuNumber() string { + if x != nil { + return x.SkuNumber + } + return "" +} + +func (x *SystemInformation) GetFamily() string { + if x != nil { + return x.Family + } + return "" +} + +type Processor struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Manufacturer string `protobuf:"bytes,1,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` + ProductName string `protobuf:"bytes,2,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"` + SerialNumber string `protobuf:"bytes,3,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` + Speed uint32 `protobuf:"varint,4,opt,name=speed,proto3" json:"speed,omitempty"` + CoreCount uint32 `protobuf:"varint,5,opt,name=core_count,json=coreCount,proto3" json:"core_count,omitempty"` + ThreadCount uint32 `protobuf:"varint,6,opt,name=thread_count,json=threadCount,proto3" json:"thread_count,omitempty"` +} + +func (x *Processor) Reset() { + *x = Processor{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Processor) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Processor) ProtoMessage() {} + +func (x *Processor) ProtoReflect() protoreflect.Message { + mi := &file_api_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 Processor.ProtoReflect.Descriptor instead. +func (*Processor) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{2} +} + +func (x *Processor) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +func (x *Processor) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *Processor) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +func (x *Processor) GetSpeed() uint32 { + if x != nil { + return x.Speed + } + return 0 +} + +func (x *Processor) GetCoreCount() uint32 { + if x != nil { + return x.CoreCount + } + return 0 +} + +func (x *Processor) GetThreadCount() uint32 { + if x != nil { + return x.ThreadCount + } + return 0 +} + +type ComputeInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalCoreCount uint32 `protobuf:"varint,1,opt,name=total_core_count,json=totalCoreCount,proto3" json:"total_core_count,omitempty"` + TotalThreadCount uint32 `protobuf:"varint,2,opt,name=total_thread_count,json=totalThreadCount,proto3" json:"total_thread_count,omitempty"` + ProcessorCount uint32 `protobuf:"varint,3,opt,name=processor_count,json=processorCount,proto3" json:"processor_count,omitempty"` + Processors []*Processor `protobuf:"bytes,4,rep,name=processors,proto3" json:"processors,omitempty"` +} + +func (x *ComputeInformation) Reset() { + *x = ComputeInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ComputeInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ComputeInformation) ProtoMessage() {} + +func (x *ComputeInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_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 ComputeInformation.ProtoReflect.Descriptor instead. +func (*ComputeInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{3} +} + +func (x *ComputeInformation) GetTotalCoreCount() uint32 { + if x != nil { + return x.TotalCoreCount + } + return 0 +} + +func (x *ComputeInformation) GetTotalThreadCount() uint32 { + if x != nil { + return x.TotalThreadCount + } + return 0 +} + +func (x *ComputeInformation) GetProcessorCount() uint32 { + if x != nil { + return x.ProcessorCount + } + return 0 +} + +func (x *ComputeInformation) GetProcessors() []*Processor { + if x != nil { + return x.Processors + } + return nil +} + +type MemoryModule struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Manufacturer string `protobuf:"bytes,1,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` + ProductName string `protobuf:"bytes,2,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"` + SerialNumber string `protobuf:"bytes,3,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + Size uint32 `protobuf:"varint,5,opt,name=size,proto3" json:"size,omitempty"` + Speed uint32 `protobuf:"varint,6,opt,name=speed,proto3" json:"speed,omitempty"` +} + +func (x *MemoryModule) Reset() { + *x = MemoryModule{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemoryModule) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryModule) ProtoMessage() {} + +func (x *MemoryModule) ProtoReflect() protoreflect.Message { + mi := &file_api_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 MemoryModule.ProtoReflect.Descriptor instead. +func (*MemoryModule) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{4} +} + +func (x *MemoryModule) GetManufacturer() string { + if x != nil { + return x.Manufacturer + } + return "" +} + +func (x *MemoryModule) GetProductName() string { + if x != nil { + return x.ProductName + } + return "" +} + +func (x *MemoryModule) GetSerialNumber() string { + if x != nil { + return x.SerialNumber + } + return "" +} + +func (x *MemoryModule) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *MemoryModule) GetSize() uint32 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *MemoryModule) GetSpeed() uint32 { + if x != nil { + return x.Speed + } + return 0 +} + +type MemoryInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalSize uint32 `protobuf:"varint,1,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + ModuleCount uint32 `protobuf:"varint,2,opt,name=module_count,json=moduleCount,proto3" json:"module_count,omitempty"` + Modules []*MemoryModule `protobuf:"bytes,3,rep,name=modules,proto3" json:"modules,omitempty"` +} + +func (x *MemoryInformation) Reset() { + *x = MemoryInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MemoryInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MemoryInformation) ProtoMessage() {} + +func (x *MemoryInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_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 MemoryInformation.ProtoReflect.Descriptor instead. +func (*MemoryInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{5} +} + +func (x *MemoryInformation) GetTotalSize() uint32 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *MemoryInformation) GetModuleCount() uint32 { + if x != nil { + return x.ModuleCount + } + return 0 +} + +func (x *MemoryInformation) GetModules() []*MemoryModule { + if x != nil { + return x.Modules + } + return nil +} + +type StorageDevice struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Type StorageType `protobuf:"varint,1,opt,name=type,proto3,enum=api.StorageType" json:"type,omitempty"` + Size uint64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"` + Model string `protobuf:"bytes,3,opt,name=model,proto3" json:"model,omitempty"` + Serial string `protobuf:"bytes,4,opt,name=serial,proto3" json:"serial,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + DeviceName string `protobuf:"bytes,6,opt,name=device_name,json=deviceName,proto3" json:"device_name,omitempty"` + Uuid string `protobuf:"bytes,7,opt,name=uuid,proto3" json:"uuid,omitempty"` + Wwid string `protobuf:"bytes,8,opt,name=wwid,proto3" json:"wwid,omitempty"` +} + +func (x *StorageDevice) Reset() { + *x = StorageDevice{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageDevice) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageDevice) ProtoMessage() {} + +func (x *StorageDevice) ProtoReflect() protoreflect.Message { + mi := &file_api_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 StorageDevice.ProtoReflect.Descriptor instead. +func (*StorageDevice) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{6} +} + +func (x *StorageDevice) GetType() StorageType { + if x != nil { + return x.Type + } + return StorageType_Unknown +} + +func (x *StorageDevice) GetSize() uint64 { + if x != nil { + return x.Size + } + return 0 +} + +func (x *StorageDevice) GetModel() string { + if x != nil { + return x.Model + } + return "" +} + +func (x *StorageDevice) GetSerial() string { + if x != nil { + return x.Serial + } + return "" +} + +func (x *StorageDevice) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *StorageDevice) GetDeviceName() string { + if x != nil { + return x.DeviceName + } + return "" +} + +func (x *StorageDevice) GetUuid() string { + if x != nil { + return x.Uuid + } + return "" +} + +func (x *StorageDevice) GetWwid() string { + if x != nil { + return x.Wwid + } + return "" +} + +type StorageInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TotalSize uint64 `protobuf:"varint,1,opt,name=total_size,json=totalSize,proto3" json:"total_size,omitempty"` + DeviceCount uint32 `protobuf:"varint,2,opt,name=device_count,json=deviceCount,proto3" json:"device_count,omitempty"` + Devices []*StorageDevice `protobuf:"bytes,3,rep,name=devices,proto3" json:"devices,omitempty"` +} + +func (x *StorageInformation) Reset() { + *x = StorageInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StorageInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StorageInformation) ProtoMessage() {} + +func (x *StorageInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_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 StorageInformation.ProtoReflect.Descriptor instead. +func (*StorageInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{7} +} + +func (x *StorageInformation) GetTotalSize() uint64 { + if x != nil { + return x.TotalSize + } + return 0 +} + +func (x *StorageInformation) GetDeviceCount() uint32 { + if x != nil { + return x.DeviceCount + } + return 0 +} + +func (x *StorageInformation) GetDevices() []*StorageDevice { + if x != nil { + return x.Devices + } + return nil +} + +type NetworkInterface struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` - Manufacturer string `protobuf:"bytes,2,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` - ProductName string `protobuf:"bytes,3,opt,name=product_name,json=productName,proto3" json:"product_name,omitempty"` - Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` - SerialNumber string `protobuf:"bytes,5,opt,name=serial_number,json=serialNumber,proto3" json:"serial_number,omitempty"` - SkuNumber string `protobuf:"bytes,6,opt,name=sku_number,json=skuNumber,proto3" json:"sku_number,omitempty"` - Family string `protobuf:"bytes,7,opt,name=family,proto3" json:"family,omitempty"` + Index uint32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Flags string `protobuf:"bytes,3,opt,name=flags,proto3" json:"flags,omitempty"` + Mtu uint32 `protobuf:"varint,4,opt,name=mtu,proto3" json:"mtu,omitempty"` + Mac string `protobuf:"bytes,5,opt,name=mac,proto3" json:"mac,omitempty"` + Addresses []string `protobuf:"bytes,6,rep,name=addresses,proto3" json:"addresses,omitempty"` } -func (x *SystemInformation) Reset() { - *x = SystemInformation{} +func (x *NetworkInterface) Reset() { + *x = NetworkInterface{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[1] + mi := &file_api_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *SystemInformation) String() string { +func (x *NetworkInterface) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SystemInformation) ProtoMessage() {} +func (*NetworkInterface) ProtoMessage() {} -func (x *SystemInformation) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[1] +func (x *NetworkInterface) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -133,86 +756,137 @@ func (x *SystemInformation) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SystemInformation.ProtoReflect.Descriptor instead. -func (*SystemInformation) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{1} +// Deprecated: Use NetworkInterface.ProtoReflect.Descriptor instead. +func (*NetworkInterface) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{8} } -func (x *SystemInformation) GetUuid() string { +func (x *NetworkInterface) GetIndex() uint32 { if x != nil { - return x.Uuid + return x.Index } - return "" + return 0 } -func (x *SystemInformation) GetManufacturer() string { +func (x *NetworkInterface) GetName() string { if x != nil { - return x.Manufacturer + return x.Name } return "" } -func (x *SystemInformation) GetProductName() string { +func (x *NetworkInterface) GetFlags() string { if x != nil { - return x.ProductName + return x.Flags } return "" } -func (x *SystemInformation) GetVersion() string { +func (x *NetworkInterface) GetMtu() uint32 { if x != nil { - return x.Version + return x.Mtu } - return "" + return 0 } -func (x *SystemInformation) GetSerialNumber() string { +func (x *NetworkInterface) GetMac() string { if x != nil { - return x.SerialNumber + return x.Mac } return "" } -func (x *SystemInformation) GetSkuNumber() string { +func (x *NetworkInterface) GetAddresses() []string { if x != nil { - return x.SkuNumber + return x.Addresses } - return "" + return nil } -func (x *SystemInformation) GetFamily() string { +type NetworkInformation struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + InterfaceCount uint32 `protobuf:"varint,1,opt,name=interface_count,json=interfaceCount,proto3" json:"interface_count,omitempty"` + Interfaces []*NetworkInterface `protobuf:"bytes,2,rep,name=interfaces,proto3" json:"interfaces,omitempty"` +} + +func (x *NetworkInformation) Reset() { + *x = NetworkInformation{} + if protoimpl.UnsafeEnabled { + mi := &file_api_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NetworkInformation) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NetworkInformation) ProtoMessage() {} + +func (x *NetworkInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_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 NetworkInformation.ProtoReflect.Descriptor instead. +func (*NetworkInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{9} +} + +func (x *NetworkInformation) GetInterfaceCount() uint32 { if x != nil { - return x.Family + return x.InterfaceCount } - return "" + return 0 +} + +func (x *NetworkInformation) GetInterfaces() []*NetworkInterface { + if x != nil { + return x.Interfaces + } + return nil } -type CPU struct { +type HardwareInformation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Manufacturer string `protobuf:"bytes,1,opt,name=manufacturer,proto3" json:"manufacturer,omitempty"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` + System *SystemInformation `protobuf:"bytes,1,opt,name=system,proto3" json:"system,omitempty"` + Compute *ComputeInformation `protobuf:"bytes,2,opt,name=compute,proto3" json:"compute,omitempty"` + Memory *MemoryInformation `protobuf:"bytes,3,opt,name=memory,proto3" json:"memory,omitempty"` + Storage *StorageInformation `protobuf:"bytes,4,opt,name=storage,proto3" json:"storage,omitempty"` + Network *NetworkInformation `protobuf:"bytes,5,opt,name=network,proto3" json:"network,omitempty"` } -func (x *CPU) Reset() { - *x = CPU{} +func (x *HardwareInformation) Reset() { + *x = HardwareInformation{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[2] + mi := &file_api_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CPU) String() string { +func (x *HardwareInformation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CPU) ProtoMessage() {} +func (*HardwareInformation) ProtoMessage() {} -func (x *CPU) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[2] +func (x *HardwareInformation) ProtoReflect() protoreflect.Message { + mi := &file_api_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -223,23 +897,44 @@ func (x *CPU) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CPU.ProtoReflect.Descriptor instead. -func (*CPU) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{2} +// Deprecated: Use HardwareInformation.ProtoReflect.Descriptor instead. +func (*HardwareInformation) Descriptor() ([]byte, []int) { + return file_api_proto_rawDescGZIP(), []int{10} } -func (x *CPU) GetManufacturer() string { +func (x *HardwareInformation) GetSystem() *SystemInformation { if x != nil { - return x.Manufacturer + return x.System } - return "" + return nil } -func (x *CPU) GetVersion() string { +func (x *HardwareInformation) GetCompute() *ComputeInformation { if x != nil { - return x.Version + return x.Compute } - return "" + return nil +} + +func (x *HardwareInformation) GetMemory() *MemoryInformation { + if x != nil { + return x.Memory + } + return nil +} + +func (x *HardwareInformation) GetStorage() *StorageInformation { + if x != nil { + return x.Storage + } + return nil +} + +func (x *HardwareInformation) GetNetwork() *NetworkInformation { + if x != nil { + return x.Network + } + return nil } type CreateServerRequest struct { @@ -247,15 +942,14 @@ type CreateServerRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SystemInformation *SystemInformation `protobuf:"bytes,1,opt,name=system_information,json=systemInformation,proto3" json:"system_information,omitempty"` - Cpu *CPU `protobuf:"bytes,2,opt,name=cpu,proto3" json:"cpu,omitempty"` - Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` + Hardware *HardwareInformation `protobuf:"bytes,1,opt,name=hardware,proto3" json:"hardware,omitempty"` + Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname,omitempty"` } func (x *CreateServerRequest) Reset() { *x = CreateServerRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[3] + mi := &file_api_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -268,7 +962,7 @@ func (x *CreateServerRequest) String() string { func (*CreateServerRequest) ProtoMessage() {} func (x *CreateServerRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[3] + mi := &file_api_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -281,19 +975,12 @@ func (x *CreateServerRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateServerRequest.ProtoReflect.Descriptor instead. func (*CreateServerRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{3} -} - -func (x *CreateServerRequest) GetSystemInformation() *SystemInformation { - if x != nil { - return x.SystemInformation - } - return nil + return file_api_proto_rawDescGZIP(), []int{11} } -func (x *CreateServerRequest) GetCpu() *CPU { +func (x *CreateServerRequest) GetHardware() *HardwareInformation { if x != nil { - return x.Cpu + return x.Hardware } return nil } @@ -317,7 +1004,7 @@ type Address struct { func (x *Address) Reset() { *x = Address{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[4] + mi := &file_api_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -330,7 +1017,7 @@ func (x *Address) String() string { func (*Address) ProtoMessage() {} func (x *Address) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[4] + mi := &file_api_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -343,7 +1030,7 @@ func (x *Address) ProtoReflect() protoreflect.Message { // Deprecated: Use Address.ProtoReflect.Descriptor instead. func (*Address) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{4} + return file_api_proto_rawDescGZIP(), []int{12} } func (x *Address) GetType() string { @@ -374,7 +1061,7 @@ type CreateServerResponse struct { func (x *CreateServerResponse) Reset() { *x = CreateServerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[5] + mi := &file_api_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -387,7 +1074,7 @@ func (x *CreateServerResponse) String() string { func (*CreateServerResponse) ProtoMessage() {} func (x *CreateServerResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[5] + mi := &file_api_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -400,7 +1087,7 @@ func (x *CreateServerResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateServerResponse.ProtoReflect.Descriptor instead. func (*CreateServerResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{5} + return file_api_proto_rawDescGZIP(), []int{13} } func (x *CreateServerResponse) GetWipe() bool { @@ -442,7 +1129,7 @@ type MarkServerAsWipedRequest struct { func (x *MarkServerAsWipedRequest) Reset() { *x = MarkServerAsWipedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[6] + mi := &file_api_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -455,7 +1142,7 @@ func (x *MarkServerAsWipedRequest) String() string { func (*MarkServerAsWipedRequest) ProtoMessage() {} func (x *MarkServerAsWipedRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[6] + mi := &file_api_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -468,7 +1155,7 @@ func (x *MarkServerAsWipedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkServerAsWipedRequest.ProtoReflect.Descriptor instead. func (*MarkServerAsWipedRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{6} + return file_api_proto_rawDescGZIP(), []int{14} } func (x *MarkServerAsWipedRequest) GetUuid() string { @@ -489,7 +1176,7 @@ type HeartbeatRequest struct { func (x *HeartbeatRequest) Reset() { *x = HeartbeatRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[7] + mi := &file_api_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -502,7 +1189,7 @@ func (x *HeartbeatRequest) String() string { func (*HeartbeatRequest) ProtoMessage() {} func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[7] + mi := &file_api_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -515,7 +1202,7 @@ func (x *HeartbeatRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead. func (*HeartbeatRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{7} + return file_api_proto_rawDescGZIP(), []int{15} } func (x *HeartbeatRequest) GetUuid() string { @@ -534,7 +1221,7 @@ type MarkServerAsWipedResponse struct { func (x *MarkServerAsWipedResponse) Reset() { *x = MarkServerAsWipedResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[8] + mi := &file_api_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -547,7 +1234,7 @@ func (x *MarkServerAsWipedResponse) String() string { func (*MarkServerAsWipedResponse) ProtoMessage() {} func (x *MarkServerAsWipedResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[8] + mi := &file_api_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -560,7 +1247,7 @@ func (x *MarkServerAsWipedResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use MarkServerAsWipedResponse.ProtoReflect.Descriptor instead. func (*MarkServerAsWipedResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{8} + return file_api_proto_rawDescGZIP(), []int{16} } type HeartbeatResponse struct { @@ -572,7 +1259,7 @@ type HeartbeatResponse struct { func (x *HeartbeatResponse) Reset() { *x = HeartbeatResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[9] + mi := &file_api_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -585,7 +1272,7 @@ func (x *HeartbeatResponse) String() string { func (*HeartbeatResponse) ProtoMessage() {} func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[9] + mi := &file_api_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -598,7 +1285,7 @@ func (x *HeartbeatResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead. func (*HeartbeatResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{9} + return file_api_proto_rawDescGZIP(), []int{17} } type UpdateBMCInfoRequest struct { @@ -613,7 +1300,7 @@ type UpdateBMCInfoRequest struct { func (x *UpdateBMCInfoRequest) Reset() { *x = UpdateBMCInfoRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[10] + mi := &file_api_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -626,7 +1313,7 @@ func (x *UpdateBMCInfoRequest) String() string { func (*UpdateBMCInfoRequest) ProtoMessage() {} func (x *UpdateBMCInfoRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[10] + mi := &file_api_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -639,7 +1326,7 @@ func (x *UpdateBMCInfoRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBMCInfoRequest.ProtoReflect.Descriptor instead. func (*UpdateBMCInfoRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{10} + return file_api_proto_rawDescGZIP(), []int{18} } func (x *UpdateBMCInfoRequest) GetUuid() string { @@ -665,7 +1352,7 @@ type UpdateBMCInfoResponse struct { func (x *UpdateBMCInfoResponse) Reset() { *x = UpdateBMCInfoResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[11] + mi := &file_api_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -678,7 +1365,7 @@ func (x *UpdateBMCInfoResponse) String() string { func (*UpdateBMCInfoResponse) ProtoMessage() {} func (x *UpdateBMCInfoResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[11] + mi := &file_api_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -691,7 +1378,7 @@ func (x *UpdateBMCInfoResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBMCInfoResponse.ProtoReflect.Descriptor instead. func (*UpdateBMCInfoResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{11} + return file_api_proto_rawDescGZIP(), []int{19} } type ReconcileServerAddressesRequest struct { @@ -706,7 +1393,7 @@ type ReconcileServerAddressesRequest struct { func (x *ReconcileServerAddressesRequest) Reset() { *x = ReconcileServerAddressesRequest{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[12] + mi := &file_api_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -719,7 +1406,7 @@ func (x *ReconcileServerAddressesRequest) String() string { func (*ReconcileServerAddressesRequest) ProtoMessage() {} func (x *ReconcileServerAddressesRequest) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[12] + mi := &file_api_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -732,7 +1419,7 @@ func (x *ReconcileServerAddressesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReconcileServerAddressesRequest.ProtoReflect.Descriptor instead. func (*ReconcileServerAddressesRequest) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{12} + return file_api_proto_rawDescGZIP(), []int{20} } func (x *ReconcileServerAddressesRequest) GetUuid() string { @@ -758,7 +1445,7 @@ type ReconcileServerAddressesResponse struct { func (x *ReconcileServerAddressesResponse) Reset() { *x = ReconcileServerAddressesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_api_proto_msgTypes[13] + mi := &file_api_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -771,7 +1458,7 @@ func (x *ReconcileServerAddressesResponse) String() string { func (*ReconcileServerAddressesResponse) ProtoMessage() {} func (x *ReconcileServerAddressesResponse) ProtoReflect() protoreflect.Message { - mi := &file_api_proto_msgTypes[13] + mi := &file_api_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -784,7 +1471,7 @@ func (x *ReconcileServerAddressesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReconcileServerAddressesResponse.ProtoReflect.Descriptor instead. func (*ReconcileServerAddressesResponse) Descriptor() ([]byte, []int) { - return file_api_proto_rawDescGZIP(), []int{13} + return file_api_proto_rawDescGZIP(), []int{21} } var File_api_proto protoreflect.FileDescriptor @@ -810,88 +1497,186 @@ var file_api_proto_rawDesc = []byte{ 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6b, 0x75, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6b, 0x75, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0x43, - 0x0a, 0x03, 0x43, 0x50, 0x55, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, - 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, - 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x45, 0x0a, 0x12, 0x73, - 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x11, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x03, 0x63, 0x70, 0x75, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x08, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x50, 0x55, 0x52, 0x03, 0x63, 0x70, 0x75, 0x12, 0x1a, - 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x37, 0x0a, 0x07, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, - 0x77, 0x69, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, 0x69, 0x70, 0x65, - 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x77, 0x69, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, - 0x65, 0x57, 0x69, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x75, 0x70, 0x5f, 0x62, - 0x6d, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x74, 0x75, 0x70, 0x42, - 0x6d, 0x63, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x72, 0x65, 0x62, 0x6f, - 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x2e, 0x0a, 0x18, 0x4d, 0x61, 0x72, - 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 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, 0x22, 0x26, 0x0a, 0x10, 0x48, 0x65, 0x61, - 0x72, 0x74, 0x62, 0x65, 0x61, 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, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, - 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, - 0x49, 0x6e, 0x66, 0x6f, 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, - 0x27, 0x0a, 0x08, 0x62, 0x6d, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x07, 0x62, 0x6d, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x5d, 0x0a, 0x1f, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 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, 0x26, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x22, 0x0a, 0x20, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8d, 0x03, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x43, - 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x18, - 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, - 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x61, - 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x18, 0x52, 0x65, 0x63, 0x6f, 0x6e, - 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, - 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x12, 0x15, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x0d, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x2e, - 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x22, 0xcf, + 0x01, 0x0a, 0x09, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x12, 0x22, 0x0a, 0x0c, + 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, + 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, + 0x61, 0x6d, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, + 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x70, 0x65, 0x65, + 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x09, 0x63, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x22, 0xc5, 0x01, 0x0a, 0x12, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x28, 0x0a, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0e, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x72, 0x65, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x61, + 0x64, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, + 0x27, 0x0a, 0x0f, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, + 0x73, 0x6f, 0x72, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x0a, 0x70, 0x72, 0x6f, 0x63, + 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x52, 0x0a, 0x70, 0x72, + 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x22, 0xb8, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c, 0x6d, 0x61, 0x6e, + 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x6d, 0x61, 0x6e, 0x75, 0x66, 0x61, 0x63, 0x74, 0x75, 0x72, 0x65, 0x72, 0x12, 0x21, 0x0a, + 0x0c, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x4e, + 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x73, 0x70, 0x65, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x73, 0x70, + 0x65, 0x65, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x49, 0x6e, + 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, + 0x61, 0x6c, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, + 0x6f, 0x74, 0x61, 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x6d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, + 0x07, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x22, 0xd4, 0x01, 0x0a, 0x0d, 0x53, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x04, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, + 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x72, 0x69, + 0x61, 0x6c, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x77, + 0x77, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x77, 0x77, 0x69, 0x64, 0x22, + 0x84, 0x01, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x64, 0x65, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2c, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x64, + 0x65, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x94, 0x01, 0x0a, 0x10, 0x4e, 0x65, 0x74, 0x77, 0x6f, + 0x72, 0x6b, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, + 0x74, 0x75, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x6d, 0x74, 0x75, 0x12, 0x10, 0x0a, + 0x03, 0x6d, 0x61, 0x63, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6d, 0x61, 0x63, 0x12, + 0x1c, 0x0a, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, 0x74, 0x0a, + 0x12, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, + 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x35, 0x0a, 0x0a, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, + 0x63, 0x65, 0x73, 0x22, 0x8e, 0x02, 0x0a, 0x13, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x12, 0x31, 0x0a, 0x07, 0x63, + 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x12, 0x2e, + 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x31, + 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, + 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x12, 0x31, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, + 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, 0x6e, 0x65, 0x74, + 0x77, 0x6f, 0x72, 0x6b, 0x22, 0x67, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x34, 0x0a, 0x08, 0x68, + 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, + 0x61, 0x70, 0x69, 0x2e, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x68, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x37, 0x0a, + 0x07, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x12, 0x0a, 0x04, 0x77, 0x69, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x77, + 0x69, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, + 0x77, 0x69, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x65, + 0x63, 0x75, 0x72, 0x65, 0x57, 0x69, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x65, 0x74, 0x75, + 0x70, 0x5f, 0x62, 0x6d, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x74, + 0x75, 0x70, 0x42, 0x6d, 0x63, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x5f, + 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0d, 0x72, + 0x65, 0x62, 0x6f, 0x6f, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x22, 0x2e, 0x0a, 0x18, + 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, + 0x64, 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, 0x22, 0x26, 0x0a, 0x10, + 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 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, 0x22, 0x1b, 0x0a, 0x19, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x13, 0x0a, 0x11, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x53, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 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, 0x27, 0x0a, 0x08, 0x62, 0x6d, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x4d, 0x43, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x07, 0x62, 0x6d, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x17, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x73, - 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x69, 0x64, 0x65, - 0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2d, 0x6d, 0x61, - 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x61, - 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5d, 0x0a, 0x1f, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, + 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, + 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, 0x26, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x3e, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x72, 0x61, + 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, + 0x6e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x53, 0x53, 0x44, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, + 0x48, 0x44, 0x44, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x56, 0x4d, 0x65, 0x10, 0x03, 0x12, + 0x06, 0x0a, 0x02, 0x53, 0x44, 0x10, 0x04, 0x32, 0x8d, 0x03, 0x0a, 0x05, 0x41, 0x67, 0x65, 0x6e, + 0x74, 0x12, 0x43, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x11, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, 0x65, 0x64, 0x12, 0x1d, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, + 0x70, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x61, 0x70, 0x69, + 0x2e, 0x4d, 0x61, 0x72, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x73, 0x57, 0x69, 0x70, + 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x18, 0x52, 0x65, + 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, + 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x61, + 0x70, 0x69, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6e, 0x63, 0x69, 0x6c, 0x65, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x09, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x48, 0x65, + 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x46, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x61, 0x70, + 0x69, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x42, 0x4d, 0x43, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x4c, 0x5a, 0x4a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x61, 0x6c, 0x6f, 0x73, 0x2d, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x73, 0x2f, 0x73, 0x69, 0x64, 0x65, 0x72, 0x6f, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, + 0x69, 0x64, 0x65, 0x72, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2d, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -907,45 +1692,64 @@ func file_api_proto_rawDescGZIP() []byte { } var ( - file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 14) - file_api_proto_goTypes = []interface{}{ - (*BMCInfo)(nil), // 0: api.BMCInfo - (*SystemInformation)(nil), // 1: api.SystemInformation - (*CPU)(nil), // 2: api.CPU - (*CreateServerRequest)(nil), // 3: api.CreateServerRequest - (*Address)(nil), // 4: api.Address - (*CreateServerResponse)(nil), // 5: api.CreateServerResponse - (*MarkServerAsWipedRequest)(nil), // 6: api.MarkServerAsWipedRequest - (*HeartbeatRequest)(nil), // 7: api.HeartbeatRequest - (*MarkServerAsWipedResponse)(nil), // 8: api.MarkServerAsWipedResponse - (*HeartbeatResponse)(nil), // 9: api.HeartbeatResponse - (*UpdateBMCInfoRequest)(nil), // 10: api.UpdateBMCInfoRequest - (*UpdateBMCInfoResponse)(nil), // 11: api.UpdateBMCInfoResponse - (*ReconcileServerAddressesRequest)(nil), // 12: api.ReconcileServerAddressesRequest - (*ReconcileServerAddressesResponse)(nil), // 13: api.ReconcileServerAddressesResponse + file_api_proto_enumTypes = make([]protoimpl.EnumInfo, 1) + file_api_proto_msgTypes = make([]protoimpl.MessageInfo, 22) + file_api_proto_goTypes = []interface{}{ + (StorageType)(0), // 0: api.StorageType + (*BMCInfo)(nil), // 1: api.BMCInfo + (*SystemInformation)(nil), // 2: api.SystemInformation + (*Processor)(nil), // 3: api.Processor + (*ComputeInformation)(nil), // 4: api.ComputeInformation + (*MemoryModule)(nil), // 5: api.MemoryModule + (*MemoryInformation)(nil), // 6: api.MemoryInformation + (*StorageDevice)(nil), // 7: api.StorageDevice + (*StorageInformation)(nil), // 8: api.StorageInformation + (*NetworkInterface)(nil), // 9: api.NetworkInterface + (*NetworkInformation)(nil), // 10: api.NetworkInformation + (*HardwareInformation)(nil), // 11: api.HardwareInformation + (*CreateServerRequest)(nil), // 12: api.CreateServerRequest + (*Address)(nil), // 13: api.Address + (*CreateServerResponse)(nil), // 14: api.CreateServerResponse + (*MarkServerAsWipedRequest)(nil), // 15: api.MarkServerAsWipedRequest + (*HeartbeatRequest)(nil), // 16: api.HeartbeatRequest + (*MarkServerAsWipedResponse)(nil), // 17: api.MarkServerAsWipedResponse + (*HeartbeatResponse)(nil), // 18: api.HeartbeatResponse + (*UpdateBMCInfoRequest)(nil), // 19: api.UpdateBMCInfoRequest + (*UpdateBMCInfoResponse)(nil), // 20: api.UpdateBMCInfoResponse + (*ReconcileServerAddressesRequest)(nil), // 21: api.ReconcileServerAddressesRequest + (*ReconcileServerAddressesResponse)(nil), // 22: api.ReconcileServerAddressesResponse } ) var file_api_proto_depIdxs = []int32{ - 1, // 0: api.CreateServerRequest.system_information:type_name -> api.SystemInformation - 2, // 1: api.CreateServerRequest.cpu:type_name -> api.CPU - 0, // 2: api.UpdateBMCInfoRequest.bmc_info:type_name -> api.BMCInfo - 4, // 3: api.ReconcileServerAddressesRequest.address:type_name -> api.Address - 3, // 4: api.Agent.CreateServer:input_type -> api.CreateServerRequest - 6, // 5: api.Agent.MarkServerAsWiped:input_type -> api.MarkServerAsWipedRequest - 12, // 6: api.Agent.ReconcileServerAddresses:input_type -> api.ReconcileServerAddressesRequest - 7, // 7: api.Agent.Heartbeat:input_type -> api.HeartbeatRequest - 10, // 8: api.Agent.UpdateBMCInfo:input_type -> api.UpdateBMCInfoRequest - 5, // 9: api.Agent.CreateServer:output_type -> api.CreateServerResponse - 8, // 10: api.Agent.MarkServerAsWiped:output_type -> api.MarkServerAsWipedResponse - 13, // 11: api.Agent.ReconcileServerAddresses:output_type -> api.ReconcileServerAddressesResponse - 9, // 12: api.Agent.Heartbeat:output_type -> api.HeartbeatResponse - 11, // 13: api.Agent.UpdateBMCInfo:output_type -> api.UpdateBMCInfoResponse - 9, // [9:14] is the sub-list for method output_type - 4, // [4:9] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 3, // 0: api.ComputeInformation.processors:type_name -> api.Processor + 5, // 1: api.MemoryInformation.modules:type_name -> api.MemoryModule + 0, // 2: api.StorageDevice.type:type_name -> api.StorageType + 7, // 3: api.StorageInformation.devices:type_name -> api.StorageDevice + 9, // 4: api.NetworkInformation.interfaces:type_name -> api.NetworkInterface + 2, // 5: api.HardwareInformation.system:type_name -> api.SystemInformation + 4, // 6: api.HardwareInformation.compute:type_name -> api.ComputeInformation + 6, // 7: api.HardwareInformation.memory:type_name -> api.MemoryInformation + 8, // 8: api.HardwareInformation.storage:type_name -> api.StorageInformation + 10, // 9: api.HardwareInformation.network:type_name -> api.NetworkInformation + 11, // 10: api.CreateServerRequest.hardware:type_name -> api.HardwareInformation + 1, // 11: api.UpdateBMCInfoRequest.bmc_info:type_name -> api.BMCInfo + 13, // 12: api.ReconcileServerAddressesRequest.address:type_name -> api.Address + 12, // 13: api.Agent.CreateServer:input_type -> api.CreateServerRequest + 15, // 14: api.Agent.MarkServerAsWiped:input_type -> api.MarkServerAsWipedRequest + 21, // 15: api.Agent.ReconcileServerAddresses:input_type -> api.ReconcileServerAddressesRequest + 16, // 16: api.Agent.Heartbeat:input_type -> api.HeartbeatRequest + 19, // 17: api.Agent.UpdateBMCInfo:input_type -> api.UpdateBMCInfoRequest + 14, // 18: api.Agent.CreateServer:output_type -> api.CreateServerResponse + 17, // 19: api.Agent.MarkServerAsWiped:output_type -> api.MarkServerAsWipedResponse + 22, // 20: api.Agent.ReconcileServerAddresses:output_type -> api.ReconcileServerAddressesResponse + 18, // 21: api.Agent.Heartbeat:output_type -> api.HeartbeatResponse + 20, // 22: api.Agent.UpdateBMCInfo:output_type -> api.UpdateBMCInfoResponse + 18, // [18:23] is the sub-list for method output_type + 13, // [13:18] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_api_proto_init() } @@ -979,7 +1783,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CPU); i { + switch v := v.(*Processor); i { case 0: return &v.state case 1: @@ -991,7 +1795,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateServerRequest); i { + switch v := v.(*ComputeInformation); i { case 0: return &v.state case 1: @@ -1003,7 +1807,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Address); i { + switch v := v.(*MemoryModule); i { case 0: return &v.state case 1: @@ -1015,7 +1819,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateServerResponse); i { + switch v := v.(*MemoryInformation); i { case 0: return &v.state case 1: @@ -1027,7 +1831,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkServerAsWipedRequest); i { + switch v := v.(*StorageDevice); i { case 0: return &v.state case 1: @@ -1039,7 +1843,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeartbeatRequest); i { + switch v := v.(*StorageInformation); i { case 0: return &v.state case 1: @@ -1051,7 +1855,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MarkServerAsWipedResponse); i { + switch v := v.(*NetworkInterface); i { case 0: return &v.state case 1: @@ -1063,7 +1867,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HeartbeatResponse); i { + switch v := v.(*NetworkInformation); i { case 0: return &v.state case 1: @@ -1075,7 +1879,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateBMCInfoRequest); i { + switch v := v.(*HardwareInformation); i { case 0: return &v.state case 1: @@ -1087,7 +1891,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateBMCInfoResponse); i { + switch v := v.(*CreateServerRequest); i { case 0: return &v.state case 1: @@ -1099,7 +1903,7 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ReconcileServerAddressesRequest); i { + switch v := v.(*Address); i { case 0: return &v.state case 1: @@ -1111,6 +1915,102 @@ func file_api_proto_init() { } } file_api_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateServerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkServerAsWipedRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeartbeatRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MarkServerAsWipedResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HeartbeatResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBMCInfoRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateBMCInfoResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ReconcileServerAddressesRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ReconcileServerAddressesResponse); i { case 0: return &v.state @@ -1128,13 +2028,14 @@ func file_api_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_proto_rawDesc, - NumEnums: 0, - NumMessages: 14, + NumEnums: 1, + NumMessages: 22, NumExtensions: 0, NumServices: 1, }, GoTypes: file_api_proto_goTypes, DependencyIndexes: file_api_proto_depIdxs, + EnumInfos: file_api_proto_enumTypes, MessageInfos: file_api_proto_msgTypes, }.Build() File_api_proto = out.File diff --git a/app/sidero-controller-manager/internal/api/api.proto b/app/sidero-controller-manager/internal/api/api.proto index da142a338..9716201ba 100644 --- a/app/sidero-controller-manager/internal/api/api.proto +++ b/app/sidero-controller-manager/internal/api/api.proto @@ -32,14 +32,86 @@ message SystemInformation { string family = 7; } -message CPU { +message Processor { string manufacturer = 1; - string version = 2; + string product_name = 2; + string serial_number = 3; + uint32 speed = 4; + uint32 core_count = 5; + uint32 thread_count = 6; +} + +message ComputeInformation { + uint32 total_core_count = 1; + uint32 total_thread_count = 2; + uint32 processor_count = 3; + repeated Processor processors = 4; +} + +message MemoryModule { + string manufacturer = 1; + string product_name = 2; + string serial_number = 3; + string type = 4; + uint32 size = 5; + uint32 speed = 6; +} + +message MemoryInformation { + uint32 total_size = 1; + uint32 module_count = 2; + repeated MemoryModule modules = 3; +} + +enum StorageType { + Unknown = 0; + SSD = 1; + HDD = 2; + NVMe = 3; + SD = 4; +} + +message StorageDevice { + StorageType type = 1; + uint64 size = 2; + string model = 3; + string serial = 4; + string name = 5; + string device_name = 6; + string uuid = 7; + string wwid = 8; +} + +message StorageInformation { + uint64 total_size = 1; + uint32 device_count = 2; + repeated StorageDevice devices = 3; +} + +message NetworkInterface { + uint32 index = 1; + string name = 2; + string flags = 3; + uint32 mtu = 4; + string mac = 5; + repeated string addresses = 6; +} + +message NetworkInformation { + uint32 interface_count = 1; + repeated NetworkInterface interfaces = 2; +} + +message HardwareInformation { + SystemInformation system = 1; + ComputeInformation compute = 2; + MemoryInformation memory = 3; + StorageInformation storage = 4; + NetworkInformation network = 5; } message CreateServerRequest { - SystemInformation system_information = 1; - CPU cpu = 2; + HardwareInformation hardware = 1; string hostname = 3; } @@ -55,8 +127,8 @@ message CreateServerResponse { double reboot_timeout = 4; } -message MarkServerAsWipedRequest { string uuid = 1; } -message HeartbeatRequest { string uuid = 1; } +message MarkServerAsWipedRequest {string uuid = 1;} +message HeartbeatRequest {string uuid = 1;} message MarkServerAsWipedResponse {} message HeartbeatResponse {} diff --git a/app/sidero-controller-manager/internal/ipxe/ipxe_server.go b/app/sidero-controller-manager/internal/ipxe/ipxe_server.go index ea290f0fb..16a0b524e 100644 --- a/app/sidero-controller-manager/internal/ipxe/ipxe_server.go +++ b/app/sidero-controller-manager/internal/ipxe/ipxe_server.go @@ -32,7 +32,7 @@ import ( "github.com/talos-systems/talos/pkg/machinery/kernel" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/siderolink" "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types" diff --git a/app/sidero-controller-manager/internal/metadata/metadata_server.go b/app/sidero-controller-manager/internal/metadata/metadata_server.go index db976cae3..74ae439ea 100644 --- a/app/sidero-controller-manager/internal/metadata/metadata_server.go +++ b/app/sidero-controller-manager/internal/metadata/metadata_server.go @@ -22,7 +22,7 @@ import ( runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) type errorWithCode struct { diff --git a/app/sidero-controller-manager/internal/power/api/api.go b/app/sidero-controller-manager/internal/power/api/api.go index 2a45b0f87..da5e08a03 100644 --- a/app/sidero-controller-manager/internal/power/api/api.go +++ b/app/sidero-controller-manager/internal/power/api/api.go @@ -14,7 +14,7 @@ import ( "net/http" "time" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/metal" ) diff --git a/app/sidero-controller-manager/internal/power/factory.go b/app/sidero-controller-manager/internal/power/factory.go index 840395b20..808415256 100644 --- a/app/sidero-controller-manager/internal/power/factory.go +++ b/app/sidero-controller-manager/internal/power/factory.go @@ -10,7 +10,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/api" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/ipmi" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/metal" diff --git a/app/sidero-controller-manager/internal/power/ipmi/ipmi.go b/app/sidero-controller-manager/internal/power/ipmi/ipmi.go index bfacf3b75..62216c707 100644 --- a/app/sidero-controller-manager/internal/power/ipmi/ipmi.go +++ b/app/sidero-controller-manager/internal/power/ipmi/ipmi.go @@ -9,7 +9,7 @@ import ( goipmi "github.com/pensando/goipmi" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/power/metal" ) diff --git a/app/sidero-controller-manager/internal/server/server.go b/app/sidero-controller-manager/internal/server/server.go index b21fef9e8..3bad1203e 100644 --- a/app/sidero-controller-manager/internal/server/server.go +++ b/app/sidero-controller-manager/internal/server/server.go @@ -6,6 +6,7 @@ package server import ( "context" + "fmt" "log" "reflect" "time" @@ -25,7 +26,7 @@ import ( "sigs.k8s.io/cluster-api/util/patch" controllerclient "sigs.k8s.io/controller-runtime/pkg/client" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/app/sidero-controller-manager/internal/api" "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/constants" ) @@ -46,8 +47,9 @@ type server struct { // CreateServer implements api.AgentServer. func (s *server) CreateServer(ctx context.Context, in *api.CreateServerRequest) (*api.CreateServerResponse, error) { obj := &metalv1.Server{} + uuid := in.GetHardware().GetSystem().GetUuid() - if err := s.c.Get(ctx, types.NamespacedName{Name: in.GetSystemInformation().GetUuid()}, obj); err != nil { + if err := s.c.Get(ctx, types.NamespacedName{Name: uuid}, obj); err != nil { if !apierrors.IsNotFound(err) { return nil, err } @@ -58,22 +60,11 @@ func (s *server) CreateServer(ctx context.Context, in *api.CreateServerRequest) APIVersion: metalv1.GroupVersion.Version, }, ObjectMeta: metav1.ObjectMeta{ - Name: in.GetSystemInformation().GetUuid(), + Name: uuid, }, Spec: metalv1.ServerSpec{ + Hardware: MapHardwareInformation(in.GetHardware()), Hostname: in.GetHostname(), - SystemInformation: &metalv1.SystemInformation{ - Manufacturer: in.GetSystemInformation().GetManufacturer(), - ProductName: in.GetSystemInformation().GetProductName(), - Version: in.GetSystemInformation().GetVersion(), - SerialNumber: in.GetSystemInformation().GetSerialNumber(), - SKUNumber: in.GetSystemInformation().GetSkuNumber(), - Family: in.GetSystemInformation().GetFamily(), - }, - CPU: &metalv1.CPUInformation{ - Manufacturer: in.GetCpu().GetManufacturer(), - Version: in.GetCpu().GetVersion(), - }, Accepted: s.autoAccept, }, } @@ -89,7 +80,7 @@ func (s *server) CreateServer(ctx context.Context, in *api.CreateServerRequest) s.recorder.Event(ref, corev1.EventTypeNormal, "Server Registration", "Server auto-registered via API.") - log.Printf("Added %s", in.GetSystemInformation().GetUuid()) + log.Printf("Added %s", uuid) } resp := &api.CreateServerResponse{} @@ -400,3 +391,87 @@ func CreateServer(c controllerclient.Client, recorder record.EventRecorder, sche return s } + +func MapHardwareInformation(hw *api.HardwareInformation) *metalv1.HardwareInformation { + processors := make([]*metalv1.Processor, hw.GetCompute().GetProcessorCount()) + for i, v := range hw.GetCompute().GetProcessors() { + processors[i] = &metalv1.Processor{ + Manufacturer: v.GetManufacturer(), + ProductName: v.GetProductName(), + SerialNumber: v.GetSerialNumber(), + Speed: v.GetSpeed(), + CoreCount: v.GetCoreCount(), + ThreadCount: v.GetThreadCount(), + } + } + + memoryModules := make([]*metalv1.MemoryModule, hw.GetMemory().GetModuleCount()) + for i, v := range hw.GetMemory().GetModules() { + memoryModules[i] = &metalv1.MemoryModule{ + Manufacturer: v.GetManufacturer(), + ProductName: v.GetProductName(), + SerialNumber: v.GetSerialNumber(), + Type: v.GetType(), + Size: v.GetSize(), + Speed: v.GetSpeed(), + } + } + + storageDevices := make([]*metalv1.StorageDevice, hw.GetStorage().GetDeviceCount()) + for i, v := range hw.GetStorage().GetDevices() { + storageDevices[i] = &metalv1.StorageDevice{ + Type: v.GetType().String(), + Size: v.GetSize(), + Model: v.GetModel(), + Serial: v.GetSerial(), + Name: v.GetName(), + DeviceName: v.GetDeviceName(), + UUID: v.GetUuid(), + WWID: v.GetWwid(), + } + } + + networkInterfaces := make([]*metalv1.NetworkInterface, hw.GetNetwork().GetInterfaceCount()) + for i, v := range hw.GetNetwork().GetInterfaces() { + networkInterfaces[i] = &metalv1.NetworkInterface{ + Index: v.GetIndex(), + Name: v.GetName(), + Flags: v.GetFlags(), + MTU: v.GetMtu(), + MAC: v.GetMac(), + Addresses: v.GetAddresses(), + } + } + + return &metalv1.HardwareInformation{ + System: &metalv1.SystemInformation{ + Uuid: hw.GetSystem().GetUuid(), + Manufacturer: hw.GetSystem().GetManufacturer(), + ProductName: hw.GetSystem().GetProductName(), + Version: hw.GetSystem().GetVersion(), + SerialNumber: hw.GetSystem().GetSerialNumber(), + SKUNumber: hw.GetSystem().GetSkuNumber(), + Family: hw.GetSystem().GetFamily(), + }, + Compute: &metalv1.ComputeInformation{ + TotalCoreCount: hw.GetCompute().GetTotalCoreCount(), + TotalThreadCount: hw.GetCompute().GetTotalThreadCount(), + ProcessorCount: hw.GetCompute().GetProcessorCount(), + Processors: processors, + }, + Memory: &metalv1.MemoryInformation{ + TotalSize: fmt.Sprintf("%d GB", hw.GetMemory().GetTotalSize()/1024), + ModuleCount: hw.GetMemory().GetModuleCount(), + Modules: memoryModules, + }, + Storage: &metalv1.StorageInformation{ + TotalSize: fmt.Sprintf("%d GB", hw.GetStorage().GetTotalSize()/1024/1024/1024), + DeviceCount: hw.GetStorage().GetDeviceCount(), + Devices: storageDevices, + }, + Network: &metalv1.NetworkInformation{ + InterfaceCount: hw.GetNetwork().GetInterfaceCount(), + Interfaces: networkInterfaces, + }, + } +} diff --git a/go.mod b/go.mod index 89a6d9613..29e9fadee 100644 --- a/go.mod +++ b/go.mod @@ -21,7 +21,7 @@ require ( github.com/talos-systems/go-kmsg v0.1.1 github.com/talos-systems/go-procfs v0.1.0 github.com/talos-systems/go-retry v0.3.1 - github.com/talos-systems/go-smbios v0.1.1 + github.com/talos-systems/go-smbios v0.1.2-0.20220202124743-3f1e775b7e3e github.com/talos-systems/grpc-proxy v0.3.0 github.com/talos-systems/net v0.3.2 github.com/talos-systems/siderolink v0.1.1-0.20211130121818-9902ad2774f0 diff --git a/go.sum b/go.sum index 025a9c78e..0035bd58f 100644 --- a/go.sum +++ b/go.sum @@ -705,8 +705,8 @@ github.com/talos-systems/go-procfs v0.1.0/go.mod h1:ATyUGFQIW8OnbnmvqefZWVPgL9g+ github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM= github.com/talos-systems/go-retry v0.3.1 h1:GjjyHB8i1CJpb1O5qYPMljq74cRQ5uiDoyMaWddA5FA= github.com/talos-systems/go-retry v0.3.1/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM= -github.com/talos-systems/go-smbios v0.1.1 h1:Au6obB/Pp0i0JHhvPlzONk5aoNseosO2BUsmvWWi7y8= -github.com/talos-systems/go-smbios v0.1.1/go.mod h1:vk76naUSZaWE8Z95wbDn51FgH0goECM4oK3KY2hYSMU= +github.com/talos-systems/go-smbios v0.1.2-0.20220202124743-3f1e775b7e3e h1:z2ig8zuE00kbVhyWmTQdDWbDIN5HnCKaouyjiTHCMxs= +github.com/talos-systems/go-smbios v0.1.2-0.20220202124743-3f1e775b7e3e/go.mod h1:vk76naUSZaWE8Z95wbDn51FgH0goECM4oK3KY2hYSMU= github.com/talos-systems/goipmi v0.0.0-20211214143420-35f956689e67 h1:1MyiKkPFn0OnpOnmMMVlvFtmeUB/HIRzDVL66DQBOXg= github.com/talos-systems/goipmi v0.0.0-20211214143420-35f956689e67/go.mod h1:Vr1Oadtcem03hG2RUT/dpSQS5md9d6rJ9nA0lUBC91Q= github.com/talos-systems/grpc-proxy v0.3.0 h1:pM4P6GqzjmZzq6jAxeP2mzjuTbx9B2E5peVdi2bufM4= diff --git a/hack/release.toml b/hack/release.toml index ca28f806f..cdf92ad83 100644 --- a/hack/release.toml +++ b/hack/release.toml @@ -6,7 +6,7 @@ github_repo = "talos-systems/sidero" match_deps = "^github.com/(talos-systems/[a-zA-Z0-9-]+)$" # previous release -previous = "v0.4.0" +previous = "v0.5.0" pre_release = true @@ -14,79 +14,21 @@ preface = """\ """ [notes] - - [notes.capi] - title = "CAPI v1beta1" - description = """\ -This release of Sidero brings compatibility with CAPI v1beta1. -""" - - [notes.ipmi-pxe-method] - title = "IPMI PXE Method" - description = """\ -IPMI PXE method (UEFI, BIOS) can now be configured with `SIDERO_CONTROLLER_MANAGER_IPMI_PXE_METHOD` while installing Sidero. -""" - - [notes.siderolink] - title = "SideroLink" + [notes.metalsiderodev] + title = "New API Version for `metal.sidero.dev` Resources" description = """\ -Sidero now connects to all servers using SideroLink (available only with Talos >= 0.14). -This enables streaming of kernel logs and events back to Sidero. +Resources under `metal.sidero.dev` (`Server`, `ServerClass`, `Environment`) now have a new version `v1alpha2`. +Old version `v1alpha1` is still supported, but it is recommended to update templates to use the new resource version. -All server logs can now be viewed by getting logs of one of the container of the `sidero-controller-manager`: +#### `Server` Changes -``` -kubectl logs -f -n sidero-system deployment/sidero-controller-manager -c serverlogs -``` +Hardware information was restructured and extended when compared with `v1alpha1`: -Events: - -``` -kubectl logs -f -n sidero-system deployment/sidero-controller-manager -c serverevents -``` -""" - - [notes.addresses] - title = "Machine Addresses" - description = """\ -Sidero now populates `MetalMachine` addresses with the ones discovered from Siderolink server events. -Which is then propagated to CAPI `Machine` resources. - -Requires Talos >= v0.14. -""" +* `.spec.systemInformation` -> `.spec.hardware.system` +* `.spec.cpu` -> `.spec.hardware.compute.processors[]` - [notes.conditions] - title = "New `MetalMachines` Conditions" - description = """\ -New set of conditions is now available which can simplify cluster troubleshooting: - -- `TalosConfigLoaded` is set to false when the config load has failed. -- `TalosConfigValidated` is set to false when the config validation -fails on the node. -- `TalosInstalled` is set to true/false when talos installer finishes. - -Requires Talos >= v0.14. -""" - - [notes.pxeboot] - title = "Retry PXE Boot" - description = """\ -Sidero server controller now keeps track of Talos installation progress. -Now the node will be PXE booted until Talos installation succeeds. -""" - - [notes.bootfromdisk] - title = "iPXE Boot From Disk Method" - description = """\ -iPXE boot from disk method can now be set not only on the global level, but also in the Server and ServerClass specs. -""" - - [notes.clustertemplate] - title = "Cluster Template" - description = """\ -Sidero ships with new cluster template without `init` nodes. -This template is only compatible with Talos >= 0.14 (it requires SideroLink feature which was introduced in Talos 0.14). +#### `ServerClass` Changes -On upgrade, Sidero supports clusters running Talos < 0.14 if they were created before the upgrade. -Use [legacy template](https://github.com/talos-systems/sidero/blob/release-0.4/templates/cluster-template.yaml) to deploy clusters with Talos < 0.14. +* `.spec.qualifiers.systemInformation` -> `.spec.qualifiers.system` +* `.spec.qualifiers.cpu` -> `.spec.qualifiers.hardware.compute.processors[]` """ diff --git a/internal/client/client.go b/internal/client/client.go index 833ac58f4..ef4ea218b 100644 --- a/internal/client/client.go +++ b/internal/client/client.go @@ -14,7 +14,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // NewClient is responsible for creating a controller-runtime k8s client with all schemas. diff --git a/sfyra/go.sum b/sfyra/go.sum index 6c997196e..aa00a2c3c 100644 --- a/sfyra/go.sum +++ b/sfyra/go.sum @@ -1247,6 +1247,7 @@ github.com/talos-systems/go-retry v0.1.1-0.20201113203059-8c63d290a688/go.mod h1 github.com/talos-systems/go-retry v0.3.1 h1:GjjyHB8i1CJpb1O5qYPMljq74cRQ5uiDoyMaWddA5FA= github.com/talos-systems/go-retry v0.3.1/go.mod h1:HiXQqyVStZ35uSY/MTLWVvQVmC3lIW2MS5VdDaMtoKM= github.com/talos-systems/go-smbios v0.1.1/go.mod h1:vk76naUSZaWE8Z95wbDn51FgH0goECM4oK3KY2hYSMU= +github.com/talos-systems/go-smbios v0.1.2-0.20220202124743-3f1e775b7e3e/go.mod h1:vk76naUSZaWE8Z95wbDn51FgH0goECM4oK3KY2hYSMU= github.com/talos-systems/grpc-proxy v0.3.0/go.mod h1:1TNaCLt0NTdFdz48OCnOM+HbPEIkj3DhCi85+z6zSM8= github.com/talos-systems/net v0.3.0/go.mod h1:VreSAyRmxMtqussAHSKMKkJQa1YwBTSVfkmE4Jydam4= github.com/talos-systems/net v0.3.1-0.20211112122313-0abe5bdae8f8/go.mod h1:zhcGixNJz9dgwFiUwc7gkkAqdVqXagU1SNNoIVXYKGo= diff --git a/sfyra/pkg/capi/cluster.go b/sfyra/pkg/capi/cluster.go index d59cf0804..02df85ad1 100644 --- a/sfyra/pkg/capi/cluster.go +++ b/sfyra/pkg/capi/cluster.go @@ -28,7 +28,7 @@ import ( runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // Cluster attaches to the provisioned CAPI cluster and provides talos.Cluster. diff --git a/sfyra/pkg/capi/metalclient.go b/sfyra/pkg/capi/metalclient.go index 67a0be6e1..e2ee8a7ab 100644 --- a/sfyra/pkg/capi/metalclient.go +++ b/sfyra/pkg/capi/metalclient.go @@ -13,7 +13,7 @@ import ( runtimeclient "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // GetMetalClient builds k8s client with schemes required to access all the CAPI/Sidero/Talos components. diff --git a/sfyra/pkg/constants/constants.go b/sfyra/pkg/constants/constants.go index f11afb29b..2c9e2eb4d 100644 --- a/sfyra/pkg/constants/constants.go +++ b/sfyra/pkg/constants/constants.go @@ -17,4 +17,4 @@ const MTU = 1500 const BootstrapMaster = "bootstrap-master" // SideroAPIVersion is a string we need for creating Sidero resources. -const SideroAPIVersion = "metal.sidero.dev/v1alpha1" +const SideroAPIVersion = "metal.sidero.dev/v1alpha2" diff --git a/sfyra/pkg/loadbalancer/loadbalancer.go b/sfyra/pkg/loadbalancer/loadbalancer.go index 36621c603..3c5fd8384 100644 --- a/sfyra/pkg/loadbalancer/loadbalancer.go +++ b/sfyra/pkg/loadbalancer/loadbalancer.go @@ -26,7 +26,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // ControlPlane implements dynamic loadbalancer for the control plane. diff --git a/sfyra/pkg/tests/compatibility.go b/sfyra/pkg/tests/compatibility.go index bc7fb8764..aec9f034e 100644 --- a/sfyra/pkg/tests/compatibility.go +++ b/sfyra/pkg/tests/compatibility.go @@ -23,7 +23,7 @@ import ( "github.com/talos-systems/go-retry/retry" "github.com/talos-systems/talos/pkg/machinery/kernel" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/sfyra/pkg/capi" "github.com/talos-systems/sidero/sfyra/pkg/constants" "github.com/talos-systems/sidero/sfyra/pkg/talos" @@ -84,9 +84,15 @@ func TestCompatibilityCluster(ctx context.Context, metalClient client.Client, cl serverClassName := envName classSpec := metalv1.ServerClassSpec{ Qualifiers: metalv1.Qualifiers{ - CPU: []metalv1.CPUInformation{ + Hardware: []metalv1.HardwareInformation{ { - Manufacturer: "QEMU", + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "QEMU", + }, + }, + }, }, }, }, diff --git a/sfyra/pkg/tests/environment.go b/sfyra/pkg/tests/environment.go index 63b5dc04d..652945dac 100644 --- a/sfyra/pkg/tests/environment.go +++ b/sfyra/pkg/tests/environment.go @@ -18,7 +18,7 @@ import ( "k8s.io/apimachinery/pkg/types" "sigs.k8s.io/controller-runtime/pkg/client" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/sfyra/pkg/constants" "github.com/talos-systems/sidero/sfyra/pkg/talos" ) diff --git a/sfyra/pkg/tests/match.go b/sfyra/pkg/tests/match.go index 13d8db2ed..d9c6f57ed 100644 --- a/sfyra/pkg/tests/match.go +++ b/sfyra/pkg/tests/match.go @@ -13,7 +13,7 @@ import ( capiv1 "sigs.k8s.io/cluster-api/api/v1beta1" "sigs.k8s.io/controller-runtime/pkg/client" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // TestMatchServersMetalMachines verifies that number of metal machines and servers match. diff --git a/sfyra/pkg/tests/reset.go b/sfyra/pkg/tests/reset.go index 5cb3597d3..4471914ff 100644 --- a/sfyra/pkg/tests/reset.go +++ b/sfyra/pkg/tests/reset.go @@ -16,7 +16,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" ) // TestServerReset verifies that all the servers got reset. diff --git a/sfyra/pkg/tests/server.go b/sfyra/pkg/tests/server.go index e407f4760..ce326b018 100644 --- a/sfyra/pkg/tests/server.go +++ b/sfyra/pkg/tests/server.go @@ -30,7 +30,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" infrav1 "github.com/talos-systems/sidero/app/caps-controller-manager/api/v1alpha3" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" siderotypes "github.com/talos-systems/sidero/app/sidero-controller-manager/pkg/types" "github.com/talos-systems/sidero/sfyra/pkg/capi" "github.com/talos-systems/sidero/sfyra/pkg/constants" @@ -222,8 +222,14 @@ func TestServerAcceptance(ctx context.Context, metalClient client.Client, vmSet // create dummy servers to test with dummySpec := metalv1.ServerSpec{ - CPU: &metalv1.CPUInformation{ - Manufacturer: "DummyCPU", + Hardware: &metalv1.HardwareInformation{ + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "DummyCPU", + }, + }, + }, }, } @@ -302,8 +308,14 @@ func TestServerCordoned(ctx context.Context, metalClient client.Client, vmSet *v // create dummy servers to test with dummySpec := metalv1.ServerSpec{ - CPU: &metalv1.CPUInformation{ - Manufacturer: "DummyManufacturer", + Hardware: &metalv1.HardwareInformation{ + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "DummyManufacturer", + }, + }, + }, }, } @@ -525,9 +537,15 @@ func TestServerPXEBoot(ctx context.Context, metalClient client.Client, cluster t classSpec := metalv1.ServerClassSpec{ Qualifiers: metalv1.Qualifiers{ - CPU: []metalv1.CPUInformation{ + Hardware: []metalv1.HardwareInformation{ { - Manufacturer: "QEMU", + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "QEMU", + }, + }, + }, }, }, }, diff --git a/sfyra/pkg/tests/server_class.go b/sfyra/pkg/tests/server_class.go index 690fafb7e..89e2926db 100644 --- a/sfyra/pkg/tests/server_class.go +++ b/sfyra/pkg/tests/server_class.go @@ -31,7 +31,7 @@ import ( capiclient "sigs.k8s.io/cluster-api/cmd/clusterctl/client" "sigs.k8s.io/controller-runtime/pkg/client" - metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha1" + metalv1 "github.com/talos-systems/sidero/app/sidero-controller-manager/api/v1alpha2" "github.com/talos-systems/sidero/sfyra/pkg/capi" "github.com/talos-systems/sidero/sfyra/pkg/constants" "github.com/talos-systems/sidero/sfyra/pkg/talos" @@ -84,9 +84,15 @@ func TestServerClassCreate(ctx context.Context, metalClient client.Client, vmSet return func(t *testing.T) { classSpec := metalv1.ServerClassSpec{ Qualifiers: metalv1.Qualifiers{ - CPU: []metalv1.CPUInformation{ + Hardware: []metalv1.HardwareInformation{ { - Manufacturer: "QEMU", + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "QEMU", + }, + }, + }, }, }, }, @@ -139,8 +145,14 @@ func TestServerClassPatch(ctx context.Context, metalClient client.Client, cluste return func(t *testing.T) { // Create dummy serverclass + a server dummySpec := metalv1.ServerSpec{ - CPU: &metalv1.CPUInformation{ - Manufacturer: "DummyCPU", + Hardware: &metalv1.HardwareInformation{ + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "DummyCPU", + }, + }, + }, }, Accepted: true, } @@ -168,9 +180,15 @@ func TestServerClassPatch(ctx context.Context, metalClient client.Client, cluste }, }, Qualifiers: metalv1.Qualifiers{ - CPU: []metalv1.CPUInformation{ + Hardware: []metalv1.HardwareInformation{ { - Manufacturer: "DummyCPU", + Compute: &metalv1.ComputeInformation{ + Processors: []*metalv1.Processor{ + { + Manufacturer: "DummyCPU", + }, + }, + }, }, }, }, diff --git a/templates/cluster-template-talos-v0.13.4.yaml b/templates/cluster-template-talos-v0.13.4.yaml index a8896a111..f6c010e67 100644 --- a/templates/cluster-template-talos-v0.13.4.yaml +++ b/templates/cluster-template-talos-v0.13.4.yaml @@ -38,7 +38,7 @@ spec: template: spec: serverClassRef: - apiVersion: metal.sidero.dev/v1alpha1 + apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass name: ${CONTROL_PLANE_SERVERCLASS} --- @@ -102,6 +102,6 @@ spec: template: spec: serverClassRef: - apiVersion: metal.sidero.dev/v1alpha1 + apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass name: ${WORKER_SERVERCLASS} diff --git a/templates/cluster-template.yaml b/templates/cluster-template.yaml index 1a478bffc..735210e9b 100644 --- a/templates/cluster-template.yaml +++ b/templates/cluster-template.yaml @@ -36,7 +36,7 @@ spec: template: spec: serverClassRef: - apiVersion: metal.sidero.dev/v1alpha1 + apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass name: ${CONTROL_PLANE_SERVERCLASS} --- @@ -97,6 +97,6 @@ spec: template: spec: serverClassRef: - apiVersion: metal.sidero.dev/v1alpha1 + apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass name: ${WORKER_SERVERCLASS} diff --git a/website/content/v0.6/Guides/patching.md b/website/content/v0.6/Guides/patching.md index 70609fed3..d46ada807 100644 --- a/website/content/v0.6/Guides/patching.md +++ b/website/content/v0.6/Guides/patching.md @@ -14,7 +14,7 @@ Any patches specified in the server resource are processed by the Sidero control A set of patches may look like this: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server metadata: name: 00000000-0000-0000-0000-d05099d33360 diff --git a/website/content/v0.6/Resource Configuration/environments.md b/website/content/v0.6/Resource Configuration/environments.md index 3545d9f75..226b1b7b9 100644 --- a/website/content/v0.6/Resource Configuration/environments.md +++ b/website/content/v0.6/Resource Configuration/environments.md @@ -20,7 +20,7 @@ The hierarchy from most to least respected is: A sample environment definition looks like this: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Environment metadata: name: default @@ -52,7 +52,7 @@ spec: Example of overriding `"default"` `Environment` at the `Server` level: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server ... spec: @@ -65,7 +65,7 @@ spec: Example of overriding `"default"` `Environment` at the `ServerClass` level: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass ... spec: diff --git a/website/content/v0.6/Resource Configuration/metadata.md b/website/content/v0.6/Resource Configuration/metadata.md index 6cdeccdc1..7e7dfab07 100644 --- a/website/content/v0.6/Resource Configuration/metadata.md +++ b/website/content/v0.6/Resource Configuration/metadata.md @@ -92,7 +92,7 @@ and finally in the control plane `ServerClass` custom resource we augment the ne ```yaml --- -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass metadata: name: cp.small.x86 @@ -112,10 +112,13 @@ spec: interface: eth1 dhcp: true qualifiers: - cpu: - - version: Intel(R) Xeon(R) E-2124G CPU @ 3.40GHz - systemInformation: - - manufacturer: Supermicro + - system: + manufacturer: Supermicro + compute: + processors: + - productName: Intel(R) Xeon(R) E-2124G CPU @ 3.40GHz + memory: + totalSize: 8 GB selector: matchLabels: metal.sidero.dev/serverclass: cp.small.x86 @@ -125,7 +128,7 @@ the workload `ServerClass` defines the complete networking config ```yaml --- -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass metadata: name: general.medium.x86 @@ -148,10 +151,13 @@ spec: - interface: eth1 dhcp: true qualifiers: - cpu: - - version: Intel(R) Xeon(R) E-2136 CPU @ 3.30GHz - systemInformation: - - manufacturer: Supermicro + - system: + manufacturer: Supermicro + compute: + processors: + - productName: Intel(R) Xeon(R) E-2136 CPU @ 3.30GHz + memory: + totalSize: 16 GB selector: matchLabels: metal.sidero.dev/serverclass: general.medium.x86 diff --git a/website/content/v0.6/Resource Configuration/serverclasses.md b/website/content/v0.6/Resource Configuration/serverclasses.md index 272bdb858..350589186 100644 --- a/website/content/v0.6/Resource Configuration/serverclasses.md +++ b/website/content/v0.6/Resource Configuration/serverclasses.md @@ -16,15 +16,14 @@ The [Kubernetes documentation][label-selector-docs] has more information on how ## `qualifiers` -There are currently two keys: `cpu`, `systemInformation`. -Each of these keys accepts a list of entries. -The top level keys are a "logical `AND`", while the lists under each key are a "logical `OR`". +A list of hardware criteria, where each entry in the list is interpreted as a logical `OR`. +All criteria inside each entry is interpreted as a logical `AND`. Qualifiers that are not specified are not evaluated. An example: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass metadata: name: serverclass-sample @@ -43,20 +42,28 @@ spec: values: - prod qualifiers: - cpu: - - manufacturer: "Intel(R) Corporation" - version: "Intel(R) Atom(TM) CPU C3558 @ 2.20GHz" - - manufacturer: Advanced Micro Devices, Inc. - version: AMD Ryzen 7 2700X Eight-Core Processor - systemInformation: - - manufacturer: Dell Inc. + hardware: + - system: + manufacturer: Dell Inc. + compute: + processors: + - manufacturer: Advanced Micro Devices, Inc. + productName: AMD Ryzen 7 2700X Eight-Core Processor + - compute: + processors: + - manufacturer: "Intel(R) Corporation" + productName: "Intel(R) Atom(TM) CPU C3558 @ 2.20GHz" + memory: + totalSize: "8 GB" ``` Servers would only be added to the above class if they: -- had _EITHER_ CPU info -- _AND_ the label key/value in `matchLabels` +- have the label `common-label` with value `true` - _AND_ match the `matchExpressions` +- _AND_ match either 1 of the following criteria: + - has a system manufactured by `Dell Inc.` _AND_ has at least 1 processor that is an `AMD Ryzen 7 2700X Eight-Core Processor` + - has at least 1 processor that is an `Intel(R) Atom(TM) CPU C3558 @ 2.20GHz` _AND_ has exactly 8 GB of total memory Additionally, Sidero automatically creates and maintains a server class called `"any"` that includes all (accepted) servers. Attempts to add qualifiers to it will be reverted. @@ -71,7 +78,7 @@ See [patching](../guides/patching) for more information on how this works. An example of settings the default install disk for all servers matching a server class: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass ... spec: diff --git a/website/content/v0.6/Resource Configuration/servers.md b/website/content/v0.6/Resource Configuration/servers.md index 969991765..14cd19e95 100644 --- a/website/content/v0.6/Resource Configuration/servers.md +++ b/website/content/v0.6/Resource Configuration/servers.md @@ -10,7 +10,7 @@ These are created by PXE booting the servers and allowing them to send a registr An example server may look like the following: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server metadata: name: 00000000-0000-0000-0000-d05099d333e0 @@ -27,11 +27,66 @@ spec: name: custom urls: - http://192.168.1.199/assets/cilium.yaml - cpu: - manufacturer: Intel(R) Corporation - version: Intel(R) Atom(TM) CPU C3558 @ 2.20GHz - system: - manufacturer: Dell Inc. + hardware: + system: + manufacturer: Dell Inc. + productName: PowerEdge R630 + serialNumber: 790H8D2 + compute: + totalCoreCount: 8 + totalThreadCount: 16 + processorCount: 1 + processors: + - manufacturer: Intel + productName: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz + speed: 2400 + coreCount: 8 + threadCount: 16 + memory: + totalSize: 32 GB + moduleCount: 2 + modules: + - manufacturer: 002C00B3002C + productName: 18ASF2G72PDZ-2G3B1 + serialNumber: 12BDC045 + type: LPDDR3 + size: 16384 + speed: 2400 + - manufacturer: 002C00B3002C + productName: 18ASF2G72PDZ-2G3B1 + serialNumber: 12BDBF5D + type: LPDDR3 + size: 16384 + speed: 2400 + storage: + totalSize: 1116 GB + deviceCount: 1 + devices: + - productName: PERC H730 Mini + type: HDD + name: sda + deviceName: /dev/sda + size: 1199101181952 + wwid: naa.61866da055de070028d8e83307cc6df2 + network: + interfaceCount: 2 + interfaces: + - index: 1 + name: lo + flags: up|loopback + mtu: 65536 + mac: "" + addresses: + - 127.0.0.1/8 + - ::1/128 + - index: 2 + name: enp3s0 + flags: up|broadcast|multicast + mtu: 1500 + mac: "40:8d:5c:86:5a:14" + addresses: + - 192.168.2.8/24 + - fe80::dcb3:295c:755b:91bb/64 ``` ## Installation Disk @@ -40,7 +95,7 @@ An installation disk is required by Talos on bare metal. This can be specified in a `configPatch`: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server ... spec: @@ -54,7 +109,7 @@ spec: The install disk patch can also be set on the `ServerClass`: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: ServerClass ... spec: @@ -96,7 +151,7 @@ Users wishing to turn off this feature can pass the `--auto-bmc-setup=false` fla IMPI connection information can also be set manually in the `Server` spec after initial registration: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server ... spec: @@ -115,7 +170,7 @@ Without IPMI info, Sidero can still register servers, wipe them and provision cl Sidero can also fetch IPMI credentials via the `Secret` reference: ```yaml -apiVersion: metal.sidero.dev/v1alpha1 +apiVersion: metal.sidero.dev/v1alpha2 kind: Server ... spec: