supermicro

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 30 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 BIOS added in v2.2.0

type BIOS struct {
	PreserveME         bool `json:"PreserveME"`
	PreserveNVRAM      bool `json:"PreserveNVRAM"`
	PreserveSMBIOS     bool `json:"PreserveSMBIOS"`
	PreserveOA         bool `json:"PreserveOA"`
	PreserveSETUPCONF  bool `json:"PreserveSETUPCONF"`
	PreserveSETUPPWD   bool `json:"PreserveSETUPPWD"`
	PreserveSECBOOTKEY bool `json:"PreserveSECBOOTKEY"`
	PreserveBOOTCONF   bool `json:"PreserveBOOTCONF"`
}

redfish OEM parameter structs

type BMC added in v2.2.0

type BMC struct {
	PreserveCfg bool `json:"PreserveCfg"`
	PreserveSdr bool `json:"PreserveSdr"`
	PreserveSsl bool `json:"PreserveSsl"`
}

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) 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) 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) 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) 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 `json:"BIOS,omitempty"`
	*BMC  `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