idrac8

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: 23 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

This section is empty.

Types

type IDrac8

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

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

func New

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

New returns a new IDrac8 ready to be used

func (*IDrac8) ApplyCfg

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

func (*IDrac8) BiosVersion

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

BiosVersion returns the current version of the bios

func (*IDrac8) BmcType

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

BmcType returns the type of bmc we are talking to

func (*IDrac8) BmcVersion

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

BmcVersion returns the version of the bmc we are running

func (*IDrac8) CPU

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

CPU return the cpu, cores and hyperthreads the server

func (*IDrac8) CheckCredentials added in v0.1.5

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

CheckCredentials verify whether the credentials are valid or not

func (*IDrac8) Close added in v0.1.5

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

Close closes the connection properly

func (*IDrac8) Disks

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

Disks returns a list of disks installed on the device

func (*IDrac8) IsBlade

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

IsBlade returns if the current hardware is a blade or not

func (*IDrac8) IsOn added in v0.1.5

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

IsOn tells if a machine is currently powered on

func (*IDrac8) License

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

License returns the bmc license information

func (*IDrac8) Memory

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

Memory return the total amount of memory of the server

func (*IDrac8) Model

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

Model returns the device model

func (*IDrac8) Name

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

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

func (*IDrac8) Nics

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

Nics returns all found Nics in the device

func (*IDrac8) PowerCycle added in v0.1.5

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

PowerCycle reboots the machine via bmc

func (*IDrac8) PowerCycleBmc added in v0.1.5

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

PowerCycleBmc reboots the bmc we are connected to

func (*IDrac8) PowerKw

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

PowerKw returns the current power usage in Kw

func (*IDrac8) PowerOff added in v0.1.5

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

PowerOff power off the machine via bmc

func (*IDrac8) PowerOn added in v0.1.5

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

PowerOn power on the machine via bmc

func (*IDrac8) PowerState

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

PowerState returns the current power state of the machine

func (*IDrac8) Psus

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

Psus returns a list of psus installed on the device

func (*IDrac8) PxeOnce added in v0.1.5

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

PxeOnce makes the machine to boot via pxe once

func (*IDrac8) Serial

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

Serial returns the device serial

func (*IDrac8) ServerSnapshot

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

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

func (*IDrac8) Status

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

Status returns health string status from the bmc

func (*IDrac8) TempC

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

TempC returns the current temperature of the machine

func (*IDrac8) UpdateCredentials

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

UpdateCredentials updates login credentials

func (*IDrac8) Vendor

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

Vendor returns bmc's vendor

type NtpServer

type NtpServer struct {
	Enable  bool   `url:"tm_ntp_int_opmode,int"`
	Server1 string `url:"tm_ntp_str_server1"`
	Server2 string `url:"tm_ntp_str_server2"`
	Server3 string `url:"tm_ntp_str_server3"`
}

GET - params as query string ntp servers https://10.193.251.10/data?set=tm_ntp_int_opmode:1,tm_ntp_str_server1:ntp0.lhr4.example.com,tm_ntp_str_server2:ntp0.ams4.example.com,tm_ntp_str_server3:ntp0.fra4.example.com

type Syslog

type Syslog struct {
	Port    string `json:"Port"`
	Enable  string `json:"SysLogEnable"`
	Server1 string `json:"Server1"`
	Server2 string `json:"Server2"`
	Server3 string `json:"Server3"`
}

type User

type User struct {
	UserName         string `json:"UserName"`
	Password         string `json:"Password"`
	Enable           string `json:"Enable"`
	Privilege        string `json:"Privilege"`
	IpmiLanPrivilege string `json:"IpmiLanPrivilege"`
	SolEnable        string `json:"SolEnable"`
}

https://10.193.251.5/sysmgmt/2012/server/configgroup/iDRAC.Users.3 {"iDRAC.Users":{"UserName":"@066@06f@06f@062@061@072", "Password":"@066@06f@06f@062@061@072", "Enable":"Enabled", "Privilege":"511", "IpmiLanPrivilege":"Administrator", "SolEnable":"Enabled"}}

Jump to

Keyboard shortcuts

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