psm

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

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func Descriptor

func Descriptor() cmcatalog.Descriptor

Descriptor returns the PSM PowerShelf manager descriptor.

func Factory

func Factory(
	providerRegistry *providerapi.ProviderRegistry,
) (componentmanager.ComponentManager, error)

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

func FactorySpec added in v1.6.0

func FactorySpec() componentmanager.FactorySpec

FactorySpec returns the PSM PowerShelf manager runtime factory spec.

Types

type Manager

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

Manager manages power shelf components via the PSM service.

func New

func New(psmClient psmapi.Client) *Manager

New creates a new PSM-based PowerShelf Manager instance.

func (*Manager) Descriptor added in v1.6.0

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

Descriptor returns the PSM PowerShelf manager descriptor.

func (*Manager) FirmwareControl

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

FirmwareControl initiates firmware update without waiting for completion. Returns immediately after the update request is accepted.

info.SubTargets, when non-empty, restricts the update to the selected firmware sub-parts (e.g. ["pmc", "psu"]). Empty defaults to ["pmc"], which preserves the historical PSM behavior.

func (*Manager) GetAllPowershelves

func (m *Manager) GetAllPowershelves(ctx context.Context) ([]psmapi.PowerShelf, error)

GetAllPowershelves retrieves all registered powershelves.

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. Returns a map of component ID to FirmwareUpdateStatus.

func (*Manager) GetPowerStatus

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

GetPowerStatus retrieves the power status of power shelves via PSM API.

func (*Manager) GetPowershelf

func (m *Manager) GetPowershelf(ctx context.Context, pmcMac string) (*psmapi.PowerShelf, error)

GetPowershelf retrieves detailed powershelf information by PMC MAC address.

func (*Manager) InjectExpectation

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

InjectExpectation injects expected information for a power shelf.

func (*Manager) ListAvailableFirmware

func (m *Manager) ListAvailableFirmware(ctx context.Context, pmcMacs []string) ([]psmapi.AvailableFirmware, error)

ListAvailableFirmware returns available firmware versions for the specified powershelves.

func (*Manager) PowerControl

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

PowerControl performs power operations on a power shelf via PSM API.

Jump to

Keyboard shortcuts

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