oem

package
v0.0.0-...-45ec842 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Addr

type Addr struct {
	Address string `json:"Address"`
}

Addr contains the IPv4 or IPv6 Address in string format

type Chassis

type Chassis struct {
	Links      ChassisLinks `json:"Links"`
	LinksLower ChassisLinks `json:"links"`
	PowerAlt   Link         `json:"Power"`
	ThermalAlt Link         `json:"Thermal"`
}

/redfish/v1/Chassis/XXXXX

type ChassisLinks struct {
	System  LinksWrapper `json:"ComputerSystems"`
	Storage LinksWrapper `json:"Storage"`
	Drives  LinksWrapper `json:"Drives"`
	Power   LinksWrapper `json:"PoweredBy"`
	Thermal LinksWrapper `json:"CooledBy"`
}

type ChassisStorageBattery

type ChassisStorageBattery struct {
	Oem OemSys `json:"Oem"`
}

type Collection

type Collection struct {
	Members []struct {
		URL string `json:"@odata.id"`
	} `json:"Members"`
	MembersCount int `json:"Members@odata.count"`
}

Collection returns an array of the endpoints from the chassis pertaining to a resource type

type DiskDriveMetrics

type DiskDriveMetrics struct {
	Id               string           `json:"Id"`
	CapacityMiB      int              `json:"CapacityMiB"`
	CapacityBytes    int              `json:"CapacityBytes"`
	Description      string           `json:"Description"`
	InterfaceType    string           `json:"InterfaceType"`
	Name             string           `json:"Name"`
	Model            string           `json:"Model"`
	Status           Status           `json:"Status"`
	LocationWrap     LocationWrapper  `json:"Location"`
	PhysicalLocation PhysicalLocation `json:"PhysicalLocation"`
	SerialNumber     string           `json:"SerialNumber"`
}

Disk Drives /redfish/v1/Systems/XXXXX/SmartStorage/ArrayControllers/X/DiskDrives/X/ /redfish/v1/Systems/XXXXX/Storage/XXXXX/Drives/PD-XX/

type Drive

type Drive struct {
	Url string `json:"@odata.id"`
}

type DriveProtocol

type DriveProtocol struct {
	Protocol string `json:"Protocol"`
}

type Error

type Error struct {
	Error ErrorBody `json:"error"`
}

type ErrorBody

type ErrorBody struct {
	Code         string         `json:"code"`
	Message      string         `json:"message"`
	ExtendedInfo []ExtendedInfo `json:"@Message.ExtendedInfo"`
}

type ExtendedInfo

type ExtendedInfo struct {
	OdataType  string   `json:"@odata.type"`
	MessageID  string   `json:"MessageId"`
	Message    string   `json:"Message"`
	MessageArg []string `json:"MessageArgs"`
	Severity   string   `json:"Severity"`
}

type Fan

type Fan struct {
	MemberID       interface{} `json:"MemberId"`
	Name           string      `json:"Name"`
	FanName        string      `json:"FanName"`
	Reading        interface{} `json:"Reading"`
	CurrentReading int         `json:"CurrentReading"`
	ReadingUnits   string      `json:"ReadingUnits"`
	Status         Status      `json:"Status"`
}

Fan is the json object for a fan module

type Firmware

type Firmware struct {
	Current FirmwareCurrent `json:"Current"`
}

Firmware is the top level json object for Network Adapter metadata

type FirmwareCurrent

type FirmwareCurrent struct {
	Version string `json:"VersionString"`
}

FirmwareCurrent contains the version in string format

type GenericDrive

type GenericDrive struct {
	Members      []Members  `json:"Members,omitempty"`
	LinksUpper   LinksUpper `json:"Links,omitempty"`
	LinksLower   LinksLower `json:"links,omitempty"`
	MembersCount int        `json:"Members@odata.count,omitempty"`
}

GenericDrive is used to iterate over differing drive endpoints /redfish/v1/Systems/X/SmartStorage/ArrayControllers/ for Logical and Physical Drives /redfish/v1/Chassis/X/Drives/ for NVMe Drive(s)

type HRef

type HRef struct {
	URL string `json:"href"`
}

type Hpe

type Hpe struct {
	AveragePowerOutputWatts int    `json:"AveragePowerOutputWatts"`
	BayNumber               int    `json:"BayNumber"`
	HotplugCapable          bool   `json:"HotplugCapable"`
	MaxPowerOutputWatts     int    `json:"MaxPowerOutputWatts"`
	Mismatched              bool   `json:"Mismatched"`
	PowerSupplyStatus       Status `json:"PowerSupplyStatus"`
	IPDUCapable             bool   `json:"iPDUCapable"`
}

Hpe contains metadata on power supply product info

type HpeCont

type HpeCont struct {
	CurrentTemperatureCelsius int    `json:"CurrentTemperatureCelsius"`
	DriveStatus               Status `json:"DriveStatus"`
	NVMeID                    string `json:"NVMeId"`
}

Contents of Hpe

type HpeSys

type HpeSys struct {
	Battery     []StorageBattery      `json:"Battery"`
	BatteryAlt  []SmartStorageBattery `json:"SmartStorageBattery"`
	IloSelfTest []IloSelfTest         `json:"iLOSelfTestResults"`
	Links       SystemLinksUpper      `json:"Links"`
	LinksLower  SystemLinksLower      `json:"links"`
}

type IloSelfTest

type IloSelfTest struct {
	Name   string `json:"SelfTestName"`
	Status string `json:"Status"`
	Notes  string `json:"Notes"`
}

type InputRange

type InputRange struct {
	InputType     string `json:"InputType,omitempty"`
	OutputWattage int    `json:"OutputWattage"`
}

InputRange is the top level json object for input voltage metadata

type Link struct {
	URL string `json:"@odata.id"`
}

type LinksLower

type LinksLower struct {
	Drives         []HRef `json:"Drives,omitempty"`
	LogicalDrives  HRef   `json:"LogicalDrives,omitempty"`
	PhysicalDrives HRef   `json:"PhysicalDrives,omitempty"`
}

type LinksURL

type LinksURL struct {
	LinksURLSlice []string
}

type LinksUpper

type LinksUpper struct {
	Drives         []Link `json:"Drives,omitempty"`
	LogicalDrives  Link   `json:"LogicalDrives,omitempty"`
	PhysicalDrives Link   `json:"PhysicalDrives,omitempty"`
}
type LinksWrapper struct {
	LinksURL
}

func (*LinksWrapper) UnmarshalJSON

func (w *LinksWrapper) UnmarshalJSON(data []byte) error

type LocationWrapper

type LocationWrapper struct {
	Location string
}

func (*LocationWrapper) UnmarshalJSON

func (w *LocationWrapper) UnmarshalJSON(data []byte) error

type LogicalDriveMetrics

type LogicalDriveMetrics struct {
	Id                     string `json:"Id"`
	CapacityMiB            int    `json:"CapacityMiB"`
	Description            string `json:"Description"`
	InterfaceType          string `json:"InterfaceType"`
	LogicalDriveName       string `json:"LogicalDriveName"`
	LogicalDriveNumber     int    `json:"LogicalDriveNumber"`
	Name                   string `json:"Name"`
	Raid                   string `json:"Raid"`
	Status                 Status `json:"Status"`
	StripeSizebytes        int    `json:"StripeSizebytes"`
	VolumeUniqueIdentifier string `json:"VolumeUniqueIdentifier"`
}

Logical Drives /redfish/v1/Systems/X/SmartStorage/ArrayControllers/X/LogicalDrives/X/

type Manager

type Manager struct {
	FirmwareVersion string `json:"FirmwareVersion"`
	LinksUpper      struct {
		ManagerForServers ServerManagerURLWrapper `json:"ManagerForServers"`
	} `json:"Links"`
	LinksLower struct {
		ManagerForServers ServerManagerURLWrapper `json:"ManagerForServers"`
	} `json:"links"`
	Model       string `json:"Model"`
	Description string `json:"Description"`
}

Chassis contains the Model Number, Firmware, etc of the chassis

type Members

type Members struct {
	URL string `json:"@odata.id"`
}

type MemoryMetrics

type MemoryMetrics struct {
	Name             string      `json:"Name"`
	CapacityMiB      interface{} `json:"CapacityMiB"`
	SizeMB           interface{} `json:"SizeMB"`
	Manufacturer     string      `json:"Manufacturer"`
	MemoryDeviceType string      `json:"MemoryDeviceType"`
	PartNumber       string      `json:"PartNumber"`
	Status           interface{} `json:"Status"`
	DIMMStatus       string      `json:"DIMMStatus"`
}

MemoryMetrics is the top level json object for a Memory DIMMs metadata

type MemorySummary

type MemorySummary struct {
	Status                         StatusMemory `json:"Status"`
	TotalSystemMemoryGiB           int          `json:"TotalSystemMemoryGiB"`
	TotalSystemPersistentMemoryGiB int          `json:"TotalSystemPersistentMemoryGiB"`
}

MemorySummary is the json object for MemorySummary metadata

type NVMeDriveMetrics

type NVMeDriveMetrics struct {
	ID               string           `json:"Id"`
	Model            string           `json:"Model"`
	Name             string           `json:"Name"`
	MediaType        string           `json:"MediaType"`
	Oem              Oem              `json:"Oem"`
	PhysicalLocation PhysicalLocation `json:"PhysicalLocation"`
	Protocol         string           `json:"Protocol"`
	Status           Status           `json:"Status"`
	FailurePredicted bool             `json:"FailurePredicted"`
	CapacityBytes    int              `json:"CapacityBytes"`
}

NVME's /redfish/v1/chassis/X/

type NetworkAdapter

type NetworkAdapter struct {
	ID             string          `json:"Id"`
	Firmware       Firmware        `json:"Firmware"`
	Name           string          `json:"Name"`
	PartNumber     string          `json:"PartNumber"`
	PhysicalPorts  []PhysicalPorts `json:"PhysicalPorts"`
	SerialNumber   string          `json:"SerialNumber"`
	StructuredName string          `json:"StructuredName"`
	Status         Status          `json:"Status"`
	UEFIDevicePath string          `json:"UEFIDevicePath"`
}

NetworkAdapter is the top level json object for Network Adapter metadata

type Oem

type Oem struct {
	Hpe HpeCont `json:"Hpe"`
}

Contents of Oem

type OemPower

type OemPower struct {
	Hpe Hpe `json:"Hpe,omitempty"`
	Hp  Hpe `json:"Hp,omitempty"`
}

OemPower is the top level json object for historical data for wattage

type OemSys

type OemSys struct {
	Hpe HpeSys `json:"Hpe,omitempty"`
	Hp  HpeSys `json:"Hp,omitempty"`
}

type PartLocation

type PartLocation struct {
	ServiceLabel string `json:"ServiceLabel"`
}

PartLocation is a variable that determines the Box and the Bay location of the NVMe drive

type PhysicalLocation

type PhysicalLocation struct {
	PartLocation PartLocation `json:"PartLocation"`
}

PhysicalLocation

type PhysicalPorts

type PhysicalPorts struct {
	FullDuplex    bool   `json:"FullDuplex"`
	IPv4Addresses []Addr `json:"IPv4Addresses"`
	IPv6Addresses []Addr `json:"IPv6Addresses"`
	LinkStatus    string `json:"LinkStatus"`
	MacAddress    string `json:"MacAddress"`
	Name          string `json:"Name"`
	SpeedMbps     int    `json:"SpeedMbps"`
	Status        Status `json:"Status"`
}

PhysicalPorts contains the metadata for the Chassis NICs

type PowerControl

type PowerControl struct {
	MemberID           string      `json:"MemberId"`
	PowerCapacityWatts int         `json:"PowerCapacityWatts,omitempty"`
	PowerConsumedWatts interface{} `json:"PowerConsumedWatts"`
	PowerMetrics       PowerMetric `json:"PowerMetrics"`
}

PowerControl is the top level json object for metadata on power supply consumption

type PowerControlSlice

type PowerControlSlice struct {
	PowerControl []PowerControl
}

type PowerControlWrapper

type PowerControlWrapper struct {
	PowerControlSlice
}

func (*PowerControlWrapper) UnmarshalJSON

func (w *PowerControlWrapper) UnmarshalJSON(data []byte) error

type PowerMetric

type PowerMetric struct {
	AverageConsumedWatts interface{} `json:"AverageConsumedWatts"`
	IntervalInMin        interface{} `json:"IntervalInMin,omitempty"`
	MaxConsumedWatts     interface{} `json:"MaxConsumedWatts"`
	MinConsumedWatts     interface{} `json:"MinConsumedWatts"`
}

PowerMetric contains avg/min/max power metadata

type PowerMetrics

type PowerMetrics struct {
	ID            string              `json:"Id"`
	Name          string              `json:"Name"`
	PowerControl  PowerControlWrapper `json:"PowerControl"`
	PowerSupplies []PowerSupply       `json:"PowerSupplies"`
	Voltages      []Voltages          `json:"Voltages,omitempty"`
	Url           string              `json:"@odata.id"`
}

PowerMetrics is the top level json object for Power metadata

type PowerSupply

type PowerSupply struct {
	FirmwareVersion      string       `json:"FirmwareVersion"`
	LastPowerOutputWatts interface{}  `json:"LastPowerOutputWatts"`
	LineInputVoltage     interface{}  `json:"LineInputVoltage"`
	LineInputVoltageType string       `json:"LineInputVoltageType,omitempty"`
	InputRanges          []InputRange `json:"InputRanges,omitempty"`
	Manufacturer         string       `json:"Manufacturer"`
	MemberID             interface{}  `json:"MemberId"`
	Model                string       `json:"Model"`
	Name                 string       `json:"Name"`
	Oem                  OemPower     `json:"Oem,omitempty"`
	PowerCapacityWatts   int          `json:"PowerCapacityWatts,omitempty"`
	PowerSupplyType      string       `json:"PowerSupplyType"`
	SerialNumber         string       `json:"SerialNumber"`
	SparePartNumber      string       `json:"SparePartNumber"`
	Status               Status       `json:"Status"`
}

PowerSupply is the top level json object for metadata on power supply product info

type ProcessorMetrics

type ProcessorMetrics struct {
	Id                    string      `json:"Id"`
	Name                  string      `json:"Name"`
	Description           string      `json:"Description"`
	Socket                string      `json:"Socket"`
	Status                Status      `json:"Status"`
	ProcessorArchitecture string      `json:"ProcessorArchitecture"`
	TotalThreads          interface{} `json:"TotalThreads"`
	TotalCores            interface{} `json:"TotalCores"`
	Model                 string      `json:"Model"`
}

ProcessorMetrics is the top level json object for Processor metadata

type ServerManagerURL

type ServerManagerURL struct {
	ServerManagerURLSlice []string
}

type ServerManagerURLWrapper

type ServerManagerURLWrapper struct {
	ServerManagerURL
}

func (*ServerManagerURLWrapper) UnmarshalJSON

func (w *ServerManagerURLWrapper) UnmarshalJSON(data []byte) error

type SmartStorageBattery

type SmartStorageBattery struct {
	Index  int    `json:"Index"`
	Model  string `json:"Model"`
	Status Status `json:"Status"`
	Name   string `json:"ProductName"`
}

type Status

type Status struct {
	Health       string `json:"Health,omitempty"`
	HealthRollup string `json:"HealthRollup,omitempty"`
	State        string `json:"State,omitempty"`
}

Status contains metadata for the health of a particular component/module

type StatusMemory

type StatusMemory struct {
	HealthRollup string `json:"HealthRollup"`
}

StatusMemory is the variable to determine if the memory is OK or not

type StorageBattery

type StorageBattery struct {
	Condition string `json:"Condition"`
	Index     int    `json:"Index"`
	Model     string `json:"Model"`
	Present   string `json:"Present"`
	Name      string `json:"ProductName"`
}

type StorageController

type StorageController struct {
	Status          Status `json:"Status"`
	MemberId        string `json:"MemberId"`
	Manufacturer    string `json:"Manufacturer,omitempty"`
	Model           string `json:"Model"`
	Name            string `json:"Name"`
	FirmwareVersion string `json:"FirmwareVersion"`
}

StorageController contains status metadata of the C220 chassis storage controller

type StorageControllerMetrics

type StorageControllerMetrics struct {
	Name              string                   `json:"Name"`
	StorageController StorageControllerWrapper `json:"StorageControllers"`
	Drives            []Drive                  `json:"Drives"`
}

type StorageControllerSlice

type StorageControllerSlice struct {
	StorageController []StorageController
}

type StorageControllerWrapper

type StorageControllerWrapper struct {
	StorageControllerSlice
}

func (*StorageControllerWrapper) UnmarshalJSON

func (w *StorageControllerWrapper) UnmarshalJSON(data []byte) error

type System

type System struct {
	BiosVersion    string        `json:"BiosVersion"`
	SerialNumber   string        `json:"SerialNumber"`
	SystemHostname string        `json:"HostName"`
	Oem            OemSys        `json:"Oem"`
	MemorySummary  MemorySummary `json:"MemorySummary"`
}

ServerManager contains the BIOS version and Serial number of the chassis, we will also collect memory summary and storage battery metrics if present

type SystemLinksLower

type SystemLinksLower struct {
	SmartStorage HRef `json:"SmartStorage"`
}

type SystemLinksUpper

type SystemLinksUpper struct {
	SmartStorage Link `json:"SmartStorage"`
}

type Temperature

type Temperature struct {
	MemberID               interface{} `json:"MemberId"`
	Name                   string      `json:"Name"`
	PhysicalContext        string      `json:"PhysicalContext"`
	ReadingCelsius         interface{} `json:"ReadingCelsius"`
	SensorNumber           int         `json:"SensorNumber"`
	Status                 Status      `json:"Status"`
	UpperThresholdCritical interface{} `json:"UpperThresholdCritical"`
	UpperThresholdFatal    int         `json:"UpperThresholdFatal"`
}

Temperature is the json object for a temperature sensor module

type ThermalMetrics

type ThermalMetrics struct {
	ID           string        `json:"Id"`
	Fans         []Fan         `json:"Fans"`
	Name         string        `json:"Name"`
	Status       Status        `json:"Status,omitempty"`
	Temperatures []Temperature `json:"Temperatures"`
	Url          string        `json:"@odata.id"`
}

ThermalMetrics is the top level json object for Thermal metadata

type Voltages

type Voltages struct {
	Name                   string      `json:"Name"`
	ReadingVolts           interface{} `json:"ReadingVolts"`
	Status                 Status      `json:"Status"`
	UpperThresholdCritical interface{} `json:"UpperThresholdCritical"`
}

Voltages contains current/lower/upper voltage and power supply status metadata

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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