Documentation ¶
Index ¶
- Constants
- func BMCTimeoutFromCtx(ctx context.Context) time.Duration
- func Close(ctx context.Context, conn Connection)
- func Connect(ctx context.Context, conn Connection) error
- func EstablishConnections(ctx context.Context, bmcs map[string]interface{}) (successfulConnections []string, err error)
- type Accessory
- type Connection
Constants ¶
View Source
const ( // DefaultBMCTimeout is the default value for how long a BMC call/interaction is allowed to run before it is cancelled. DefaultBMCTimeout = 120 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func BMCTimeoutFromCtx ¶
BMCTimeoutFromCtx returns the time remaining in the context deadline.
The returned value defaults to DefaultBMCTimeout.
func Connect ¶
func Connect(ctx context.Context, conn Connection) error
Connect to a BMC interface function.
func EstablishConnections ¶
func EstablishConnections(ctx context.Context, bmcs map[string]interface{}) (successfulConnections []string, err error)
EstablishConnections tries to connect to all BMCs. Successful connection names are returned in a slice of strings. If no connections were successful then an error is returned.
Types ¶
type Accessory ¶
type Accessory struct { Log logr.Logger StatusMessages chan string // SkipRedfishVersions is a list of Redfish versions to be ignored, // // When running an action on a BMC, PBnJ will pass the value of the skipRedfishVersions to bmclib // which will then ignore the Redfish endpoint completely on BMCs running the given Redfish versions, // and will proceed to attempt other drivers like - IPMI/SSH/Vendor API instead. // // for more information see https://github.com/bmc-toolbox/bmclib#bmc-connections SkipRedfishVersions []string }
Accessory for all BMC actions.
func (*Accessory) ParseAuth ¶
func (a *Accessory) ParseAuth(auth *v1.Authn) (host string, username string, passwd string, err error)
ParseAuth will return host, user, passwd from auth struct.
func (*Accessory) SendStatusMessage ¶
SendStatusMessage will send a message to a string chan.
Click to show internal directories.
Click to hide internal directories.