supermicro

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

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 (
	ErrFirmwareInstallMode = errors.New("firmware install mode error")
	ErrMultipartForm       = errors.New("multipart form error")
)
View Source
var (
	ErrQueryFRUInfo = errors.New("FRU information query returned 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) Close

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

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

func (*Client) FirmwareInstall

func (c *Client) FirmwareInstall(ctx context.Context, component, applyAt string, forceInstall bool, reader io.Reader) (jobID string, err error)

FirmwareInstall uploads and initiates firmware update for the component

func (*Client) FirmwareInstallStatus

func (c *Client) FirmwareInstallStatus(ctx context.Context, installVersion, component, taskID string) (string, error)

FirmwareInstallStatus returns the status of the firmware install process

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

func (c *Client) Screenshot(ctx context.Context) (image []byte, fileType string, err 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 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 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