bmcutils

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Apache-2.0 Imports: 10 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,
) (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, insecure bool, options bmc.Options) (bmc.BMC, error)

func GetBMCClientFromBMC

func GetBMCClientFromBMC(ctx context.Context, c client.Client, bmcObj *metalv1alpha1.BMC, insecure bool, options bmc.Options, opts ...BMCClientOptions) (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 GetProtocolScheme

func GetProtocolScheme(scheme metalv1alpha1.ProtocolScheme, insecure bool) metalv1alpha1.ProtocolScheme

func GetServerNameFromBMCandIndex

func GetServerNameFromBMCandIndex(index int, bmc *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

Jump to

Keyboard shortcuts

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