Documentation
¶
Index ¶
- Constants
- func Descriptor() cmcatalog.Descriptor
- func Factory(powerDelay time.Duration) componentmanager.ManagerFactory
- func FactorySpec(powerDelay time.Duration) componentmanager.FactorySpec
- type Manager
- func (m *Manager) BringUpControl(ctx context.Context, target common.Target) error
- func (m *Manager) Descriptor() cmcatalog.Descriptor
- 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
Constants ¶
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 (*Manager) BringUpControl ¶
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:
- Fail-fast: if targetVersion is provided, it must match one of the desired firmware entries configured in Core.
- 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.