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: 18 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 compute manager descriptor.

func Factory added in v1.6.0

func Factory(powerDelay time.Duration) componentmanager.ManagerFactory

Factory returns a factory for the NICo compute manager. powerDelay is the inter-component stagger for power control calls.

func FactorySpec added in v1.6.0

func FactorySpec(powerDelay time.Duration) componentmanager.FactorySpec

FactorySpec returns the NICo compute manager runtime factory spec.

Types

type Manager

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

Manager manages compute node components via the NICo API.

func New

func New(nicoClient nicoapi.Client, powerDelay time.Duration) *Manager

New creates a new NICo-based compute Manager instance.

func (*Manager) BringUpControl

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

BringUpControl opens the NICo power-on gate for each compute component, allowing bring-up and power on.

func (*Manager) Descriptor added in v1.6.0

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

Descriptor returns the NICo compute 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 SetFirmwareUpdateTimeWindow API.

Before scheduling, it performs:

  1. Fail-fast: if targetVersion is provided, it must match one of the desired firmware entries configured in Core.
  2. Idempotent: queries the actual firmware versions from explored endpoints and compares them against the target (or desired) versions. If all machines are already at the desired firmware, returns early.

func (*Manager) GetBringUpStatus

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

GetBringUpStatus returns the bring-up state for each compute component via NICo.

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. It compares the actual firmware versions (from explored endpoints) against Core's desired firmware entries. If the actual versions match the desired versions, the component is considered Completed. Falls back to Machine.UpdateComplete / Machine.State when version data is unavailable.

func (*Manager) GetPowerStatus

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

GetPowerStatus retrieves the power status of compute nodes via NICo API.

func (*Manager) InjectExpectation

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

InjectExpectation registers an expected machine with NICo via AddExpectedMachine. The Info field should contain a JSON-encoded nicoapi.AddExpectedMachineRequest.

func (*Manager) PowerControl

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

PowerControl performs power operations on a compute node via NICo API.

Jump to

Keyboard shortcuts

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