bmc

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

View Source
const (
	FalseStr = "False"
	TrueStr  = "True"
)

Variables

This section is empty.

Functions

func GetParsedURL

func GetParsedURL(address string) (parsedURL *url.URL, err error)

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{}

	BIOSInterface() string

	// Boot interface to set
	BootInterface() string

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

	// Firmware interface to set
	FirmwareInterface() string

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

	// Whether the driver supports booting a preprovisioning image in ISO format
	SupportsISOPreprovisioningImage() bool

	// RequiresProvisioningNetwork checks the driver requires provisioning network
	RequiresProvisioningNetwork() bool

	// Build bios clean steps for ironic
	BuildBIOSSettings(firmwareConfig *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 FirmwareConfig

type FirmwareConfig struct {
	// Supports the virtualization of platform hardware.
	VirtualizationEnabled *bool

	// Allows a single physical processor core to appear as several logical processors.
	SimultaneousMultithreadingEnabled *bool

	// SR-IOV support enables a hypervisor to create virtual instances of a PCI-express device, potentially increasing performance.
	SriovEnabled *bool
}

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