firmwarecomponents

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package firmwarecomponents converts the lowercase component-name strings accepted by the REST/Flow firmware-update API into the per-tray-type enum values used by each downstream component manager.

The mappings are written explicitly so that:

  • Renaming or removing a proto enum constant in Core fails the build here at compile time, instead of silently turning into an empty accepted set.
  • The lowercase REST name for each enum value is reviewable in a PR rather than derived from a prefix-stripping heuristic.
  • Editors can jump from "bmc" straight to the proto enum const.

Completeness against Core's proto is enforced by the unit tests in this package: for each NICo enum, the tests iterate the protoc-generated `*_name` reverse map and require every non-UNKNOWN value to appear in our mapping. When Core adds a new value, regen + test failure tells the developer to pick a lowercase name and add an entry here, on purpose.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNICoComputeTray

func ParseNICoComputeTray(names []string) ([]nicopb.ComputeTrayComponent, error)

ParseNICoComputeTray maps lowercase names to NICo ComputeTrayComponent values.

func ParseNICoNVSwitch

func ParseNICoNVSwitch(names []string) ([]nicopb.NvSwitchComponent, error)

ParseNICoNVSwitch maps lowercase names to NICo NvSwitchComponent values. Returns nil for an empty input (callers may interpret as "all components").

func ParseNICoPowerShelf

func ParseNICoPowerShelf(names []string) ([]nicopb.PowerShelfComponent, error)

ParseNICoPowerShelf maps lowercase names to NICo PowerShelfComponent values.

func ParseNSMNVSwitch

func ParseNSMNVSwitch(names []string) ([]nsmapi.NVSwitchComponent, error)

ParseNSMNVSwitch maps lowercase names to nsmapi.NVSwitchComponent values.

func ParsePSMPowerShelf

func ParsePSMPowerShelf(names []string) ([]psmapi.PowershelfComponent, error)

ParsePSMPowerShelf maps lowercase names to psmapi.PowershelfComponent values.

func SupportedNICoComputeTrayNames

func SupportedNICoComputeTrayNames() []string

SupportedNICoComputeTrayNames returns the lowercase names accepted by ParseNICoComputeTray in deterministic order.

func SupportedNICoNVSwitchNames

func SupportedNICoNVSwitchNames() []string

SupportedNICoNVSwitchNames returns the lowercase names accepted by ParseNICoNVSwitch in deterministic order. Useful for surfacing the set in API documentation or operator tooling.

func SupportedNICoPowerShelfNames

func SupportedNICoPowerShelfNames() []string

SupportedNICoPowerShelfNames returns the lowercase names accepted by ParseNICoPowerShelf in deterministic order.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL