dell

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: 16 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	// Features implemented by dell redfish
	Features = registrar.Features{
		providers.FeatureScreenshot,
	}
)

Functions

This section is empty.

Types

type Config

type Config struct {
	HttpClient *http.Client
	Port       string
	// VersionsNotCompatible	is the list of incompatible redfish versions.
	//
	// With this option set, The bmclib.Registry.FilterForCompatible(ctx) method will not proceed on
	// devices with the given redfish version(s).
	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) 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) 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) PowerStateGet

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

PowerStateGet gets the power state of a BMC machine

func (*Conn) Screenshot

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

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