ibmc

package
v0.5.7 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BMCType defines the bmc model that is supported by this package
	BMCType = "ibmc"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ibmc

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

Ibmc holds the status and properties of a connection to an iDrac device

func New

func New(ip string, username string, password string) (i *Ibmc, err error)

New returns a new ibmc ready to be used

func (*Ibmc) ApplyCfg

func (i *Ibmc) ApplyCfg(config *cfgresources.ResourcesConfig) (err error)

ApplyCfg implements the Bmc interface

func (*Ibmc) Bios

func (i *Ibmc) Bios(cfg *cfgresources.Bios) error

Bios method implements the Configure interface

func (*Ibmc) BiosVersion

func (i *Ibmc) BiosVersion() (string, error)

BiosVersion implements the Bmc interface

func (*Ibmc) CPU

func (i *Ibmc) CPU() (string, int, int, int, error)

CPU implements the Bmc interface

func (*Ibmc) ChassisSerial added in v0.2.9

func (i *Ibmc) ChassisSerial() (string, error)

ChassisSerial implements the Bmc interface

func (*Ibmc) CheckCredentials

func (i *Ibmc) CheckCredentials() error

CheckCredentials implements the Bmc interface

func (*Ibmc) CheckFirmwareVersion added in v0.4.14

func (i *Ibmc) CheckFirmwareVersion() (version string, err error)

func (*Ibmc) Close

func (i *Ibmc) Close(ctx context.Context) error

Close implements the Bmc interface

func (*Ibmc) CurrentHTTPSCert added in v0.2.4

func (i *Ibmc) CurrentHTTPSCert() ([]*x509.Certificate, bool, error)

CurrentHTTPSCert returns the current x509 certficates configured on the BMC The bool value returned indicates if the BMC supports CSR generation. CurrentHTTPSCert implements the Configure interface.

func (*Ibmc) Disks

func (i *Ibmc) Disks() ([]*devices.Disk, error)

Disks implements the Bmc interface

func (*Ibmc) FirmwareUpdateBMC added in v0.4.11

func (i *Ibmc) FirmwareUpdateBMC(ctx context.Context, filePath string) error

Updates the BMC firmware, implements the Firmware interface

func (*Ibmc) GenerateCSR added in v0.2.4

func (i *Ibmc) GenerateCSR(cert *cfgresources.HTTPSCertAttributes) ([]byte, error)

GenerateCSR generates a CSR request on the BMC. GenerateCSR implements the Configure interface.

func (*Ibmc) GetBIOSVersion added in v0.4.11

func (i *Ibmc) GetBIOSVersion(ctx context.Context) (string, error)

BiosVersion returns the BIOS version from the BMC, implements the Firmware interface

func (*Ibmc) GetBMCVersion added in v0.4.11

func (i *Ibmc) GetBMCVersion(ctx context.Context) (string, error)

BMCVersion returns the BMC version, implements the Firmware interface

func (*Ibmc) HardwareType added in v0.3.3

func (i *Ibmc) HardwareType() string

HardwareType implements the Bmc interface

func (*Ibmc) IsBlade

func (i *Ibmc) IsBlade() (bool, error)

IsBlade implements the Bmc interface

func (*Ibmc) IsOn added in v0.2.4

func (i *Ibmc) IsOn() (status bool, err error)

IsOn implements the Bmc interface

func (*Ibmc) Ldap

func (i *Ibmc) Ldap(cfg *cfgresources.Ldap) error

Ldap method implements the Configure interface

func (*Ibmc) LdapGroups added in v0.4.14

func (i *Ibmc) LdapGroups(cfgGroups []*cfgresources.LdapGroup, cfgLdap *cfgresources.Ldap) error

LdapGroups method implements the Configure interface

func (*Ibmc) License

func (i *Ibmc) License() (string, string, error)

License implements the Bmc interface

func (*Ibmc) Memory

func (i *Ibmc) Memory() (int, error)

Memory implements the Bmc interface

func (*Ibmc) Model

func (i *Ibmc) Model() (string, error)

Model implements the Bmc interface

func (*Ibmc) Name

func (i *Ibmc) Name() (string, error)

Name implements the Bmc interface

func (*Ibmc) Network

func (i *Ibmc) Network(cfg *cfgresources.Network) (bool, error)

Network method implements the Configure interface

func (*Ibmc) Nics

func (i *Ibmc) Nics() ([]*devices.Nic, error)

Nics implements the Bmc interface

func (*Ibmc) Ntp

func (i *Ibmc) Ntp(cfg *cfgresources.Ntp) error

Ntp method implements the Configure interface

func (*Ibmc) Power added in v0.3.5

func (i *Ibmc) Power(cfg *cfgresources.Power) (err error)

Power implemented the Configure interface

func (*Ibmc) PowerCycle

func (i *Ibmc) PowerCycle() (status bool, err error)

PowerCycle implements the Bmc interface

func (*Ibmc) PowerCycleBmc

func (i *Ibmc) PowerCycleBmc() (status bool, err error)

PowerCycleBmc implements the Bmc interface

func (*Ibmc) PowerKw

func (i *Ibmc) PowerKw() (float64, error)

PowerKw implements the Bmc interface

func (*Ibmc) PowerOff added in v0.2.4

func (i *Ibmc) PowerOff() (status bool, err error)

PowerOff implements the Bmc interface

func (*Ibmc) PowerOn added in v0.2.4

func (i *Ibmc) PowerOn() (status bool, err error)

PowerOn implements the Bmc interface

func (*Ibmc) PowerState

func (i *Ibmc) PowerState() (string, error)

PowerState implements the Bmc interface

func (*Ibmc) PxeOnce added in v0.2.4

func (i *Ibmc) PxeOnce() (status bool, err error)

PxeOnce implements the Bmc interface

func (*Ibmc) Resources

func (i *Ibmc) Resources() []string

Resources returns a slice of supported resources and the order they are to be applied in.

func (*Ibmc) Screenshot

func (i *Ibmc) Screenshot() ([]byte, string, error)

Screenshot implements the Bmc interface

func (*Ibmc) Serial

func (i *Ibmc) Serial() (string, error)

Serial implements the Bmc interface

func (*Ibmc) ServerSnapshot

func (i *Ibmc) ServerSnapshot() (interface{}, error)

ServerSnapshot implements the Bmc interface

func (*Ibmc) SetLicense

func (i *Ibmc) SetLicense(*cfgresources.License) error

SetLicense implements the Configure interface

func (*Ibmc) Slot added in v0.2.9

func (i *Ibmc) Slot() (int, error)

Slot implements the Bmc interface

func (*Ibmc) Status

func (i *Ibmc) Status() (string, error)

Status implements the Bmc interface

func (*Ibmc) Syslog

func (i *Ibmc) Syslog(cfg *cfgresources.Syslog) error

Syslog method implements the Configure interface

func (*Ibmc) TempC

func (i *Ibmc) TempC() (int, error)

TempC implements the Bmc interface

func (*Ibmc) UpdateCredentials

func (i *Ibmc) UpdateCredentials(string, string)

UpdateCredentials implements the Bmc interface

func (*Ibmc) UpdateFirmware added in v0.2.4

func (i *Ibmc) UpdateFirmware(string, string) (bool, string, error)

UpdateFirmware implements the Bmc inteface

func (*Ibmc) UploadHTTPSCert added in v0.2.4

func (i *Ibmc) UploadHTTPSCert(cert []byte, certFileName string, key []byte, keyFileName string) (bool, error)

UploadHTTPSCert uploads the given CRT cert, UploadHTTPSCert implements the Configure interface.

func (*Ibmc) User

func (i *Ibmc) User(cfg []*cfgresources.User) error

User method implements the Configure interface

func (*Ibmc) Vendor

func (i *Ibmc) Vendor() string

Vendor implements the Bmc interface

func (*Ibmc) Version added in v0.3.3

func (i *Ibmc) Version() (string, error)

Version implements the Bmc interface

Jump to

Keyboard shortcuts

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