devices

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: Apache-2.0 Imports: 1 Imported by: 7

Documentation

Index

Constants

View Source
const (

	// HP is the constant that defines the vendor HP
	HP = "HP"
	// Dell is the constant that defines the vendor Dell
	Dell = "Dell"
	// Supermicro is the constant that defines the vendor Supermicro
	Supermicro = "Supermicro"
	// Cloudline is the constant that defines the cloudlines
	Cloudline = "Cloudline"
	// Common is the constant of thinks we could use across multiple vendors
	Common = "Common"
	// Unknown is the constant that defines Unknowns vendors
	Unknown = "Unknown"

	// BladeHwType is the constant defining the blade hw type
	BladeHwType = "blade"
	// DiscreteHwType is the constant defining the Discrete hw type
	DiscreteHwType = "discrete"
	// ChassisHwType is the constant defining the chassis hw type
	ChassisHwType = "chassis"

	// IDrac8 is the constant for iDRAC8 bmc
	IDrac8 = "iDRAC8"
	// IDrac9 is the constant for iDRAC9 bmc
	IDrac9 = "iDRAC9"
	// Ilo2 is the constant for Ilo2 bmc
	Ilo2 = "iLO2"
	// Ilo3 is the constant for iLO3 bmc
	Ilo3 = "iLO3"
	// Ilo4 is the constant for iLO4 bmc
	Ilo4 = "iLO4"
	// Ilo5 is the constant for iLO5 bmc
	Ilo5 = "iLO5"
	//AtenSM is the constant for AtenSM bmc
	AtenSM = "AtenSM"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Blade

type Blade struct {
	Serial               string
	Name                 string
	BiosVersion          string
	BmcType              string
	BmcAddress           string
	BmcVersion           string
	BmcLicenceType       string
	BmcLicenceStatus     string
	Disks                []*Disk
	Nics                 []*Nic
	BladePosition        int
	Model                string
	PowerState           string
	TempC                int
	PowerKw              float64
	Status               string
	Vendor               string
	ChassisSerial        string
	Processor            string
	ProcessorCount       int
	ProcessorCoreCount   int
	ProcessorThreadCount int
	StorageBlade         StorageBlade
	Memory               int
	FlexAddressEnabled   bool
}

Blade contains all the blade information we will expose across different vendors

type Bmc

type Bmc interface {
	ApplyCfg(*cfgresources.ResourcesConfig) error
	BiosVersion() (string, error)
	BmcType() string
	BmcVersion() (string, error)
	CPU() (string, int, int, int, error)
	CheckCredentials() error
	Disks() ([]*Disk, error)
	IsBlade() (bool, error)
	License() (string, string, error)
	Close() error
	Memory() (int, error)
	Model() (string, error)
	Name() (string, error)
	Nics() ([]*Nic, error)
	PowerKw() (float64, error)
	PowerState() (string, error)
	Serial() (string, error)
	Status() (string, error)
	TempC() (int, error)
	Vendor() string
	ServerSnapshot() (interface{}, error)
	UpdateCredentials(string, string)
}

Bmc represents the requirement of items to be collected a server

type BmcChassis

type BmcChassis interface {
	ApplyCfg(*cfgresources.ResourcesConfig) error
	Blades() ([]*Blade, error)
	BmcType() string
	ChassisSnapshot() (*Chassis, error)
	CheckCredentials() error
	Close() error
	FindBladePosition(string) (int, error)
	FwVersion() (string, error)
	GetFirmwareVersion() (string, error)
	IsActive() bool
	IsOn() (bool, error)
	IsOnBlade(int) (bool, error)
	Model() (string, error)
	Name() (string, error)
	Nics() ([]*Nic, error)
	PassThru() (string, error)
	PowerCycle() (bool, error)
	PowerCycleBlade(int) (bool, error)
	PowerCycleBmcBlade(int) (bool, error)
	PowerKw() (float64, error)
	PowerOff() (bool, error)
	PowerOffBlade(int) (bool, error)
	PowerOn() (bool, error)
	PowerOnBlade(int) (bool, error)
	Psus() ([]*Psu, error)
	PxeOnceBlade(int) (bool, error)
	ReseatBlade(int) (bool, error)
	Serial() (string, error)
	SetDynamicPower(bool) (bool, error)
	SetIpmiOverLan(int, bool) (bool, error)
	SetFlexAddressState(int, bool) (bool, error)
	Status() (string, error)
	StorageBlades() ([]*StorageBlade, error)
	TempC() (int, error)
	UpdateCredentials(string, string)
	Vendor() string
}

BmcChassis represents the requirement of items to be collected from a chassis

type Chassis

type Chassis struct {
	Serial        string
	Name          string
	BmcAddress    string
	Blades        []*Blade
	StorageBlades []*StorageBlade
	Nics          []*Nic
	Psus          []*Psu
	TempC         int
	PassThru      string
	Status        string
	PowerKw       float64
	Model         string
	Vendor        string
	FwVersion     string
}

Chassis contains all the chassis the information we will expose across different vendors

type Discrete

type Discrete struct {
	Serial               string
	Name                 string
	BiosVersion          string
	BmcType              string
	BmcAddress           string
	BmcVersion           string
	BmcSSHReachable      bool
	BmcWEBReachable      bool
	BmcIpmiReachable     bool
	BmcLicenceType       string
	BmcLicenceStatus     string
	BmcAuth              bool
	Disks                []*Disk
	Nics                 []*Nic
	Psus                 []*Psu
	Model                string
	TempC                int
	PowerKw              float64
	PowerState           string
	Status               string
	Vendor               string
	Processor            string
	ProcessorCount       int
	ProcessorCoreCount   int
	ProcessorThreadCount int
	Memory               int
}

Discrete contains all the blade information we will expose across different vendors

type Disk

type Disk struct {
	Status    string
	Serial    string
	Type      string
	Size      string
	Model     string
	Location  string
	FwVersion string
}

Disk represents a disk device

type Nic

type Nic struct {
	MacAddress string
	Name       string
	Up         bool
	Speed      string
}

Nic represents a network interface devices

type Psu

type Psu struct {
	Serial     string
	CapacityKw float64
	PowerKw    float64
	Status     string
}

Psu represents a power supply device

type StorageBlade

type StorageBlade struct {
	Serial        string
	FwVersion     string
	BladePosition int
	Model         string
	TempC         int
	PowerKw       float64
	Status        string
	Vendor        string
	ChassisSerial string
	BladeSerial   string
}

StorageBlade contains all the storage blade information we will expose across different vendors

Jump to

Keyboard shortcuts

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