psm

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 11 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() componentmanager.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.

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) 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.

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.

func (*Manager) Type

func (m *Manager) Type() devicetypes.ComponentType

Type returns the component type this manager handles.

Jump to

Keyboard shortcuts

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