Documentation ¶
Index ¶
- Constants
- Variables
- type Config
- type Conn
- func (c *Conn) BmcReset(ctx context.Context, resetType string) (ok bool, err error)
- func (c *Conn) BootDeviceOverrideGet(ctx context.Context) (bmc.BootDeviceOverride, error)
- func (c *Conn) BootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)
- func (c *Conn) ClearSystemEventLog(ctx context.Context) (err error)
- func (c *Conn) Close(ctx context.Context) error
- func (c *Conn) Compatible(ctx context.Context) bool
- func (c *Conn) GetBiosConfiguration(ctx context.Context) (biosConfig map[string]string, err error)
- func (c *Conn) GetSystemEventLog(ctx context.Context) (entries [][]string, err error)
- func (c *Conn) GetSystemEventLogRaw(ctx context.Context) (eventlog string, err error)
- func (c *Conn) Inventory(ctx context.Context) (device *common.Device, err error)
- func (c *Conn) Name() string
- func (c *Conn) Open(ctx context.Context) (err error)
- func (c *Conn) PowerSet(ctx context.Context, state string) (ok bool, err error)
- func (c *Conn) PowerStateGet(ctx context.Context) (state string, err error)
- func (c *Conn) SetVirtualMedia(ctx context.Context, kind string, mediaURL string) (ok bool, err error)
- func (c *Conn) UserCreate(ctx context.Context, user, pass, role string) (ok bool, err error)
- func (c *Conn) UserDelete(ctx context.Context, user string) (ok bool, err error)
- func (c *Conn) UserRead(ctx context.Context) (users []map[string]string, err error)
- func (c *Conn) UserUpdate(ctx context.Context, user, pass, role string) (ok bool, err error)
- type Option
Constants ¶
View Source
const ( // ProviderName for the provider implementation ProviderName = "gofish" // ProviderProtocol for the provider implementation ProviderProtocol = "redfish" )
Variables ¶
View Source
var ( ErrNoUserSlotsAvailable = errors.New("no user account slots available") ErrUserNotPresent = errors.New("account with username was not found") ErrUserPassParams = errors.New("user and pass parameters required") ErrUserExists = errors.New("user exists") ErrInvalidUserRole = errors.New("invalid user role") ValidRoles = []string{"Administrator", "Operator", "ReadOnly", "None"} )
View Source
var ( // Features implemented by gofish Features = registrar.Features{ providers.FeaturePowerSet, providers.FeaturePowerState, providers.FeatureUserCreate, providers.FeatureUserUpdate, providers.FeatureUserDelete, providers.FeatureBootDeviceSet, providers.FeatureVirtualMedia, providers.FeatureInventoryRead, providers.FeatureBmcReset, providers.FeatureClearSystemEventLog, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { HttpClient *http.Client Port string // VersionsNotCompatible is the list of incompatible redfish versions. // // With this option set, The bmclib.Registry.FilterForCompatible(ctx) method will not proceed on // devices with the given redfish version(s). VersionsNotCompatible []string RootCAs *x509.CertPool UseBasicAuth bool // DisableEtagMatch disables the If-Match Etag header from being included by the Gofish driver. DisableEtagMatch bool }
type Conn ¶
Conn details for redfish client
func (*Conn) BootDeviceOverrideGet ¶ added in v2.2.0
BootDeviceOverrideGet gets the boot override device information
func (*Conn) BootDeviceSet ¶
func (c *Conn) BootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (ok bool, err error)
BootDeviceSet sets the boot device
func (*Conn) ClearSystemEventLog ¶
func (*Conn) Compatible ¶
Compatible tests whether a BMC is compatible with the gofish provider
func (*Conn) GetBiosConfiguration ¶
GetBiosConfiguration return bios configuration
func (*Conn) GetSystemEventLog ¶ added in v2.2.0
func (*Conn) GetSystemEventLogRaw ¶ added in v2.2.0
func (*Conn) PowerStateGet ¶
PowerStateGet gets the power state of a BMC machine
func (*Conn) SetVirtualMedia ¶
func (c *Conn) SetVirtualMedia(ctx context.Context, kind string, mediaURL string) (ok bool, err error)
SetVirtualMedia sets the virtual media
func (*Conn) UserCreate ¶
UserCreate adds a new user account
func (*Conn) UserDelete ¶
UserDelete deletes a user account
type Option ¶
type Option func(*Config)
Option for setting optional Client values
func WithEtagMatchDisabled ¶
WithEtagMatchDisabled disables the If-Match Etag header from being included by the Gofish driver.
As of the current implementation this disables the header for POST/PATCH requests to the System entity endpoints.
func WithHttpClient ¶
func WithRootCAs ¶
func WithUseBasicAuth ¶
Click to show internal directories.
Click to hide internal directories.