api

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: AGPL-3.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VagrantBoard = &Board{
		VM:           true,
		VendorString: "vagrant",
		Vendor:       VendorVagrant,
		Model:        "vagrant",
		PartNumber:   "vagrant",
		SerialNumber: "vagrant",
		BiosVersion:  "0",
		BMC: &BMC{
			IP:                  "1.1.1.1",
			MAC:                 "aa:bb:cc:dd:ee:ff",
			ChassisPartNumber:   "vagrant",
			ChassisPartSerial:   "vagrant",
			BoardMfg:            "vagrant",
			BoardMfgSerial:      "vagrant",
			BoardPartNumber:     "vagrant",
			ProductManufacturer: "vagrant",
			ProductPartNumber:   "vagrant",
			ProductSerial:       "vagrant",
			FirmwareRevision:    "vagrant",
		},
		BIOS: &BIOS{
			Version: "0",
			Vendor:  "vagrant",
			Date:    "01/01/2020",
		},
		Firmware: 0,
	}
)

Functions

This section is empty.

Types

type BIOS

type BIOS struct {
	Version string
	Vendor  string
	Date    string
}

BIOS information of this machine

func (*BIOS) String

func (b *BIOS) String() string

type BMC

type BMC struct {
	IP                  string
	MAC                 string
	ChassisPartNumber   string
	ChassisPartSerial   string
	BoardMfg            string
	BoardMfgSerial      string
	BoardPartNumber     string
	ProductManufacturer string
	ProductPartNumber   string
	ProductSerial       string
	FirmwareRevision    string `ipmitool:"Firmware Revision"`
}

BMC Base Management Controller details

type Board

type Board struct {
	VM           bool
	VendorString string
	Vendor       Vendor
	Model        string
	PartNumber   string
	SerialNumber string
	BiosVersion  string
	BMC          *BMC
	BIOS         *BIOS
	Firmware     kernel.FirmwareMode
}

Board raw dmi board information

func (*Board) String

func (b *Board) String() string

type IpmiPrivilege added in v0.1.2

type IpmiPrivilege = uint8

Privilege of an IPMI user

const (
	// Callback IPMI privilege
	CallbackPrivilege IpmiPrivilege = iota + 1
	// User IPMI privilege
	UserPrivilege
	// Operator IPMI privilege
	OperatorPrivilege
	// Administrator IPMI privilege
	AdministratorPrivilege
	// OEM IPMI privilege
	OEMPrivilege
	// NoAccess IPMI privilege
	NoAccessPrivilege
)

type Vendor

type Vendor int

Vendor identifies different server vendors

const (
	// VendorUnknown is a unknown Vendor
	VendorUnknown Vendor = iota
	// VendorSupermicro identifies all Supermicro servers
	VendorSupermicro
	// VendorLenovo identifies all Lenovo servers
	VendorLenovo
	// VendorDell identifies all Dell servers
	VendorDell
	// VendorVagrant is a virtual machine.
	VendorVagrant
)

func GuessVendor

func GuessVendor(vendor string) Vendor

GuessVendor will try to guess from vendor string

func (Vendor) String

func (v Vendor) String() string

Jump to

Keyboard shortcuts

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