supermicro

package
v2.3.4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 31 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProviderName for the provider Supermicro implementation
	ProviderName = "supermicro"
	// ProviderProtocol for the provider supermicro implementation
	ProviderProtocol = "vendorapi"
)

Variables

View Source
var (
	ErrQueryFRUInfo      = errors.New("FRU information query returned error")
	ErrXMLAPIUnsupported = errors.New("XML API is unsupported")
	ErrModelUnknown      = errors.New("Model number unknown")
	ErrModelUnsupported  = errors.New("Model not supported")
)
View Source
var (
	ErrFirmwareInstallMode = errors.New("firmware install mode error")
	ErrMultipartForm       = errors.New("multipart form error")
)

Functions

This section is empty.

Types

type Board

type Board struct {
	MfcName   string `xml:"MFC_NAME,attr"`
	PartNum   string `xml:"PART_NUM,attr"`
	ProdName  string `xml:"PROD_NAME,attr"`
	SerialNum string `xml:"SERIAL_NUM,attr"`
}

Board contains the product baseboard information

type Client

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

Connection details

func NewClient

func NewClient(host, user, pass string, log logr.Logger, opts ...Option) *Client

New returns connection with a Supermicro client initialized

func (*Client) BmcReset added in v2.2.0

func (c *Client) BmcReset(ctx context.Context, resetType string) (ok bool, err error)

BmcReset power cycles the BMC

func (*Client) BootComplete added in v2.3.2

func (c *Client) BootComplete() (bool, error)

BootComplete checks if this system has reached the last state for boot

func (*Client) Close

func (c *Client) Close(ctx context.Context) error

Close a connection to a Supermicro BMC using the vendor API.

func (*Client) FirmwareInstallSteps added in v2.2.0

func (c *Client) FirmwareInstallSteps(ctx context.Context, component string) ([]constants.FirmwareInstallStep, error)

bmc client interface implementations methods

func (*Client) FirmwareInstallUploaded added in v2.2.0

func (c *Client) FirmwareInstallUploaded(ctx context.Context, component, uploadTaskID string) (installTaskID string, err error)

func (*Client) FirmwareTaskStatus added in v2.2.0

func (c *Client) FirmwareTaskStatus(ctx context.Context, kind constants.FirmwareInstallStep, component, taskID, installVersion string) (state constants.TaskState, status string, err error)

FirmwareTaskStatus returns the status of a firmware related task queued on the BMC.

func (*Client) FirmwareUpload added in v2.2.0

func (c *Client) FirmwareUpload(ctx context.Context, component string, file *os.File) (taskID string, err error)

func (*Client) GetBiosConfiguration added in v2.3.0

func (c *Client) GetBiosConfiguration(ctx context.Context) (biosConfig map[string]string, err error)

GetBiosConfiguration return bios configuration

func (*Client) GetBootProgress added in v2.3.2

func (c *Client) GetBootProgress() (*redfish.BootProgress, error)

GetBootProgress allows a caller to follow along as the system goes through its boot sequence

func (*Client) Inventory added in v2.2.0

func (c *Client) Inventory(ctx context.Context) (device *common.Device, err error)

Inventory collects hardware inventory and install firmware information

func (*Client) MountFloppyImage added in v2.2.0

func (c *Client) MountFloppyImage(ctx context.Context, image io.Reader) error

func (*Client) Name

func (c *Client) Name() string

Name returns the client provider name.

func (*Client) Open

func (c *Client) Open(ctx context.Context) (err error)

Open a connection to a Supermicro BMC using the vendor API.

func (*Client) PowerSet

func (c *Client) PowerSet(ctx context.Context, state string) (ok bool, err error)

PowerSet sets the power state of a server

func (*Client) PowerStateGet added in v2.2.0

func (c *Client) PowerStateGet(ctx context.Context) (state string, err error)

PowerStateGet gets the power state of a BMC machine

func (*Client) ResetBiosConfiguration added in v2.3.0

func (c *Client) ResetBiosConfiguration(ctx context.Context) (err error)

ResetBiosConfiguration sets the bios configuration back to "factory" defaults

func (*Client) Screenshot

func (c *Client) Screenshot(ctx context.Context) (image []byte, fileType string, err error)

func (*Client) SendNMI added in v2.2.3

func (c *Client) SendNMI(ctx context.Context) error

SendNMI tells the BMC to issue an NMI to the device

func (*Client) SetBIOSConfigurationFromFile added in v2.3.0

func (c *Client) SetBIOSConfigurationFromFile(ctx context.Context, cfg string) (err error)

SetBiosConfigurationFromFile sets the bios configuration from a raw vendor config file

func (*Client) SetBiosConfiguration added in v2.3.0

func (c *Client) SetBiosConfiguration(ctx context.Context, biosConfig map[string]string) (err error)

SetBiosConfiguration set bios configuration

func (*Client) UnmountFloppyImage added in v2.2.0

func (c *Client) UnmountFloppyImage(ctx context.Context) error

type Config

type Config struct {
	HttpClient *http.Client
	Port       string
	// contains filtered or unexported fields
}

type FruInfo

type FruInfo struct {
	Board *Board `xml:"BOARD,omitempty"`
}

FruInfo contains the FRU information

type IPMI

type IPMI struct {
	FruInfo *FruInfo `xml:"FRU_INFO,omitempty"`
}

type OEM added in v2.2.0

type OEM struct {
	Supermicro `json:"Supermicro"`
}

type Option

type Option func(*Config)

Option for setting optional Client values

func WithHttpClient

func WithHttpClient(httpClient *http.Client) Option

func WithPort

func WithPort(port string) Option

func WithSecureTLS

func WithSecureTLS(rootCAs *x509.CertPool) Option

WithSecureTLS returns an option that enables secure TLS with an optional cert pool.

type Supermicro added in v2.2.0

type Supermicro struct {
	BIOS map[string]bool `json:"BIOS,omitempty"`
	BMC  map[string]bool `json:"BMC,omitempty"`
}

type UnexpectedResponseError

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

func (*UnexpectedResponseError) Error

func (e *UnexpectedResponseError) Error() string

Jump to

Keyboard shortcuts

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