Documentation
¶
Index ¶
- Constants
- func Descriptor() componentmanager.Descriptor
- func Factory(providerRegistry *providerapi.ProviderRegistry) (componentmanager.ComponentManager, error)
- type Manager
- func (m *Manager) BringUpControl(ctx context.Context, target common.Target) error
- func (m *Manager) FirmwareControl(ctx context.Context, target common.Target, ...) error
- func (m *Manager) GetBringUpStatus(ctx context.Context, target common.Target) (map[string]operations.MachineBringUpState, error)
- func (m *Manager) GetFirmwareStatus(ctx context.Context, target common.Target) (map[string]operations.FirmwareUpdateStatus, error)
- func (m *Manager) GetPowerStatus(ctx context.Context, target common.Target) (map[string]operations.PowerStatus, error)
- func (m *Manager) InjectExpectation(ctx context.Context, target common.Target, ...) error
- func (m *Manager) PowerControl(ctx context.Context, target common.Target, ...) error
- func (m *Manager) Type() devicetypes.ComponentType
- func (m *Manager) VerifyFirmwareConsistency(ctx context.Context, target common.Target) error
Constants ¶
const (
// ImplementationName is the name used to identify this implementation.
ImplementationName = "nico"
)
Variables ¶
This section is empty.
Functions ¶
func Descriptor ¶
func Descriptor() componentmanager.Descriptor
Descriptor returns the NICo NVLSwitch manager descriptor.
func Factory ¶
func Factory(providerRegistry *providerapi.ProviderRegistry) (componentmanager.ComponentManager, error)
Factory creates a new Manager from the provided providers. It retrieves the NICoProvider from the registry and uses its client.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages NVLink switch components via the NICo API.
func (*Manager) BringUpControl ¶
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) GetBringUpStatus ¶
func (m *Manager) GetBringUpStatus( ctx context.Context, target common.Target, ) (map[string]operations.MachineBringUpState, error)
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) Type ¶
func (m *Manager) Type() devicetypes.ComponentType
Type returns the component type this manager handles.