Documentation ¶
Index ¶
- type Client
- func (c *Client) AccountService() (*gofishrf.AccountService, error)
- func (c *Client) BMCReset(ctx context.Context, resetType string) (ok bool, err error)
- func (c *Client) Chassis(ctx context.Context) ([]*gofishrf.Chassis, error)
- func (c *Client) Close(ctx context.Context) error
- func (c *Client) Delete(url string) (*http.Response, error)
- func (c *Client) Get(url string) (*http.Response, error)
- func (c *Client) HttpClientTimeout() time.Duration
- func (c *Client) Managers(ctx context.Context) ([]*gofishrf.Manager, error)
- func (c *Client) Open(ctx context.Context) error
- func (c *Client) PatchWithHeaders(ctx context.Context, url string, payload interface{}, ...) (*http.Response, error)
- func (c *Client) PostWithHeaders(ctx context.Context, url string, payload interface{}, ...) (*http.Response, error)
- func (c *Client) RunRawRequestWithHeaders(method, url string, payloadBuffer io.ReadSeeker, contentType string, ...) (*http.Response, error)
- func (c *Client) SessionActive() error
- func (c *Client) SetHttpClientTimeout(t time.Duration)
- func (c *Client) SetVirtualMedia(ctx context.Context, kind string, mediaURL string) (ok bool, err error)
- func (c *Client) SystemBootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)
- func (c *Client) SystemForceOff(ctx context.Context) (ok bool, err error)
- func (c *Client) SystemPowerCycle(ctx context.Context) (ok bool, err error)
- func (c *Client) SystemPowerOff(ctx context.Context) (ok bool, err error)
- func (c *Client) SystemPowerOn(ctx context.Context) (ok bool, err error)
- func (c *Client) SystemPowerStatus(ctx context.Context) (result string, err error)
- func (c *Client) SystemReset(ctx context.Context) (ok bool, err error)
- func (c *Client) Systems() ([]*gofishrf.ComputerSystem, error)
- func (c *Client) UpdateService() (*gofishrf.UpdateService, error)
- func (c *Client) VersionCompatible() bool
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a redfishwrapper client which wraps the gofish client.
func (*Client) AccountService ¶
func (c *Client) AccountService() (*gofishrf.AccountService, error)
AccountService gets the Redfish AccountService.d
func (*Client) HttpClientTimeout ¶
retrieve the current HTTP client timeout
func (*Client) PatchWithHeaders ¶
func (*Client) PostWithHeaders ¶
func (*Client) RunRawRequestWithHeaders ¶
func (c *Client) RunRawRequestWithHeaders(method, url string, payloadBuffer io.ReadSeeker, contentType string, customHeaders map[string]string) (*http.Response, error)
RunRawRequestWithHeaders wraps the gofish client method RunRawRequestWithHeaders
func (*Client) SessionActive ¶
SessionActive returns an error if a redfish session is not active.
func (*Client) SetHttpClientTimeout ¶
Overrides the HTTP client timeout
func (*Client) SetVirtualMedia ¶
func (c *Client) SetVirtualMedia(ctx context.Context, kind string, mediaURL string) (ok bool, err error)
Set the virtual media attached to the system, or just eject everything if mediaURL is empty.
func (*Client) SystemBootDeviceSet ¶
func (c *Client) SystemBootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)
Set the boot device for the system.
func (*Client) SystemForceOff ¶
SystemForceOff powers off the system, without waiting for the OS to shutdown.
func (*Client) SystemPowerCycle ¶
SystemPowerCycle power cycles the system.
func (*Client) SystemPowerOff ¶
SystemPowerOff powers off the system.
func (*Client) SystemPowerOn ¶
SystemPowerOn powers on the system.
func (*Client) SystemPowerStatus ¶
SystemPowerStatus returns the system power state.
func (*Client) SystemReset ¶
SystemReset power cycles the system.
func (*Client) Systems ¶
func (c *Client) Systems() ([]*gofishrf.ComputerSystem, error)
Systems get the system instances from the service.
func (*Client) UpdateService ¶
func (c *Client) UpdateService() (*gofishrf.UpdateService, error)
UpdateService gets the update service instance.
func (*Client) VersionCompatible ¶
VersionCompatible compares the redfish version reported by the BMC with the blacklist if specified.
type Option ¶
type Option func(*Client)
Option is a function applied to a *Conn
func WithBasicAuthEnabled ¶
WithBasicAuthEnabled sets Basic Auth on the Gofish driver.
func WithHTTPClient ¶
WithHTTPClient returns an option that sets an HTTP client for the connecion
func WithSecureTLS ¶
WithSecureTLS returns an option that enables secure TLS with an optional cert pool.
func WithVersionsNotCompatible ¶
WithVersionsNotCompatible returns an option that sets the redfish versions to ignore as incompatible.
The version string value must match the value returned by curl -k "https://10.247.133.39/redfish/v1" | jq .RedfishVersion