idrac9

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type IDrac9

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

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

func New

func New(ip string, username string, password string) (iDrac *IDrac9, err error)

New returns a new IDrac9 ready to be used

func (*IDrac9) ApplyCfg

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

ApplyCfg applies the configuration on the bmc

func (*IDrac9) BiosVersion

func (i *IDrac9) BiosVersion() (version string, err error)

BiosVersion returns the current version of the bios

func (*IDrac9) BmcType

func (i *IDrac9) BmcType() (bmcType string)

BmcType returns the type of bmc we are talking to

func (*IDrac9) BmcVersion

func (i *IDrac9) BmcVersion() (bmcVersion string, err error)

BmcVersion returns the version of the bmc we are running

func (*IDrac9) CPU

func (i *IDrac9) CPU() (cpu string, cpuCount int, coreCount int, hyperthreadCount int, err error)

CPU return the cpu, cores and hyperthreads the server

func (*IDrac9) CheckCredentials added in v0.1.5

func (i *IDrac9) CheckCredentials() (err error)

CheckCredentials verify whether the credentials are valid or not

func (*IDrac9) Close added in v0.1.5

func (i *IDrac9) Close() (err error)

Close closes the connection properly

func (*IDrac9) Disks

func (i *IDrac9) Disks() (disks []*devices.Disk, err error)

Disks returns a list of disks installed on the device

func (*IDrac9) IsBlade

func (i *IDrac9) IsBlade() (isBlade bool, err error)

IsBlade returns if the current hardware is a blade or not

func (*IDrac9) IsOn added in v0.1.5

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

IsOn tells if a machine is currently powered on

func (*IDrac9) License

func (i *IDrac9) License() (name string, licType string, err error)

License returns the bmc license information

func (*IDrac9) Memory

func (i *IDrac9) Memory() (mem int, err error)

Memory return the total amount of memory of the server

func (*IDrac9) Model

func (i *IDrac9) Model() (model string, err error)

Model returns the device model

func (*IDrac9) Name

func (i *IDrac9) Name() (name string, err error)

Name returns the name of this server from the bmc point of view

func (*IDrac9) Nics

func (i *IDrac9) Nics() (nics []*devices.Nic, err error)

Nics returns all found Nics in the device

func (*IDrac9) PowerCycle added in v0.1.5

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

PowerCycle reboots the machine via bmc

func (*IDrac9) PowerCycleBmc added in v0.1.5

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

PowerCycleBmc reboots the bmc we are connected to

func (*IDrac9) PowerKw

func (i *IDrac9) PowerKw() (power float64, err error)

PowerKw returns the current power usage in Kw

func (*IDrac9) PowerOff added in v0.1.5

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

PowerOff power off the machine via bmc

func (*IDrac9) PowerOn added in v0.1.5

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

PowerOn power on the machine via bmc

func (*IDrac9) PowerState

func (i *IDrac9) PowerState() (state string, err error)

PowerState returns the current power state of the machine

func (*IDrac9) Psus

func (i *IDrac9) Psus() (psus []*devices.Psu, err error)

Psus returns a list of psus installed on the device

func (*IDrac9) PxeOnce added in v0.1.5

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

PxeOnce makes the machine to boot via pxe once

func (*IDrac9) Serial

func (i *IDrac9) Serial() (serial string, err error)

Serial returns the device serial

func (*IDrac9) ServerSnapshot

func (i *IDrac9) ServerSnapshot() (server interface{}, err error)

ServerSnapshot do best effort to populate the server data and returns a blade or discrete

func (*IDrac9) Status

func (i *IDrac9) Status() (status string, err error)

Status returns health string status from the bmc

func (*IDrac9) TempC

func (i *IDrac9) TempC() (temp int, err error)

TempC returns the current temperature of the machine

func (*IDrac9) UpdateCredentials

func (i *IDrac9) UpdateCredentials(username string, password string)

UpdateCredentials updates login credentials

func (*IDrac9) Vendor

func (i *IDrac9) Vendor() (vendor string)

Vendor returns bmc's vendor

Jump to

Keyboard shortcuts

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