Documentation ¶
Index ¶
- Constants
- Variables
- func SupportedFirmwareApplyAtValues() []string
- type Config
- type Conn
- func (c *Conn) BmcReset(ctx context.Context, resetType string) (ok bool, err error)
- func (c *Conn) BootDeviceSet(ctx context.Context, bootDevice string, setPersistent, efiBoot bool) (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) GetBiosConfiguration(ctx context.Context) (biosConfig map[string]string, err error)
- func (c *Conn) GetFirmwareInstallTaskQueued(ctx context.Context, component string) (*gofishrf.Task, 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 ¶
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.FeatureBootDeviceSet, providers.FeatureVirtualMedia, providers.FeatureInventoryRead, providers.FeatureFirmwareInstall, providers.FeatureFirmwareInstallStatus, providers.FeatureBmcReset, } )
Functions ¶
func SupportedFirmwareApplyAtValues ¶
func SupportedFirmwareApplyAtValues() []string
SupportedFirmwareApplyAtValues returns the supported redfish firmware applyAt values
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 }
type Conn ¶
Conn details for redfish client
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) Compatible ¶
Compatible tests whether a BMC is compatible with the gofish provider
func (*Conn) DeviceVendorModel ¶
DeviceVendorModel returns the device manufacturer and model attributes
func (*Conn) FirmwareInstall ¶
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 ¶
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) GetBiosConfiguration ¶
func (*Conn) GetFirmwareInstallTaskQueued ¶
func (c *Conn) GetFirmwareInstallTaskQueued(ctx context.Context, component string) (*gofishrf.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) 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