Documentation
¶
Index ¶
- Constants
- func InitMockUp()
- type AllowedValues
- type BMC
- type Drive
- type Entity
- type KubeClient
- type Manager
- type Manufacturer
- type NetworkInterface
- type OEMInterface
- type OEMManagerInterface
- type Options
- type PowerState
- type Processor
- type RedfishBMC
- func (r *RedfishBMC) CheckBMCAttributes(bmcUUID string, attrs redfish.SettingsAttributes) (bool, error)
- func (r *RedfishBMC) CheckBiosAttributes(attrs redfish.SettingsAttributes) (bool, error)
- func (r *RedfishBMC) ForcePowerOff(ctx context.Context, systemURI string) error
- func (r *RedfishBMC) GetBMCAttributeValues(ctx context.Context, bmcUUID string, attributes []string) (redfish.SettingsAttributes, error)
- func (r *RedfishBMC) GetBMCPendingAttributeValues(ctx context.Context, bmcUUID string) (redfish.SettingsAttributes, error)
- func (r *RedfishBMC) GetBMCUpgradeTask(ctx context.Context, manufacturer string, taskURI string) (*redfish.Task, error)
- func (r *RedfishBMC) GetBMCVersion(ctx context.Context, bmcUUID string) (string, error)
- func (r *RedfishBMC) GetBiosAttributeValues(ctx context.Context, systemURI string, attributes []string) (redfish.SettingsAttributes, error)
- func (r *RedfishBMC) GetBiosPendingAttributeValues(ctx context.Context, systemURI string) (redfish.SettingsAttributes, error)
- func (r *RedfishBMC) GetBiosUpgradeTask(ctx context.Context, manufacturer string, taskURI string) (*redfish.Task, error)
- func (r *RedfishBMC) GetBiosVersion(ctx context.Context, systemURI string) (string, error)
- func (r *RedfishBMC) GetBootOrder(ctx context.Context, systemURI string) ([]string, error)
- func (r *RedfishBMC) GetEntityFromUri(uri string, client common.Client, entity any) error
- func (r *RedfishBMC) GetManager(bmcUUID string) (*redfish.Manager, error)
- func (r *RedfishBMC) GetProcessors(ctx context.Context, systemURI string) ([]Processor, error)
- func (r *RedfishBMC) GetStorages(ctx context.Context, systemURI string) ([]Storage, error)
- func (r *RedfishBMC) GetSystemInfo(ctx context.Context, systemURI string) (SystemInfo, error)
- func (r *RedfishBMC) GetSystems(ctx context.Context) ([]Server, error)
- func (r *RedfishBMC) Logout()
- func (r *RedfishBMC) PowerOff(ctx context.Context, systemURI string) error
- func (r *RedfishBMC) PowerOn(ctx context.Context, systemURI string) error
- func (r *RedfishBMC) Reset(ctx context.Context, systemURI string, resetType redfish.ResetType) error
- func (r *RedfishBMC) ResetManager(ctx context.Context, bmcUUID string, resetType redfish.ResetType) error
- func (r *RedfishBMC) SetBMCAttributesImmediately(ctx context.Context, bmcUUID string, attributes redfish.SettingsAttributes) error
- func (r *RedfishBMC) SetBiosAttributesOnReset(ctx context.Context, systemURI string, attributes redfish.SettingsAttributes) error
- func (r *RedfishBMC) SetBootOrder(ctx context.Context, systemURI string, bootOrder []string) error
- func (r *RedfishBMC) SetPXEBootOnce(ctx context.Context, systemURI string) error
- func (r *RedfishBMC) UpgradeBMCVersion(ctx context.Context, manufacturer string, ...) (string, bool, error)
- func (r *RedfishBMC) UpgradeBiosVersion(ctx context.Context, manufacturer string, ...) (string, bool, error)
- func (r *RedfishBMC) WaitForServerPowerState(ctx context.Context, systemURI string, powerState redfish.PowerState) error
- type RedfishKubeBMC
- type RedfishLocalBMC
- func (r *RedfishLocalBMC) CheckBMCAttributes(UUID string, attrs redfish.SettingsAttributes) (bool, error)
- func (r *RedfishLocalBMC) CheckBiosAttributes(attrs redfish.SettingsAttributes) (bool, error)
- func (r *RedfishLocalBMC) GetBMCAttributeValues(ctx context.Context, UUID string, attributes []string) (redfish.SettingsAttributes, error)
- func (r *RedfishLocalBMC) GetBMCPendingAttributeValues(ctx context.Context, systemUUID string) (redfish.SettingsAttributes, error)
- func (r *RedfishLocalBMC) GetBMCUpgradeTask(ctx context.Context, manufacturer, taskURI string) (*redfish.Task, error)
- func (r *RedfishLocalBMC) GetBMCVersion(ctx context.Context, systemUUID string) (string, error)
- func (r *RedfishLocalBMC) GetBiosAttributeValues(ctx context.Context, systemUUID string, attributes []string) (redfish.SettingsAttributes, error)
- func (r *RedfishLocalBMC) GetBiosPendingAttributeValues(ctx context.Context, systemUUID string) (redfish.SettingsAttributes, error)
- func (r *RedfishLocalBMC) GetBiosUpgradeTask(ctx context.Context, manufacturer, taskURI string) (*redfish.Task, error)
- func (r *RedfishLocalBMC) GetBiosVersion(ctx context.Context, systemUUID string) (string, error)
- func (r *RedfishLocalBMC) PowerOff(ctx context.Context, systemURI string) error
- func (r *RedfishLocalBMC) PowerOn(ctx context.Context, systemURI string) error
- func (r *RedfishLocalBMC) ResetManager(ctx context.Context, UUID string, resetType redfish.ResetType) error
- func (r *RedfishLocalBMC) SetBMCAttributesImmediately(ctx context.Context, UUID string, attributes redfish.SettingsAttributes) error
- func (r *RedfishLocalBMC) SetBiosAttributesOnReset(ctx context.Context, systemUUID string, attributes redfish.SettingsAttributes) error
- func (r *RedfishLocalBMC) UpgradeBMCVersion(ctx context.Context, manufacturer string, ...) (string, bool, error)
- func (r *RedfishLocalBMC) UpgradeBiosVersion(ctx context.Context, manufacturer string, ...) (string, bool, error)
- type RedfishMockUps
- func (r *RedfishMockUps) InitializeDefaults()
- func (r *RedfishMockUps) ResetBIOSSettings()
- func (r *RedfishMockUps) ResetBIOSVersionUpdate()
- func (r *RedfishMockUps) ResetBMCSettings()
- func (r *RedfishMockUps) ResetBMCVersionUpdate()
- func (r *RedfishMockUps) ResetPendingBIOSSetting()
- func (r *RedfishMockUps) ResetPendingBMCSetting()
- type Registry
- type RegistryEntry
- type RegistryEntryAttributes
- type Server
- type SettingAttributeValueTypes
- type Storage
- type SystemInfo
- type Volume
Constants ¶
const ( // DefaultResourcePollingInterval is the default interval for polling resources. DefaultResourcePollingInterval = 30 * time.Second // DefaultResourcePollingTimeout is the default timeout for polling resources. DefaultResourcePollingTimeout = 5 * time.Minute // DefaultPowerPollingInterval is the default interval for polling power state. DefaultPowerPollingInterval = 30 * time.Second // DefaultPowerPollingTimeout is the default timeout for polling power state. DefaultPowerPollingTimeout = 5 * time.Minute )
Variables ¶
This section is empty.
Functions ¶
func InitMockUp ¶
func InitMockUp()
Types ¶
type AllowedValues ¶
type BMC ¶
type BMC interface {
// PowerOn powers on the system.
PowerOn(ctx context.Context, systemURI string) error
// PowerOff gracefully shuts down the system.
PowerOff(ctx context.Context, systemURI string) error
// ForcePowerOff powers off the system.
ForcePowerOff(ctx context.Context, systemURI string) error
// Reset performs a reset on the system.
Reset(ctx context.Context, systemURI string, resetType redfish.ResetType) error
// SetPXEBootOnce sets the boot device for the next system boot.
SetPXEBootOnce(ctx context.Context, systemURI string) error
// GetSystemInfo retrieves information about the system.
GetSystemInfo(ctx context.Context, systemURI string) (SystemInfo, error)
// Logout closes the BMC client connection by logging out
Logout()
// GetSystems returns the managed systems
GetSystems(ctx context.Context) ([]Server, error)
// GetManager returns the manager
GetManager(UUID string) (*redfish.Manager, error)
// ResetManager performs a reset on the Manager.
ResetManager(ctx context.Context, UUID string, resetType redfish.ResetType) error
// GetBootOrder retrieves the boot order for the system.
GetBootOrder(ctx context.Context, systemURI string) ([]string, error)
// GetBiosAttributeValues retrieves BIOS attribute values for the system.
GetBiosAttributeValues(ctx context.Context, systemURI string, attributes []string) (redfish.SettingsAttributes, error)
// GetBiosPendingAttributeValues retrieves pending BIOS attribute values for the system.
GetBiosPendingAttributeValues(ctx context.Context, systemURI string) (redfish.SettingsAttributes, error)
// GetBMCAttributeValues retrieves BMC attribute values for the system.
GetBMCAttributeValues(ctx context.Context, UUID string, attributes []string) (redfish.SettingsAttributes, error)
// GetBMCPendingAttributeValues retrieves pending BMC attribute values for the system.
GetBMCPendingAttributeValues(ctx context.Context, UUID string) (result redfish.SettingsAttributes, err error)
// CheckBiosAttributes checks if the BIOS attributes are valid and returns whether a reset is required.
CheckBiosAttributes(attrs redfish.SettingsAttributes) (reset bool, err error)
// CheckBMCAttributes checks if the BMC attributes are valid and returns whether a reset is required.
CheckBMCAttributes(UUID string, attrs redfish.SettingsAttributes) (reset bool, err error)
// SetBiosAttributesOnReset sets BIOS attributes on the system and applies them on the next reset.
SetBiosAttributesOnReset(ctx context.Context, systemURI string, attributes redfish.SettingsAttributes) (err error)
// SetBMCAttributesImmediately sets BMC attributes on the system and applies them immediately.
SetBMCAttributesImmediately(ctx context.Context, UUID string, attributes redfish.SettingsAttributes) (err error)
// GetBiosVersion retrieves the BIOS version for the system.
GetBiosVersion(ctx context.Context, systemURI string) (string, error)
// GetBMCVersion retrieves the BMC version for the system.
GetBMCVersion(ctx context.Context, UUID string) (string, error)
// SetBootOrder sets the boot order for the system.
SetBootOrder(ctx context.Context, systemURI string, order []string) error
// GetStorages retrieves storage information for the system.
GetStorages(ctx context.Context, systemURI string) ([]Storage, error)
// GetProcessors retrieves processor information for the system.
GetProcessors(ctx context.Context, systemURI string) ([]Processor, error)
// UpgradeBiosVersion upgrades the BIOS version for the system.
UpgradeBiosVersion(ctx context.Context, manufacturer string, parameters *redfish.SimpleUpdateParameters) (string, bool, error)
// GetBiosUpgradeTask retrieves the task for the BIOS upgrade.
GetBiosUpgradeTask(ctx context.Context, manufacturer string, taskURI string) (*redfish.Task, error)
// WaitForServerPowerState waits for the server to reach the specified power state.
WaitForServerPowerState(ctx context.Context, systemURI string, powerState redfish.PowerState) error
// UpgradeBMCVersion upgrades the BMC version for the system.
UpgradeBMCVersion(ctx context.Context, manufacturer string, parameters *redfish.SimpleUpdateParameters) (string, bool, error)
// GetBMCUpgradeTask retrieves the task for the BMC upgrade.
GetBMCUpgradeTask(ctx context.Context, manufacturer string, taskURI string) (*redfish.Task, error)
}
BMC defines an interface for interacting with a Baseboard Management Controller.
type Drive ¶
type Drive struct {
Entity
// MediaType specifies the media type of the storage device.
MediaType string `json:"mediaType,omitempty"`
// Type specifies the type of the storage device.
Type redfish.FormFactor `json:"type,omitempty"`
// SizeBytes specifies the size of the storage device in bytes.
SizeBytes int64 `json:"sizeBytes,omitempty"`
// Vendor specifies the vendor of the storage device.
Vendor string `json:"vendor,omitempty"`
// Model specifies the model of the storage device.
Model string `json:"model,omitempty"`
// State specifies the state of the storage device.
State common.State `json:"state,omitempty"`
}
Drive represents a storage drive.
type KubeClient ¶
type KubeClient struct {
// contains filtered or unexported fields
}
type Manager ¶
type Manager struct {
UUID string
Manufacturer string
FirmwareVersion string
SerialNumber string
SKU string
Model string
PowerState string
State string
MACAddress string
OemLinks json.RawMessage
}
Manager represents the manager information.
type Manufacturer ¶
type Manufacturer string
const ( ManufacturerDell Manufacturer = "Dell Inc." ManufacturerLenovo Manufacturer = "Lenovo" ManufacturerHPE Manufacturer = "HPE" )
type NetworkInterface ¶
type OEMInterface ¶
type OEMInterface interface {
GetUpdateRequestBody(parameters *redfish.SimpleUpdateParameters) *oem.SimpleUpdateRequestBody
GetUpdateTaskMonitorURI(response *http.Response) (string, error)
GetTaskMonitorDetails(ctx context.Context, taskMonitorResponse *http.Response) (*redfish.Task, error)
}
OEMInterface defines methods for OEM-specific BMC operations.
type OEMManagerInterface ¶
type OEMManagerInterface interface {
// GetOEMBMCSettingAttribute retrieves OEM-specific BMC setting attributes.
GetOEMBMCSettingAttribute(attributes []string) (redfish.SettingsAttributes, error)
// GetBMCPendingAttributeValues retrieves pending BMC attribute values.
GetBMCPendingAttributeValues() (redfish.SettingsAttributes, error)
// CheckBMCAttributes checks if the BMC attributes are valid and returns whether a reset is required.
CheckBMCAttributes(attributes redfish.SettingsAttributes) (bool, error)
// GetObjFromUri retrieves an object from a given URI and populates the response object.
GetObjFromUri(uri string, respObj any) ([]string, error)
// UpdateBMCAttributesApplyAt updates BMC attributes and applies them at the specified time.
UpdateBMCAttributesApplyAt(attrs redfish.SettingsAttributes, applyTime common.ApplyTime) error
}
OEMManagerInterface defines methods for OEM-specific BMC management.
func NewOEMManager ¶
type Options ¶
type Options struct {
Endpoint string
Username string
Password string
BasicAuth bool
ResourcePollingInterval time.Duration
ResourcePollingTimeout time.Duration
PowerPollingInterval time.Duration
PowerPollingTimeout time.Duration
}
Options contain the options for the BMC redfish client.
type PowerState ¶
type PowerState string
PowerState is the power state of the system.
const ( // OnPowerState the system is powered on. OnPowerState PowerState = "On" // OffPowerState the system is powered off, although some components may // continue to have AUX power such as management controller. OffPowerState PowerState = "Off" // PausedPowerState the system is paused. PausedPowerState PowerState = "Paused" // PoweringOnPowerState A temporary state between Off and On. This // temporary state can be very short. PoweringOnPowerState PowerState = "PoweringOn" // PoweringOffPowerState A temporary state between On and Off. The power // off action can take time while the OS is in the shutdown process. PoweringOffPowerState PowerState = "PoweringOff" )
type Processor ¶
type Processor struct {
// ID uniquely identifies the resource.
ID string
// Type specifies the type of processor.
Type string
// Architecture specifies the architecture of the processor.
Architecture string
// InstructionSet specifies the instruction set of the processor.
InstructionSet string
// Manufacturer specifies the manufacturer of the processor.
Manufacturer string
// Model specifies the model of the processor.
Model string
// MaxSpeedMHz specifies the maximum speed of the processor in MHz.
MaxSpeedMHz int32
// TotalCores specifies the total number of cores in the processor.
TotalCores int32
// TotalThreads specifies the total number of threads in the processor.
TotalThreads int32
}
Processor represents a processor in the system.
type RedfishBMC ¶
type RedfishBMC struct {
// contains filtered or unexported fields
}
RedfishBMC is an implementation of the BMC interface for Redfish.
func NewRedfishBMCClient ¶
func NewRedfishBMCClient(ctx context.Context, options Options) (*RedfishBMC, error)
NewRedfishBMCClient creates a new RedfishBMC with the given connection details.
func (*RedfishBMC) CheckBMCAttributes ¶
func (r *RedfishBMC) CheckBMCAttributes(bmcUUID string, attrs redfish.SettingsAttributes) (bool, error)
func (*RedfishBMC) CheckBiosAttributes ¶
func (r *RedfishBMC) CheckBiosAttributes(attrs redfish.SettingsAttributes) (bool, error)
CheckBiosAttributes checks if the attributes need to reboot when changed and are the correct type.
func (*RedfishBMC) ForcePowerOff ¶
func (r *RedfishBMC) ForcePowerOff(ctx context.Context, systemURI string) error
ForcePowerOff powers off the system using Redfish.
func (*RedfishBMC) GetBMCAttributeValues ¶
func (r *RedfishBMC) GetBMCAttributeValues(ctx context.Context, bmcUUID string, attributes []string) (redfish.SettingsAttributes, error)
func (*RedfishBMC) GetBMCPendingAttributeValues ¶
func (r *RedfishBMC) GetBMCPendingAttributeValues(ctx context.Context, bmcUUID string) (redfish.SettingsAttributes, error)
func (*RedfishBMC) GetBMCUpgradeTask ¶
func (*RedfishBMC) GetBMCVersion ¶
func (*RedfishBMC) GetBiosAttributeValues ¶
func (r *RedfishBMC) GetBiosAttributeValues(ctx context.Context, systemURI string, attributes []string) (redfish.SettingsAttributes, error)
func (*RedfishBMC) GetBiosPendingAttributeValues ¶
func (r *RedfishBMC) GetBiosPendingAttributeValues(ctx context.Context, systemURI string) (redfish.SettingsAttributes, error)
func (*RedfishBMC) GetBiosUpgradeTask ¶
func (*RedfishBMC) GetBiosVersion ¶
func (*RedfishBMC) GetBootOrder ¶
func (*RedfishBMC) GetEntityFromUri ¶
func (*RedfishBMC) GetManager ¶
func (r *RedfishBMC) GetManager(bmcUUID string) (*redfish.Manager, error)
func (*RedfishBMC) GetProcessors ¶
func (*RedfishBMC) GetStorages ¶
func (*RedfishBMC) GetSystemInfo ¶
func (r *RedfishBMC) GetSystemInfo(ctx context.Context, systemURI string) (SystemInfo, error)
GetSystemInfo retrieves information about the system using Redfish.
func (*RedfishBMC) GetSystems ¶
func (r *RedfishBMC) GetSystems(ctx context.Context) ([]Server, error)
GetSystems get managed systems
func (*RedfishBMC) Logout ¶
func (r *RedfishBMC) Logout()
Logout closes the BMC client connection by logging out
func (*RedfishBMC) PowerOff ¶
func (r *RedfishBMC) PowerOff(ctx context.Context, systemURI string) error
PowerOff gracefully shuts down the system using Redfish.
func (*RedfishBMC) PowerOn ¶
func (r *RedfishBMC) PowerOn(ctx context.Context, systemURI string) error
PowerOn powers on the system using Redfish.
func (*RedfishBMC) Reset ¶
func (r *RedfishBMC) Reset(ctx context.Context, systemURI string, resetType redfish.ResetType) error
Reset performs a reset on the system using Redfish.
func (*RedfishBMC) ResetManager ¶
func (*RedfishBMC) SetBMCAttributesImmediately ¶
func (r *RedfishBMC) SetBMCAttributesImmediately(ctx context.Context, bmcUUID string, attributes redfish.SettingsAttributes) error
func (*RedfishBMC) SetBiosAttributesOnReset ¶
func (r *RedfishBMC) SetBiosAttributesOnReset(ctx context.Context, systemURI string, attributes redfish.SettingsAttributes) error
SetBiosAttributesOnReset sets given bios attributes.
func (*RedfishBMC) SetBootOrder ¶
SetBootOrder sets bios boot order
func (*RedfishBMC) SetPXEBootOnce ¶
func (r *RedfishBMC) SetPXEBootOnce(ctx context.Context, systemURI string) error
SetPXEBootOnce sets the boot device for the next system boot using Redfish.
func (*RedfishBMC) UpgradeBMCVersion ¶
func (r *RedfishBMC) UpgradeBMCVersion(ctx context.Context, manufacturer string, parameters *redfish.SimpleUpdateParameters) (string, bool, error)
UpgradeBMCVersion upgrade given BMC version.
func (*RedfishBMC) UpgradeBiosVersion ¶
func (r *RedfishBMC) UpgradeBiosVersion(ctx context.Context, manufacturer string, parameters *redfish.SimpleUpdateParameters) (string, bool, error)
UpgradeBiosVersion upgrade given bios versions.
func (*RedfishBMC) WaitForServerPowerState ¶
func (r *RedfishBMC) WaitForServerPowerState(ctx context.Context, systemURI string, powerState redfish.PowerState) error
type RedfishKubeBMC ¶
type RedfishKubeBMC struct {
*RedfishLocalBMC
*KubeClient
}
RedfishKubeBMC is an implementation of the BMC interface for Redfish.
func (*RedfishKubeBMC) SetPXEBootOnce ¶
func (r *RedfishKubeBMC) SetPXEBootOnce(ctx context.Context, systemURI string) error
SetPXEBootOnce sets the boot device for the next system boot using Redfish.
type RedfishLocalBMC ¶
type RedfishLocalBMC struct {
*RedfishBMC
}
RedfishLocalBMC implements the BMC interface for Redfish.
func (*RedfishLocalBMC) CheckBMCAttributes ¶
func (r *RedfishLocalBMC) CheckBMCAttributes(UUID string, attrs redfish.SettingsAttributes) (bool, error)
CheckBMCAttributes validates BMC attributes.
func (*RedfishLocalBMC) CheckBiosAttributes ¶
func (r *RedfishLocalBMC) CheckBiosAttributes(attrs redfish.SettingsAttributes) (bool, error)
CheckBiosAttributes validates BIOS attributes.
func (*RedfishLocalBMC) GetBMCAttributeValues ¶
func (r *RedfishLocalBMC) GetBMCAttributeValues(ctx context.Context, UUID string, attributes []string) (redfish.SettingsAttributes, error)
GetBMCAttributeValues retrieves specific BMC attribute values.
func (*RedfishLocalBMC) GetBMCPendingAttributeValues ¶
func (r *RedfishLocalBMC) GetBMCPendingAttributeValues(ctx context.Context, systemUUID string) (redfish.SettingsAttributes, error)
GetBMCPendingAttributeValues returns pending BMC attribute values.
func (*RedfishLocalBMC) GetBMCUpgradeTask ¶
func (r *RedfishLocalBMC) GetBMCUpgradeTask(ctx context.Context, manufacturer, taskURI string) (*redfish.Task, error)
GetBMCUpgradeTask retrieves the status of a BMC upgrade task.
func (*RedfishLocalBMC) GetBMCVersion ¶
GetBMCVersion retrieves the BMC version.
func (*RedfishLocalBMC) GetBiosAttributeValues ¶
func (r *RedfishLocalBMC) GetBiosAttributeValues(ctx context.Context, systemUUID string, attributes []string) (redfish.SettingsAttributes, error)
GetBiosAttributeValues retrieves specific BIOS attribute values.
func (*RedfishLocalBMC) GetBiosPendingAttributeValues ¶
func (r *RedfishLocalBMC) GetBiosPendingAttributeValues(ctx context.Context, systemUUID string) (redfish.SettingsAttributes, error)
GetBiosPendingAttributeValues returns pending BIOS attribute values.
func (*RedfishLocalBMC) GetBiosUpgradeTask ¶
func (r *RedfishLocalBMC) GetBiosUpgradeTask(ctx context.Context, manufacturer, taskURI string) (*redfish.Task, error)
GetBiosUpgradeTask retrieves the status of a BIOS upgrade task.
func (*RedfishLocalBMC) GetBiosVersion ¶
GetBiosVersion retrieves the BIOS version.
func (*RedfishLocalBMC) PowerOff ¶
func (r *RedfishLocalBMC) PowerOff(ctx context.Context, systemURI string) error
PowerOff powers off the system asynchronously.
func (*RedfishLocalBMC) PowerOn ¶
func (r *RedfishLocalBMC) PowerOn(ctx context.Context, systemURI string) error
PowerOn powers on the system asynchronously.
func (*RedfishLocalBMC) ResetManager ¶
func (r *RedfishLocalBMC) ResetManager(ctx context.Context, UUID string, resetType redfish.ResetType) error
ResetManager resets the BMC with a delay for pending settings.
func (*RedfishLocalBMC) SetBMCAttributesImmediately ¶
func (r *RedfishLocalBMC) SetBMCAttributesImmediately(ctx context.Context, UUID string, attributes redfish.SettingsAttributes) error
SetBMCAttributesImmediately sets BMC attributes, applying them immediately or on reset.
func (*RedfishLocalBMC) SetBiosAttributesOnReset ¶
func (r *RedfishLocalBMC) SetBiosAttributesOnReset(ctx context.Context, systemUUID string, attributes redfish.SettingsAttributes) error
SetBiosAttributesOnReset sets BIOS attributes, applying them immediately or on next reset.
func (*RedfishLocalBMC) UpgradeBMCVersion ¶
func (r *RedfishLocalBMC) UpgradeBMCVersion(ctx context.Context, manufacturer string, params *redfish.SimpleUpdateParameters) (string, bool, error)
UpgradeBMCVersion initiates a BMC upgrade.
func (*RedfishLocalBMC) UpgradeBiosVersion ¶
func (r *RedfishLocalBMC) UpgradeBiosVersion(ctx context.Context, manufacturer string, params *redfish.SimpleUpdateParameters) (string, bool, error)
UpgradeBiosVersion initiates a BIOS upgrade.
type RedfishMockUps ¶
type RedfishMockUps struct {
BIOSSettingAttr map[string]map[string]any
PendingBIOSSetting map[string]map[string]any
BIOSVersion string
BIOSUpgradingVersion string
BIOSUpgradeTaskIndex int
BIOSUpgradeTaskStatus []redfish.Task
BMCSettingAttr map[string]map[string]any
PendingBMCSetting map[string]map[string]any
BMCVersion string
BMCUpgradingVersion string
BMCUpgradeTaskIndex int
BMCUpgradeTaskStatus []redfish.Task
SimulateUnvailableBMC bool
}
RedfishMockUps is an implementation of the BMC interface for Redfish.
var UnitTestMockUps *RedfishMockUps
func (*RedfishMockUps) InitializeDefaults ¶
func (r *RedfishMockUps) InitializeDefaults()
func (*RedfishMockUps) ResetBIOSSettings ¶
func (r *RedfishMockUps) ResetBIOSSettings()
func (*RedfishMockUps) ResetBIOSVersionUpdate ¶
func (r *RedfishMockUps) ResetBIOSVersionUpdate()
func (*RedfishMockUps) ResetBMCSettings ¶
func (r *RedfishMockUps) ResetBMCSettings()
func (*RedfishMockUps) ResetBMCVersionUpdate ¶
func (r *RedfishMockUps) ResetBMCVersionUpdate()
func (*RedfishMockUps) ResetPendingBIOSSetting ¶
func (r *RedfishMockUps) ResetPendingBIOSSetting()
func (*RedfishMockUps) ResetPendingBMCSetting ¶
func (r *RedfishMockUps) ResetPendingBMCSetting()
type Registry ¶
type Registry struct {
common.Entity
// ODataContext is the odata context.
ODataContext string `json:"@odata.context"`
// ODataType is the odata type.
ODataType string `json:"@odata.type"`
// Description provides a description of this resource.
Description string
// Languages is the RFC5646-conformant language codes for the
// available Message Registries.
Languages []string
// Registry shall contain the Message Registry name and it major and
// minor versions, as defined by the Redfish Specification.
RegistryEntries RegistryEntry
}
Registry describes the Message Registry file locator Resource.
type RegistryEntry ¶
type RegistryEntry struct {
Attributes []RegistryEntryAttributes
}
type RegistryEntryAttributes ¶
type SettingAttributeValueTypes ¶
type SettingAttributeValueTypes string
const ( TypeInteger SettingAttributeValueTypes = "integer" TypeString SettingAttributeValueTypes = "string" TypeEnumerations SettingAttributeValueTypes = "enumeration" )
type Storage ¶
type Storage struct {
Entity
// State specifies the state of the storage.
State common.State `json:"state,omitempty"`
// Drives is a collection of drives associated with this storage.
Drives []Drive `json:"drives,omitempty"`
// Volumes is a collection of volumes associated with this storage.
Volumes []Volume `json:"volumes,omitempty"`
}
Storage represents a storage resource.
type SystemInfo ¶
type SystemInfo struct {
Manufacturer string
Model string
Status common.Status
PowerState redfish.PowerState
TotalSystemMemory resource.Quantity
SystemURI string
SystemUUID string
SystemInfo string
SerialNumber string
SKU string
IndicatorLED string
}
SystemInfo represents basic information about the system.
type Volume ¶
type Volume struct {
Entity
// CapacityBytes specifies the capacity of the volume in bytes.
SizeBytes int64 `json:"sizeBytes,omitempty"`
// Status specifies the status of the volume.
State common.State `json:"state,omitempty"`
// RAIDType specifies the RAID type of the associated Volume.
RAIDType redfish.RAIDType `json:"raidType,omitempty"`
// VolumeUsage specifies the volume usage type for the Volume.
VolumeUsage string `json:"volumeUsage,omitempty"`
}
Volume represents a storage volume.