Documentation ¶
Index ¶
- Constants
- Variables
- func SupportedFirmwareApplyAtValues() []string
- type Conn
- func (c *Conn) BmcReset(ctx context.Context, resetType string) (ok bool, err error)
- func (c *Conn) Close(ctx context.Context) error
- func (c *Conn) Compatible(ctx context.Context) bool
- func (c *Conn) DeviceVendorModel(ctx context.Context) (vendor, model string, err error)
- func (c *Conn) FirmwareInstall(ctx context.Context, component, applyAt string, forceInstall bool, ...) (taskID string, err error)
- func (c *Conn) FirmwareInstallStatus(ctx context.Context, installVersion, component, taskID string) (state string, err error)
- func (c *Conn) GetFirmwareInstallTaskQueued(ctx context.Context, component string) (*rf.Task, error)
- func (c *Conn) Inventory(ctx context.Context) (device *devices.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) 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 ¶
const ( // ProviderName for the provider implementation ProviderName = "gofish" // ProviderProtocol for the provider implementation ProviderProtocol = "redfish" )
Variables ¶
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"} )
var ( // Features implemented by gofish Features = registrar.Features{ providers.FeaturePowerSet, providers.FeaturePowerState, providers.FeatureUserCreate, providers.FeatureUserUpdate, providers.FeatureUserDelete, providers.FeatureInventoryRead, providers.FeatureFirmwareInstall, providers.FeatureFirmwareInstallStatus, providers.FeatureBmcReset, } )
Functions ¶
func SupportedFirmwareApplyAtValues ¶ added in v0.5.3
func SupportedFirmwareApplyAtValues() []string
SupportedFirmwareApplyAtValues returns the supported redfish firmware applyAt values
Types ¶
type Conn ¶
type Conn struct { Host string Port string User string Pass string Log logr.Logger // contains filtered or unexported fields }
Conn details for redfish client
func (*Conn) Compatible ¶
Compatible tests whether a BMC is compatible with the gofish provider
func (*Conn) DeviceVendorModel ¶ added in v0.5.3
DeviceVendorModel returns the device vendor and model attributes
func (*Conn) FirmwareInstall ¶ added in v0.5.3
func (c *Conn) FirmwareInstall(ctx context.Context, component, applyAt string, forceInstall bool, reader io.Reader) (taskID string, err error)
FirmwareInstall uploads and initiates the firmware install process
func (*Conn) FirmwareInstallStatus ¶ added in v0.5.3
func (c *Conn) FirmwareInstallStatus(ctx context.Context, installVersion, component, taskID string) (state string, err error)
FirmwareInstallStatus returns the status of the firmware install task queued
func (*Conn) GetFirmwareInstallTaskQueued ¶ added in v0.5.3
func (c *Conn) GetFirmwareInstallTaskQueued(ctx context.Context, component string) (*rf.Task, error)
GetFirmwareInstallTaskQueued returns the redfish task object for a queued update task
func (*Conn) PowerStateGet ¶
PowerStateGet gets the power state of a BMC machine
func (*Conn) UserCreate ¶ added in v0.4.14
UserCreate adds a new user account
func (*Conn) UserDelete ¶ added in v0.5.3
UserDelete deletes a user account
type Option ¶ added in v0.5.3
type Option func(*Conn)
Option is a function applied to a *Conn
func WithHTTPClient ¶ added in v0.5.3
WithHTTPClient returns an option that sets an HTTP client for the connecion
func WithSecureTLS ¶ added in v0.5.3
WithSecureTLS returns an option that enables secure TLS with an optional cert pool.