Documentation ¶
Index ¶
- Constants
- Variables
- func DecodeRawError(rawResponse []byte) (string, error)
- func GetManagerID(ctx context.Context, api redfishAPI.RedfishAPI, systemID string) (string, error)
- func GetResourceIDFromURL(refURL string) string
- func GetVirtualMediaID(ctx context.Context, api redfishAPI.RedfishAPI, systemID string) (string, string, error)
- func IsIDInList(idRefList []redfishClient.IdRef, id string) bool
- func RemoteDirect(ctx context.Context, isoURL, redfishURL string, c ifc.Client) error
- func ScreenRedfishError(httpResp *http.Response, clientErr error) error
- func SetAuth(ctx context.Context, username string, password string) context.Context
- type Client
- func (c *Client) EjectVirtualMedia(ctx context.Context) error
- func (c *Client) NodeID() string
- func (c *Client) NodeName() string
- func (c *Client) RebootSystem(ctx context.Context) error
- func (c *Client) RemoteDirect(ctx context.Context, isoURL string) error
- func (c *Client) SetBootSourceByType(ctx context.Context) error
- func (c *Client) SetVirtualMedia(ctx context.Context, isoPath string) error
- func (c *Client) SystemActionRetries() int
- func (c *Client) SystemPowerOff(ctx context.Context) error
- func (c *Client) SystemPowerOn(ctx context.Context) error
- func (c *Client) SystemPowerStatus(ctx context.Context) (power.Status, error)
- func (c *Client) SystemRebootDelay() int
- type ErrOperationRetriesExceeded
- type ErrRedfishClient
- type ErrRedfishMissingConfig
- type ErrUnrecognizedRedfishResponse
Constants ¶
const ( // ClientType is used by other packages as the identifier of the Redfish client. ClientType string = "redfish" )
Variables ¶
var ClientFactory ifc.ClientFactory = func(nodeName string, redfishURL string, insecure bool, useProxy bool, username string, password string, systemActionRetries int, systemRebootDelay int) (ifc.Client, error) { return NewClient(nodeName, redfishURL, insecure, useProxy, username, password, systemActionRetries, systemRebootDelay) }
ClientFactory is a constructor for redfish ifc.Client implementation
Functions ¶
func DecodeRawError ¶
DecodeRawError decodes a raw Redfish HTTP response and retrieves the extended information and available resolutions returned by the BMC.
func GetManagerID ¶
func GetManagerID(ctx context.Context, api redfishAPI.RedfishAPI, systemID string) (string, error)
GetManagerID retrieves the manager ID for a redfish system.
func GetResourceIDFromURL ¶
GetResourceIDFromURL returns a parsed Redfish resource ID from the Redfish URL
func GetVirtualMediaID ¶
func GetVirtualMediaID(ctx context.Context, api redfishAPI.RedfishAPI, systemID string) (string, string, error)
GetVirtualMediaID retrieves the ID of a Redfish virtual media resource if it supports type "CD" or "DVD".
func IsIDInList ¶
func IsIDInList(idRefList []redfishClient.IdRef, id string) bool
IsIDInList checks whether an ID exists in Redfish IDref collection
func RemoteDirect ¶
RemoteDirect allows to perform remotedirect
func ScreenRedfishError ¶
ScreenRedfishError provides a detailed error message for end user consumption by inspecting all Redfish client responses and errors.
Types ¶
type Client ¶
type Client struct { RedfishAPI redfishAPI.RedfishAPI RedfishCFG *redfishClient.Configuration // Sleep is meant to be mocked out for tests Sleep func(d time.Duration) // contains filtered or unexported fields }
Client holds details about a Redfish out-of-band system required for out-of-band management.
func NewClient ¶
func NewClient(nodeName string, redfishURL string, insecure bool, useProxy bool, username string, password string, systemActionRetries int, systemRebootDelay int) (*Client, error)
NewClient returns a client with the capability to make Redfish requests.
func (*Client) EjectVirtualMedia ¶
EjectVirtualMedia ejects a virtual media device attached to a host.
func (*Client) RebootSystem ¶
RebootSystem power cycles a host by sending a shutdown signal followed by a power on signal.
func (*Client) RemoteDirect ¶
RemoteDirect implements remote direct interface
func (*Client) SetBootSourceByType ¶
SetBootSourceByType sets the boot source of the ephemeral node to one that's compatible with the boot source type.
func (*Client) SetVirtualMedia ¶
SetVirtualMedia injects a virtual media device to an established virtual media ID. This assumes that isoPath is accessible to the redfish server and virtualMedia device is either of type CD or DVD.
func (*Client) SystemActionRetries ¶
SystemActionRetries returns number of attempts to reach host during reboot process and ejecting virtual media
func (*Client) SystemPowerOff ¶
SystemPowerOff shuts down a host.
func (*Client) SystemPowerOn ¶
SystemPowerOn powers on a host.
func (*Client) SystemPowerStatus ¶
SystemPowerStatus retrieves the power status of a host as a human-readable string.
func (*Client) SystemRebootDelay ¶
SystemRebootDelay returns number of seconds to wait after reboot if host isn't available
type ErrOperationRetriesExceeded ¶
ErrOperationRetriesExceeded raised if number of operation retries exceeded
func (ErrOperationRetriesExceeded) Error ¶
func (e ErrOperationRetriesExceeded) Error() string
type ErrRedfishClient ¶
type ErrRedfishClient struct {
Message string
}
ErrRedfishClient describes an error encountered by the go-redfish client.
func (ErrRedfishClient) Error ¶
func (e ErrRedfishClient) Error() string
type ErrRedfishMissingConfig ¶
type ErrRedfishMissingConfig struct {
What string
}
ErrRedfishMissingConfig describes an error encountered due to a missing configuration option.
func (ErrRedfishMissingConfig) Error ¶
func (e ErrRedfishMissingConfig) Error() string
type ErrUnrecognizedRedfishResponse ¶
type ErrUnrecognizedRedfishResponse struct {
Key string
}
ErrUnrecognizedRedfishResponse is a debug error that describes unexpected formats in a Redfish error response.
func (ErrUnrecognizedRedfishResponse) Error ¶
func (e ErrUnrecognizedRedfishResponse) Error() string
Directories ¶
Path | Synopsis |
---|---|
vendors
|
|
dell
Package dell wraps the standard Redfish client in order to provide additional functionality required to perform actions on iDRAC servers.
|
Package dell wraps the standard Redfish client in order to provide additional functionality required to perform actions on iDRAC servers. |