bmcutils

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BmcSecretUsernameKey = "username"
	BmcSecretPasswordKey = "password"
)
View Source
const DefaultKubeNamespace = "default"

Variables

This section is empty.

Functions

func CreateBMCClient

func CreateBMCClient(
	ctx context.Context,
	c client.Client,
	protocolScheme metalv1alpha1.ProtocolScheme,
	bmcProtocol metalv1alpha1.ProtocolName,
	address string,
	port int32,
	bmcSecret *metalv1alpha1.BMCSecret,
	bmcOptions bmc.Options,
	skipCertValidation bool,
	opts ...CreateBMCClientOption,
) (bmc.BMC, error)

func GetBMCAddressForBMC

func GetBMCAddressForBMC(ctx context.Context, c client.Client, bmcObj *metalv1alpha1.BMC) (string, error)

func GetBMCClientForServer

func GetBMCClientForServer(ctx context.Context, c client.Client, server *metalv1alpha1.Server, defaultProtocol metalv1alpha1.ProtocolScheme, skipCertValidation bool, options bmc.Options, opts ...CreateBMCClientOption) (bmc.BMC, error)

func GetBMCClientFromBMC

func GetBMCClientFromBMC(ctx context.Context, c client.Client, bmcObj *metalv1alpha1.BMC, defaultProtocol metalv1alpha1.ProtocolScheme, skipCertValidation bool, options bmc.Options, opts ...any) (bmc.BMC, error)

func GetBMCCredentialsForBMCSecretName

func GetBMCCredentialsForBMCSecretName(ctx context.Context, c client.Client, bmcSecretName string) (string, string, error)

func GetBMCCredentialsFromSecret

func GetBMCCredentialsFromSecret(secret *metalv1alpha1.BMCSecret) (string, string, error)

func GetBMCFromBMCName

func GetBMCFromBMCName(ctx context.Context, c client.Client, bmcName string) (*metalv1alpha1.BMC, error)

func GetServerNameFromBMCandIndex

func GetServerNameFromBMCandIndex(index int, bmcObj *metalv1alpha1.BMC) string

func SSHResetBMC

func SSHResetBMC(ctx context.Context, ip, manufacturer, username, password string, timeout time.Duration) error

Types

type BMCClientOptions added in v0.2.0

type BMCClientOptions int
const (
	BMCConnectivityCheckOption BMCClientOptions = 1
)

type BMCUnAvailableError added in v0.2.0

type BMCUnAvailableError struct {
	Message string
}

func (BMCUnAvailableError) Error added in v0.2.0

func (e BMCUnAvailableError) Error() string

type CreateBMCClientOption added in v0.5.0

type CreateBMCClientOption func(*createBMCClientConfig)

CreateBMCClientOption is a functional option for CreateBMCClient and GetBMCClientForServer.

func WithRegistryURL added in v0.5.0

func WithRegistryURL(url string) CreateBMCClientOption

WithRegistryURL configures the BMC client to POST dummy registration data to the given base URL after SetPXEBootOnce. Used with ProtocolRedfishWithRegistryPatch to simulate probe boot registration without a real K8s Job.

Jump to

Keyboard shortcuts

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