nico

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: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ImplementationName is the name used to identify this implementation.
	ImplementationName = "nico"
)

Variables

This section is empty.

Functions

func Descriptor

func Descriptor() cmcatalog.Descriptor

Descriptor returns the NICo NVSwitch manager descriptor.

func Factory

Factory creates a new Manager from the provided providers. It retrieves the NICoProvider from the registry and uses its client.

func FactorySpec

func FactorySpec() componentmanager.FactorySpec

FactorySpec returns the NICo NVSwitch manager runtime factory spec.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager manages NVLink switch components via the NICo API.

func New

func New(nicoClient nicoapi.Client) *Manager

New creates a new NICo-based NVSwitch Manager instance.

func (*Manager) Descriptor

func (m *Manager) Descriptor() cmcatalog.Descriptor

Descriptor returns the NICo NVSwitch manager descriptor.

func (*Manager) FirmwareControl

func (m *Manager) FirmwareControl(ctx context.Context, target common.Target, info operations.FirmwareControlTaskInfo) error

FirmwareControl schedules a firmware update via NICo's UpdateComponentFirmware API.

When TargetVersion is provided it is forwarded directly to Core. When TargetVersion is empty (e.g. BringUp context), the method queries Core's desired firmware entries and the actual firmware from explored endpoints to perform an idempotency check. If all switches already run the desired firmware the call returns early without triggering an update.

Before issuing the update the method also verifies that all target switches report the same firmware version set. A heterogeneous fleet is rejected because a single UpdateComponentFirmware call cannot target mixed versions.

func (*Manager) GetFirmwareStatus

func (m *Manager) GetFirmwareStatus(ctx context.Context, target common.Target) (map[string]operations.FirmwareUpdateStatus, error)

GetFirmwareStatus returns the current status of firmware updates for the target components. Core may return multiple sub-component statuses (BMC/CPLD/BIOS/NVOS) per switch, so we aggregate them into a single status per switch UUID.

func (*Manager) GetPowerStatus

func (m *Manager) GetPowerStatus(
	ctx context.Context,
	target common.Target,
) (map[string]operations.PowerStatus, error)

func (*Manager) InjectExpectation

func (m *Manager) InjectExpectation(
	ctx context.Context,
	target common.Target,
	info operations.InjectExpectationTaskInfo,
) error

InjectExpectation registers an expected switch with NICo via AddExpectedSwitch. The Info field should contain a JSON-encoded nicoapi.AddExpectedSwitchRequest.

func (*Manager) PowerControl

func (m *Manager) PowerControl(
	ctx context.Context,
	target common.Target,
	info operations.PowerControlTaskInfo,
) error

PowerControl performs power operations on NVLink switches via NICo's ComponentPowerControl RPC.

func (*Manager) VerifyFirmwareConsistency

func (m *Manager) VerifyFirmwareConsistency(ctx context.Context, target common.Target) error

VerifyFirmwareConsistency checks that all target switches report the same firmware version set. Returns an error when versions are heterogeneous.

Jump to

Keyboard shortcuts

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