Documentation
¶
Index ¶
- Constants
- func Descriptor() componentmanager.Descriptor
- func Factory(providerRegistry *providerapi.ProviderRegistry) (componentmanager.ComponentManager, error)
- type Manager
- func (m *Manager) FirmwareControl(ctx context.Context, target common.Target, ...) error
- func (m *Manager) GetAllPowershelves(ctx context.Context) ([]psmapi.PowerShelf, 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) GetPowershelf(ctx context.Context, pmcMac string) (*psmapi.PowerShelf, error)
- func (m *Manager) InjectExpectation(ctx context.Context, target common.Target, ...) error
- func (m *Manager) ListAvailableFirmware(ctx context.Context, pmcMacs []string) ([]psmapi.AvailableFirmware, error)
- func (m *Manager) PowerControl(ctx context.Context, target common.Target, ...) error
- func (m *Manager) Type() devicetypes.ComponentType
Constants ¶
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 (*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 ¶
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 ¶
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.