bmc

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BMC

type BMC interface {
	Type() string
	Tags() map[string]string
	Credentials() (Credentials, time.Time)
	EnsureInitialCredentials(ctx context.Context, defaultCreds []Credentials, tempPassword string) error
	Connect(ctx context.Context) error
	CreateUser(ctx context.Context, creds Credentials, tempPassword string) error
	DeleteUsers(ctx context.Context, regex *regexp.Regexp) error
	ReadInfo(ctx context.Context) (Info, error)
}

func NewBMC

func NewBMC(typ string, tags map[string]string, host string, port int, creds Credentials, exp time.Time) (BMC, error)

type Credentials

type Credentials struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

type FSCOMBMC

type FSCOMBMC struct {
	// contains filtered or unexported fields
}

func (*FSCOMBMC) Connect

func (b *FSCOMBMC) Connect(ctx context.Context) error

func (*FSCOMBMC) CreateUser

func (b *FSCOMBMC) CreateUser(ctx context.Context, creds Credentials, _ string) error

func (*FSCOMBMC) Credentials

func (b *FSCOMBMC) Credentials() (Credentials, time.Time)

func (*FSCOMBMC) DeleteUsers

func (b *FSCOMBMC) DeleteUsers(ctx context.Context, regex *regexp.Regexp) error

func (*FSCOMBMC) EnsureInitialCredentials

func (b *FSCOMBMC) EnsureInitialCredentials(ctx context.Context, defaultCreds []Credentials, tempPassword string) error

func (*FSCOMBMC) ReadInfo

func (b *FSCOMBMC) ReadInfo(ctx context.Context) (Info, error)

func (*FSCOMBMC) Tags

func (b *FSCOMBMC) Tags() map[string]string

func (*FSCOMBMC) Type

func (b *FSCOMBMC) Type() string

type IPMIBMC

type IPMIBMC struct {
	// contains filtered or unexported fields
}

func (*IPMIBMC) Connect

func (b *IPMIBMC) Connect(ctx context.Context) error

func (*IPMIBMC) CreateUser

func (b *IPMIBMC) CreateUser(ctx context.Context, creds Credentials, _ string) error

func (*IPMIBMC) Credentials

func (b *IPMIBMC) Credentials() (Credentials, time.Time)

func (*IPMIBMC) DeleteUsers

func (b *IPMIBMC) DeleteUsers(ctx context.Context, regex *regexp.Regexp) error

func (*IPMIBMC) EnsureInitialCredentials

func (b *IPMIBMC) EnsureInitialCredentials(ctx context.Context, defaultCreds []Credentials, tempPassword string) error

func (*IPMIBMC) PowerControl

func (b *IPMIBMC) PowerControl() PowerControl

func (*IPMIBMC) PowerOff

func (b *IPMIBMC) PowerOff(ctx context.Context, immediate bool) error

func (*IPMIBMC) PowerOn

func (b *IPMIBMC) PowerOn(ctx context.Context) error

func (*IPMIBMC) ReadInfo

func (b *IPMIBMC) ReadInfo(ctx context.Context) (Info, error)

func (*IPMIBMC) Reset

func (b *IPMIBMC) Reset(ctx context.Context, immediate bool) error

func (*IPMIBMC) ResetControl

func (b *IPMIBMC) ResetControl() ResetControl

func (*IPMIBMC) Tags

func (b *IPMIBMC) Tags() map[string]string

func (*IPMIBMC) Type

func (b *IPMIBMC) Type() string

type IPMIUser

type IPMIUser struct {
	// contains filtered or unexported fields
}

type Info

type Info struct {
	UUID         string
	Type         string
	Capabilities []string
	SerialNumber string
	SKU          string
	Manufacturer string
	LocatorLED   string
	Power        string
	OS           string
	OSReason     string
	Console      string
	FWVersion    string
}

type LEDControl

type LEDControl interface {
	SetLocatorLED(ctx context.Context, state string) (string, error)
}

type NTPControl

type NTPControl interface {
	SetNTPServers(ctx context.Context, ntpServers []string) error
}

type PowerControl

type PowerControl interface {
	PowerOn(ctx context.Context) error
	PowerOff(ctx context.Context, immediate bool) error
}

type RedfishBMC

type RedfishBMC struct {
	// contains filtered or unexported fields
}

func (*RedfishBMC) Connect

func (b *RedfishBMC) Connect(ctx context.Context) error

func (*RedfishBMC) CreateUser

func (b *RedfishBMC) CreateUser(ctx context.Context, creds Credentials, tempPassword string) error

func (*RedfishBMC) Credentials

func (b *RedfishBMC) Credentials() (Credentials, time.Time)

func (*RedfishBMC) DeleteUsers

func (b *RedfishBMC) DeleteUsers(ctx context.Context, regex *regexp.Regexp) error

func (*RedfishBMC) EnsureInitialCredentials

func (b *RedfishBMC) EnsureInitialCredentials(ctx context.Context, defaultCreds []Credentials, tempPassword string) error

func (*RedfishBMC) LEDControl

func (b *RedfishBMC) LEDControl() LEDControl

func (*RedfishBMC) NTPControl

func (b *RedfishBMC) NTPControl() NTPControl

func (*RedfishBMC) PowerControl

func (b *RedfishBMC) PowerControl() PowerControl

func (*RedfishBMC) PowerOff

func (b *RedfishBMC) PowerOff(ctx context.Context, immediate bool) error

func (*RedfishBMC) PowerOn

func (b *RedfishBMC) PowerOn(ctx context.Context) error

func (*RedfishBMC) ReadInfo

func (b *RedfishBMC) ReadInfo(ctx context.Context) (Info, error)

func (*RedfishBMC) Reset

func (b *RedfishBMC) Reset(ctx context.Context, immediate bool) error

func (*RedfishBMC) ResetControl

func (b *RedfishBMC) ResetControl() ResetControl

func (*RedfishBMC) SetLocatorLED

func (b *RedfishBMC) SetLocatorLED(ctx context.Context, state string) (string, error)

func (*RedfishBMC) SetNTPServers

func (b *RedfishBMC) SetNTPServers(_ context.Context, _ []string) error

func (*RedfishBMC) Tags

func (b *RedfishBMC) Tags() map[string]string

func (*RedfishBMC) Type

func (b *RedfishBMC) Type() string

type ResetControl

type ResetControl interface {
	Reset(ctx context.Context, immediate bool) error
}

type SSHBMC

type SSHBMC struct {
	// contains filtered or unexported fields
}

func (*SSHBMC) Connect

func (b *SSHBMC) Connect(ctx context.Context) error

func (*SSHBMC) CreateUser

func (b *SSHBMC) CreateUser(ctx context.Context, creds Credentials, _ string) error

func (*SSHBMC) Credentials

func (b *SSHBMC) Credentials() (Credentials, time.Time)

func (*SSHBMC) DeleteUsers

func (b *SSHBMC) DeleteUsers(ctx context.Context, regex *regexp.Regexp) error

func (*SSHBMC) EnsureInitialCredentials

func (b *SSHBMC) EnsureInitialCredentials(ctx context.Context, defaultCreds []Credentials, tempPassword string) error

func (*SSHBMC) ReadInfo

func (b *SSHBMC) ReadInfo(ctx context.Context) (Info, error)

func (*SSHBMC) Tags

func (b *SSHBMC) Tags() map[string]string

func (*SSHBMC) Type

func (b *SSHBMC) Type() string

Jump to

Keyboard shortcuts

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