redfish

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package redfish provides BMC functionality using Redfish.

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	UseAlways:                 false,
	UseWhenAvailable:          true,
	UseHTTPS:                  true,
	InsecureSkipTLSVerify:     true,
	Port:                      443,
	SetBootSourceOverrideMode: true,
}

DefaultOptions is the default RedFish configuration options.

Functions

This section is empty.

Types

type Client

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

Client is a wrapper around the gofish client.

func NewClient

func NewClient(options Options, address, username, password string, logger *zap.Logger) *Client

NewClient returns a new Redfish BMC client.

func (*Client) Close

func (c *Client) Close() error

Close implements the power.Client interface.

func (*Client) IsPoweredOn

func (c *Client) IsPoweredOn(ctx context.Context) (bool, error)

IsPoweredOn implements the power.Client interface.

func (*Client) PowerOff

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

PowerOff implements the power.Client interface.

func (*Client) PowerOn

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

PowerOn implements the power.Client interface.

func (*Client) Reboot

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

Reboot implements the power.Client interface.

func (*Client) SetPXEBootOnce

func (c *Client) SetPXEBootOnce(ctx context.Context, mode pxe.BootMode) error

SetPXEBootOnce implements the power.Client interface.

type Options

type Options struct {
	UseAlways                 bool
	UseWhenAvailable          bool
	UseHTTPS                  bool
	InsecureSkipTLSVerify     bool
	SetBootSourceOverrideMode bool
	Port                      int
}

Options is a struct that holds the RedFish configuration options.

Jump to

Keyboard shortcuts

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