Documentation
¶
Index ¶
- Constants
- Variables
- func CreateBMCClient(ctx context.Context, c client.Client, ...) (bmc.BMC, error)
- func GetBMCAddressForBMC(ctx context.Context, c client.Client, bmcObj *metalv1alpha1.BMC) (string, error)
- func GetBMCClientForServer(ctx context.Context, c client.Client, server *metalv1alpha1.Server, ...) (bmc.BMC, error)
- func GetBMCClientFromBMC(ctx context.Context, c client.Client, bmcObj *metalv1alpha1.BMC, ...) (bmc.BMC, error)
- func GetBMCCredentialsForBMCSecretName(ctx context.Context, c client.Client, bmcSecretName string) (string, string, error)
- func GetBMCCredentialsFromSecret(secret *metalv1alpha1.BMCSecret) (string, string, error)
- func GetBMCFromBMCName(ctx context.Context, c client.Client, bmcName string) (*metalv1alpha1.BMC, error)
- func GetProtocolScheme(scheme metalv1alpha1.ProtocolScheme, ...) metalv1alpha1.ProtocolScheme
- func GetServerNameFromBMCandIndex(index int, bmcObj *metalv1alpha1.BMC) string
- func SSHResetBMC(ctx context.Context, ip, manufacturer, username, password string, ...) error
- type BMCClientOptions
- type BMCUnAvailableError
- type CreateBMCClientOption
Constants ¶
View Source
const ( BmcSecretUsernameKey = "username" BmcSecretPasswordKey = "password" )
View Source
const DefaultKubeNamespace = "default"
Variables ¶
View Source
var SSHResetBMCFunc = SSHResetBMC
SSHResetBMCFunc is the function used to perform SSH-based BMC resets. It can be replaced in tests to inject a mock implementation.
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 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 GetBMCCredentialsFromSecret ¶
func GetBMCCredentialsFromSecret(secret *metalv1alpha1.BMCSecret) (string, string, error)
func GetBMCFromBMCName ¶
func GetProtocolScheme ¶
func GetProtocolScheme(scheme metalv1alpha1.ProtocolScheme, defaultScheme metalv1alpha1.ProtocolScheme) metalv1alpha1.ProtocolScheme
func GetServerNameFromBMCandIndex ¶
func GetServerNameFromBMCandIndex(index int, bmcObj *metalv1alpha1.BMC) string
Types ¶
type BMCClientOptions ¶
type BMCClientOptions int
const (
BMCConnectivityCheckOption BMCClientOptions = 1
)
type BMCUnAvailableError ¶
type BMCUnAvailableError struct {
Message string
}
func (BMCUnAvailableError) Error ¶
func (e BMCUnAvailableError) Error() string
type CreateBMCClientOption ¶
type CreateBMCClientOption func(*createBMCClientConfig)
CreateBMCClientOption is a functional option for CreateBMCClient and GetBMCClientForServer.
func WithRegistryURL ¶
func WithRegistryURL(url string) CreateBMCClientOption
WithRegistryURL configures the BMC client to POST dummy registration data to the given base URL after SetBootOverride. Used with ProtocolRedfishWithRegistryPatch to simulate probe boot registration without a real K8s Job.
Click to show internal directories.
Click to hide internal directories.