hp

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

Documentation

Index

Constants

View Source
const (
	// VendorID represents the id of the vendor across all packages
	VendorID              = devices.HP
	ChassisInfoOldURL     = "json/chassis_info"
	ChassisInfoNewURL     = "redfish/v1/Chassis/1"
	ChassisInfoChassisURL = "redfish/v1/Chassis/EnclosureChassis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bay

type Bay struct {
	Connection int `xml:"CONNECTION,omitempty"`
}

Bay contains the position of the blade within the chassis

type Blade

type Blade struct {
	Bay             *Bay   `xml:"BAY,omitempty"`
	Bsn             string `xml:"BSN,omitempty"`
	MgmtIPAddr      string `xml:"MGMTIPADDR,omitempty"`
	MgmtType        string `xml:"MGMTPN,omitempty"`
	MgmtVersion     string `xml:"MGMTFWVERSION,omitempty"`
	Name            string `xml:"NAME,omitempty"`
	Type            string `xml:"TYPE,omitempty"`
	Power           *Power `xml:"POWER,omitempty"`
	Status          string `xml:"STATUS,omitempty"`
	Spn             string `xml:"SPN,omitempty"`
	Temp            *Temp  `xml:"TEMPS>TEMP,omitempty"`
	BladeRomVer     string `xml:"BLADEROMVER,omitempty"`
	AssociatedBlade int    `xml:"ASSOCIATEDBLADE,omitempty"`
}

Blade contains the unmarshalled data from the hp chassis

type BladeSystem

type BladeSystem struct {
	Bay     int      `xml:"BAY,omitempty"`
	Manager *Manager `xml:"MANAGER,omitempty"`
}

BladeSystem blade information from the hprimp of blades

type ChassisInfo added in v0.3.1

type ChassisInfo struct {
	// Old URL
	NodeNumber   int    `json:"node_number"`
	ChassisSn    string `json:"chassis_sn"`
	ChassisPower int    `json:"chassis_power"`

	// New URL
	SerialNumber string `json:"SerialNumber"`
	ChassisType  string `json:"ChassisType"`
	Oem          struct {
		Hpe struct {
			BayNumber int
		}
	} `json:"Oem"`
	Error struct {
		Code            string `json:"code"`
		Message         string `json:"message"`
		ExtendedMessage []*struct {
			MessageId string `json:"MessageId"`
		} `json:"@Message.ExtendedInfo"`
	} `json:"error"`
	Links struct {
		ContainedBy struct {
			ID string `json:"@odata.id"`
		}
	}
}

ChassisInfo is the struct used to render the data from https://$ip/json/chassis_info, it contains the chassis data

type ChassisPower

type ChassisPower struct {
	PowerConsumed  float64        `xml:"POWER_CONSUMED,omitempty"`
	Powersupply    []*Powersupply `xml:"POWERSUPPLY,omitempty"`
	Redundancy     string         `xml:"REDUNDANCY,omitempty"`
	RedundancyMode string         `xml:"REDUNDANCYMODE,omitempty"`
}

ChassisPower contains the power information of the chassis

type Fan added in v0.2.4

type Fan struct {
	Bay        *Bay   `xml:"BAY,omitempty"`
	PN         string `xml:"PN,omitempty"`
	ProducName string `xml:"PRODUCTNAME,omitempty"`
	PowerUsed  int64  `xml:"PWR_USED,omitempty"`
	RpmCUR     int64  `xml:"RPM_CUR,omitempty"`
	RpmMAX     int64  `xml:"RPM_MAX,omitempty"`
	RpmMIN     int64  `xml:"RPM_MIN,omitempty"`
	Status     string `xml:"STATUS,omitempty"`
}

Fan contains individual information of each fan

type Firmware

type Firmware struct {
	Firmware []struct {
		FwName    string `json:"fw_name"`
		FwVersion string `json:"fw_version"`
	} `json:"firmware"`
}

Firmware is the struct used to render the data from https://$ip/json/fw_info, it contains firmware data of the blade

type HSI

type HSI struct {
	NICS []*NIC `xml:"NICS>NIC,omitempty"`
	Sbsn string `xml:"SBSN,omitempty"`
	Spn  string `xml:"SPN,omitempty"`
}

HSI contains the information about the components of the blade

type HealthTemperature

type HealthTemperature struct {
	HostpwrState string         `json:"hostpwr_state"`
	InPost       int            `json:"in_post"`
	Temperature  []*Temperature `json:"temperature"`
}

HealthTemperature is the struct used to render the data from https://$ip/json/health_temperature, it contains the information about the thermal status of the machine

type Hp added in v0.3.6

type Hp struct{}

type IloDisks

type IloDisks struct {
	PhyDriveArrays []struct {
		PhysicalDrives []struct {
			Name           string `json:"name"`
			Status         string `json:"status"`
			SerialNo       string `json:"serial_no"`
			Model          string `json:"model"`
			Capacity       string `json:"capacity"`
			Location       string `json:"location"`
			FwVersion      string `json:"fw_version"`
			PhysStatus     string `json:"phys_status"`
			DriveType      string `json:"drive_type"`
			EncrStat       string `json:"encr_stat"`
			PhysIdx        int    `json:"phys_idx"`
			DriveMediatype string `json:"drive_mediatype"`
		} `json:"physical_drives"`
	} `json:"phy_drive_arrays"`
}

IloDisks is the struct used to render the data from https://$ip/json/health_phy_drives, it contains the list of disks and their current health state

type IloLicense

type IloLicense struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

IloLicense is the struct used to render the data from https://$ip/json/license, it contains the license information of the ilo

type IloPowerSupply

type IloPowerSupply struct {
	Supplies []struct {
		Unhealthy        int    `json:"unhealthy"`
		Enabled          int    `json:"enabled"`
		Mismatch         int    `json:"mismatch"`
		PsBay            int    `json:"ps_bay"`
		PsPresent        string `json:"ps_present"`
		PsCondition      string `json:"ps_condition"`
		PsErrorCode      string `json:"ps_error_code"`
		PsIpduCapable    string `json:"ps_ipdu_capable"`
		PsHotplugCapable string `json:"ps_hotplug_capable"`
		PsModel          string `json:"ps_model"`
		PsSpare          string `json:"ps_spare"`
		PsSerialNum      string `json:"ps_serial_num"`
		PsMaxCapWatts    int    `json:"ps_max_cap_watts"`
		PsFwVer          string `json:"ps_fw_ver"`
		PsInputVolts     int    `json:"ps_input_volts"`
		PsOutputWatts    int    `json:"ps_output_watts"`
		Avg              int    `json:"avg"`
		Max              int    `json:"max"`
		Supply           bool   `json:"supply"`
		Bbu              bool   `json:"bbu"`
		Charge           int    `json:"charge"`
		Age              int    `json:"age"`
		BatteryHealth    int    `json:"battery_health"`
	} `json:"supplies"`
	PresentPowerReading int `json:"present_power_reading"`
}

IloPowerSupply holds the information of power supplies exposed via ilo

type Infra2

type Infra2 struct {
	Addr         string        `xml:"ADDR,omitempty"`
	Blades       []*Blade      `xml:"BLADES>BLADE,omitempty"`
	Switches     []*Switch     `xml:"SWITCHES>SWITCH,omitempty"`
	ChassisPower *ChassisPower `xml:"POWER,omitempty"`
	Status       string        `xml:"STATUS,omitempty"`
	Temp         *Temp         `xml:"TEMPS>TEMP,omitempty"`
	EnclSn       string        `xml:"ENCL_SN,omitempty"`
	Fans         []*Fan        `xml:"FANS>FAN,omitempty"`
	Pn           string        `xml:"PN,omitempty"`
	Encl         string        `xml:"ENCL,omitempty"`
	Rack         string        `xml:"RACK,omitempty"`
	Managers     []*Manager    `xml:"MANAGERS>MANAGER,omitempty"`
}

Infra2 is the data retrieved from the chassis xml interface that contains all components

type MP

type MP struct {
	Pn   string `xml:"PN,omitempty"`
	Sn   string `xml:"SN,omitempty"`
	Fwri string `xml:"FWRI,omitempty"`
}

MP contains the firmware version and the model of the chassis or blade

type Manager

type Manager struct {
	MgmtIPAddr string `xml:"MGMTIPADDR,omitempty"`
	Role       string `xml:"ROLE,omitempty"`
	MacAddr    string `xml:"MACADDR,omitempty"`
	Status     string `xml:"STATUS,omitempty"`
	Name       string `xml:"NAME,omitempty"`
}

Manager hold the information of the manager board of the chassis

type Mem

type Mem struct {
	MemTotalMemSize int        `json:"mem_total_mem_size"`
	Memory          []*MemSlot `json:"memory"`
}

Mem is the struct used to render the data from https://$ip/json/mem_info, it contains the ram data

type MemSlot

type MemSlot struct {
	MemDevLoc string `json:"mem_dev_loc"`
	MemSize   int    `json:"mem_size"`
	MemSpeed  int    `json:"mem_speed"`
}

MemSlot is part of the payload returned from https://$ip/json/mem_info

type NIC

type NIC struct {
	Description string `xml:"DESCRIPTION,omitempty"`
	MacAddr     string `xml:"MACADDR,omitempty"`
	Status      string `xml:"STATUS,omitempty"`
}

NIC contains the nic information of a blade

type Overview

type Overview struct {
	ServerName    string `json:"server_name"`
	ProductName   string `json:"product_name"`
	SerialNum     string `json:"serial_num"`
	SystemRom     string `json:"system_rom"`
	SystemRomDate string `json:"system_rom_date"`
	BackupRomDate string `json:"backup_rom_date"`
	License       string `json:"license"`
	IloFwVersion  string `json:"ilo_fw_version"`
	IPAddress     string `json:"ip_address"`
	SystemHealth  string `json:"system_health"`
	Power         string `json:"power"`
}

Overview is the struct used to render the data from https://$ip/json/overview, it contains information about bios version, ilo license and a bit more

type Power

type Power struct {
	PowerConsumed float64 `xml:"POWER_CONSUMED,omitempty"`
	PowerState    string  `xml:"POWERSTATE,omitempty"`
}

Power contains the power information of a blade

type PowerSummary

type PowerSummary struct {
	HostpwrState          string `json:"hostpwr_state"`
	PowerSupplyInputPower int    `json:"power_supply_input_power"`
}

PowerSummary is the struct used to render the data from https://$ip/json/power_summary, it contains the basic information about the power usage of the machine

type Powersupply

type Powersupply struct {
	Bay          *Bay    `xml:"BAY,omitempty"`
	Sn           string  `xml:"SN,omitempty"`
	Pn           string  `xml:"PN,omitempty"`
	Status       string  `xml:"STATUS,omitempty"`
	Capacity     float64 `xml:"CAPACITY,omitempty"`
	ActualOutput float64 `xml:"ACTUALOUTPUT,omitempty"`
}

Powersupply contains the data of the power supply of the chassis

type Procs

type Procs struct {
	Processors []struct {
		ProcName       string `json:"proc_name"`
		ProcNumCores   int    `json:"proc_num_cores"`
		ProcNumThreads int    `json:"proc_num_threads"`
	} `json:"processors"`
}

Procs is the struct used to render the data from https://$ip/json/proc_info, it contains the processor data

type RckInfo added in v0.2.9

type RckInfo struct {
	IPAddr     string        `json:"ip_addr"`
	MacAddr    string        `json:"mac_addr"`
	SysHealth  string        `json:"sys_health"`
	SrvLoc     string        `json:"srv_loc"`
	BayNum     int           `json:"bay_num"`
	EncName    string        `json:"enc_name"`
	EncUID     string        `json:"enc_uid"`
	EncUUID    string        `json:"enc_uuid"`
	EncSn      string        `json:"enc_sn"`
	RckName    string        `json:"rck_name"`
	StaticIpv6 []interface{} `json:"static_ipv6"`
	StaticCnt  int           `json:"static_cnt"`
	SlaacIpv6  []struct {
		Ipv6Address string `json:"ipv6_address"`
	} `json:"slaac_ipv6"`
	SlaacCnt   int           `json:"slaac_cnt"`
	Dhcpv6Ipv6 []interface{} `json:"dhcpv6_ipv6"`
	Dhcpv6Cnt  int           `json:"dhcpv6_cnt"`
}

RckInfo is the struct used to render the data from https://$ip/json/rck_info, it contains the chassis data

type Rimp

type Rimp struct {
	Infra2 *Infra2 `xml:"INFRA2,omitempty"`
	MP     *MP     `xml:"MP,omitempty"`
}

Rimp is the entry data structure for the chassis

type RimpBlade

type RimpBlade struct {
	MP          *MP          `xml:"MP,omitempty"`
	HSI         *HSI         `xml:"HSI,omitempty"`
	BladeSystem *BladeSystem `xml:"BLADESYSTEM,omitempty"`
}

RimpBlade is the entry data structure for the blade when queries directly

type Switch

type Switch struct {
	Spn string `xml:"SPN,omitempty"`
}

Switch contains the type of the switch

type Temp

type Temp struct {
	C    int    `xml:"C,omitempty" json:"C,omitempty"`
	Desc string `xml:"DESC,omitempty"`
}

Temp contains the thermal data of a chassis or blade

type Temperature

type Temperature struct {
	Label          string `json:"label"`
	Location       string `json:"location"`
	Status         string `json:"status"`
	Currentreading int    `json:"currentreading"`
	TempUnit       string `json:"temp_unit"`
}

Temperature is part of the data rendered from https://$ip/json/health_temperature, it contains the names of each component and their current temp

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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