bmc

package
v0.0.0-...-2028a87 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFactory

func RegisterFactory(name string, factory AccessDetailsFactory, schemes []string)

RegisterFactory maps a BMC type name to an AccessDetailsFactory, with optional scheme extensions.

RegisterFactory("bmcname", theFunc, []string{"http", "https"}) maps "bmcname", "bmcname+http", and "bmcname+https" to theFunc

Types

type AccessDetails

type AccessDetails interface {
	// Type returns the kind of the BMC, indicating the driver that
	// will be used to communicate with it.
	Type() string

	// NeedsMAC returns true when the host is going to need a separate
	// port created rather than having it discovered.
	NeedsMAC() bool

	// The name of the driver to instantiate the BMC with. This may differ
	// from the Type - both the ipmi and libvirt types use the ipmi driver.
	Driver() string

	// DriverInfo returns a data structure to pass as the DriverInfo
	// parameter when creating a node in Ironic. The structure is
	// pre-populated with the access information, and the caller is
	// expected to add any other information that might be needed
	// (such as the kernel and ramdisk locations).
	DriverInfo(bmcCreds Credentials) map[string]interface{}

	// Boot interface to set
	BootInterface() string

	ManagementInterface() string
	PowerInterface() string
	RAIDInterface() string
	VendorInterface() string

	// Whether the driver supports changing secure boot state.
	SupportsSecureBoot() bool

	// Build bios clean steps for ironic
	BuildBIOSSettings(firmwareConfig *metal3v1alpha1.FirmwareConfig) (settings []map[string]string, err error)
}

AccessDetails contains the information about how to get to a BMC.

NOTE(dhellmann): This structure is very likely to change as we adapt it to additional types.

func NewAccessDetails

func NewAccessDetails(address string, disableCertificateVerification bool) (AccessDetails, error)

NewAccessDetails creates an AccessDetails structure from the URL for a BMC.

type AccessDetailsFactory

type AccessDetailsFactory func(parsedURL *url.URL, disableCertificateVerification bool) (AccessDetails, error)

AccessDetailsFactory describes a callable that returns a new AccessDetails based on the input parameters.

type Credentials

type Credentials struct {
	Username string
	Password string
}

Credentials holds the information for authenticating with the BMC.

func (Credentials) Validate

func (creds Credentials) Validate() error

Validate returns an error if the credentials are invalid

type CredentialsValidationError

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

CredentialsValidationError is returned when the provided BMC credentials are invalid (e.g. null)

func (CredentialsValidationError) Error

type UnknownBMCTypeError

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

UnknownBMCTypeError is returned when the provided BMC address cannot be mapped to a driver.

func (UnknownBMCTypeError) Error

func (e UnknownBMCTypeError) Error() string

Jump to

Keyboard shortcuts

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