redfish

package
v0.4.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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("given user not present")
	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,
	}
)

Functions

This section is empty.

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) Close

func (c *Conn) Close(ctx context.Context) error

Close a connection to a BMC via redfish

func (*Conn) Compatible

func (c *Conn) Compatible(ctx context.Context) bool

Compatible tests whether a BMC is compatible with the gofish provider

func (*Conn) Name

func (c *Conn) Name() string

func (*Conn) Open

func (c *Conn) Open(ctx context.Context) (err error)

Open a connection to a BMC via redfish

func (*Conn) PowerSet

func (c *Conn) PowerSet(ctx context.Context, state string) (ok bool, err error)

PowerSet sets the power state of a BMC via redfish

func (*Conn) PowerStateGet

func (c *Conn) PowerStateGet(ctx context.Context) (state string, err error)

PowerStateGet gets the power state of a BMC machine

func (*Conn) UserCreate added in v0.4.14

func (c *Conn) UserCreate(ctx context.Context, user, pass, role string) (ok bool, err error)

UserCreate adds a new user account

func (*Conn) UserRead added in v0.4.14

func (c *Conn) UserRead(ctx context.Context) (users []map[string]string, err error)

UserRead returns a list of enabled user accounts

func (*Conn) UserUpdate added in v0.4.14

func (c *Conn) UserUpdate(ctx context.Context, user, pass, role string) (ok bool, err error)

UserUpdate updates a user password and role

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL