Documentation
¶
Index ¶
- Constants
- 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 ¶
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 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 ¶ 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.
Click to show internal directories.
Click to hide internal directories.