dell

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: 20 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// ProviderName for the provider Dell implementation
	ProviderName = "dell"
	// ProviderProtocol for the provider Dell implementation
	ProviderProtocol = "redfish"
)

Variables

Functions

This section is empty.

Types

type Config

type Config struct {
	HttpClient            *http.Client
	Port                  string
	VersionsNotCompatible []string
	RootCAs               *x509.CertPool
	UseBasicAuth          bool
}

type Conn

type Conn struct {
	Log logr.Logger
	// contains filtered or unexported fields
}

Conn details for redfish client

func New

func New(host, user, pass string, log logr.Logger, opts ...Option) *Conn

New returns connection with a redfish client initialized

func (*Conn) BmcReset added in v2.2.0

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

BmcReset power cycles the BMC

func (*Conn) Close

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

Close a connection to a BMC via redfish

func (*Conn) Compatible

func (c *Conn) Compatible(ctx context.Context) bool

Compatible tests whether a BMC is compatible with the gofish provider

func (*Conn) FirmwareInstallSteps added in v2.2.0

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

bmc client interface implementations methods

func (*Conn) FirmwareInstallUploadAndInitiate added in v2.2.0

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

func (*Conn) FirmwareTaskStatus added in v2.2.0

func (c *Conn) 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 (*Conn) GetBiosConfiguration added in v2.2.4

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

GetBiosConfiguration returns the BIOS configuration settings via the BMC

func (*Conn) Inventory added in v2.2.0

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

Inventory collects hardware inventory and install firmware information

func (*Conn) Name

func (c *Conn) Name() string

Name returns the client provider name.

func (*Conn) Open

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

Open a connection to a BMC via redfish

func (*Conn) PowerSet added in v2.2.0

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

PowerSet sets the power state of a server

func (*Conn) PowerStateGet

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

PowerStateGet gets the power state of a BMC machine

func (*Conn) ResetBiosConfiguration added in v2.2.4

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

ResetBiosConfiguration resets the BIOS configuration settings back to 'factory defaults' via the BMC

func (*Conn) Screenshot

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

func (*Conn) SendNMI added in v2.2.3

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

SendNMI tells the BMC to issue an NMI to the device

func (*Conn) SetBiosConfiguration added in v2.2.4

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

SetBiosConfiguration sets the BIOS configuration settings via the BMC

type Dell added in v2.2.0

type Dell struct {
	OdataType         string        `json:"@odata.type"`
	CompletionTime    interface{}   `json:"CompletionTime"`
	Description       string        `json:"Description"`
	EndTime           string        `json:"EndTime"`
	ID                string        `json:"Id"`
	JobState          string        `json:"JobState"`
	JobType           string        `json:"JobType"`
	Message           string        `json:"Message"`
	MessageArgs       []interface{} `json:"MessageArgs"`
	MessageID         string        `json:"MessageId"`
	Name              string        `json:"Name"`
	PercentComplete   int           `json:"PercentComplete"`
	StartTime         string        `json:"StartTime"`
	TargetSettingsURI interface{}   `json:"TargetSettingsURI"`
}

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 WithRootCAs

func WithRootCAs(rootCAs *x509.CertPool) Option

func WithUseBasicAuth

func WithUseBasicAuth(useBasicAuth bool) Option

func WithVersionsNotCompatible

func WithVersionsNotCompatible(versionsNotCompatible []string) Option

Jump to

Keyboard shortcuts

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