rf

package
v1.58.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2023 License: MIT Imports: 20 Imported by: 4

README

HMS Go Redfish Library
-------------------------------------------------------------------------
This library is intended for L1 discovery, i.e. almost entirely 
Redfish-based with no L2 dependencies.  One L2-like concept is xnames
but we do not use L2 services to discover these and they rely on
config files provided by the user.  While these are intended to be
location based, it is simply a stand-in for the hostname provided at
boot time.

This library should be sufficient to both support a basic bootmanager
daemon, a la our L1 functionality demo, but is also intended to provide
the starting point for L2 discovery and support of State Manager.

TODO: Determine the level of separation that is required here.

Overview:
=============
A config file, which may or may not be populated by SSDP discovery
provides the raw Redfish endpoints and user/pass credentials.  

From there, we build a structure for each endpoint and contact the
RF endpoint, building a set of inter-related structures for each of
the crucial component types: Managers, ComputerSystems, Chassis, and
Ethernet interfaces (ComputerSystem subcomponents TBD).  We also create
structures for each of the various services.

Because Redfish is a hypermedia representation of the system, i.e. it is
not a hierarchical tree, the RFEndpoint structure serves as the "hub" of
the discovered data.  Each structure has a backpointer to the RFEndpoint,
and the RFEndpoint stores a map of pointers for each component type, keyed
by the Redfish odata.ids, so that structs of different types can reference
each other.

At this point the only option is to collect all this information in a
single go.  This may be fine for an initial discovery, but in the future
we may want to re-query certain dynamic information, or even rediscover
system components that may have changed.

For a single BMC, the major system components should remain fixed, but
a nested system that may have swapable components may require careful
consideration.  When traversing links between component types, we shouldn't
in theory, have changes occur that cause us to "fall off the edge".

In any case, certain structures are always to be considered dynamic, in
the sense they are not fixed in number and can change unexpectedly.

- Event subscriptions
- Accounts/Roles
- Tasks

For these, only the containing structures (e.g. the EventService) will be
captured "permanently" during discovery, the individual member objects will
need to be queried via a separate proces. 


Outstanding issues and TODO:
==================================
- Connections to RF endpoints do no consider certificates at all, or try to
  verify or otherwise manage them.
  
- Connections to RF endpoints do not use sessions.  At this point, this
  isn't required.
  
- Discovery is parallel for all RF endpoints, but all interactions with
  individual endpoints are serialized.  The discovery process still takes
  under a minute, which isn't terrible, but faster would be better.  It's
  not clear how much faster multiple connections to BMCs would be, though.

- Number of simultaneous connections is capped so as to not exceed maximum
  open file counts, but doesn't have any smarts at the moment and uses a
  conservative number.  

- Logging is very primitive with a fixed option to use stderr

- Verbose and debug output blasts a ton of information that should be
  tuned to be more useful.

- Would like to be able to refresh data in a smart way and not just start
  discovery over.

- I added the "close" parameter to the client options to avoid getting a
  bunch of junk on stderr and a "read unexpected data from client" error
  on the next get.  This reduces the throughput so Dave might have a better
  way of doing this.

- When the Redfish endpoint does not supply a key, the corresponding
  key value in the struct will be "", for number values, however, it will
  be zero, which is a bigger problem.  Use json.Number or use pointer
  arguments instead.  Even for strings, we can then tell whether the RF
  endpoint gave us a blank value (supports value, but doesn't have one)
  or just omitted the key entirely (probably doesn't support that property.
  Is this worth all the nil checks?  Or does Go avoid a lot of the problems
  with nil strings?
  
- How to handle OEM fields.  I've just been skipping them, since obviously
  they will vary from component to component.  We may be able to decode
  them as interface{}, which can then be turned into a string map.  Or maybe
  just json.RawMessage is more flexible.  

- BIOS "Attributes" seem to have a similar issue.  They are an array of 
  "Name":"Value" pairs, but I don't think we can just pre-define them
  all.  They are not in the Redfish BIOS schema as specific parameters  And
  the values can be numbers, strings, bools, etc.

Futher features TBD:
=========================
- Support activities: Event subscriptions, account and role creation, 
  network configuration, etc.?

Documentation

Overview

MIT License

(C) Copyright [2019-2021] Hewlett Packard Enterprise Development LP

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

(C) Copyright [2019-2021] Hewlett Packard Enterprise Development LP

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

MIT License

(C) Copyright [2019-2021] Hewlett Packard Enterprise Development LP

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

View Source
const (
	POWER_STATE_ON           = "On"
	POWER_STATE_OFF          = "Off"
	POWER_STATE_POWERING_ON  = "PoweringOn"
	POWER_STATE_POWERING_OFF = "PoweringOff"
)

Allowable values for "PowerState" fields.

View Source
const (
	DiscoveryStarted        = "DiscoveryStarted"
	EndpointInvalid         = "EndpointInvalid"
	EPResponseFailedDecode  = "EPResponseFailedDecode"
	HTTPsGetFailed          = "HTTPsGetFailed"
	HTTPsGetOk              = "HTTPsGetOk"
	NoEthIfacesFound        = "NoEthIfacesFound"
	NotYetQueried           = "NotYetQueried"
	VerifyingData           = "VerifyingData"
	VerificationFailed      = "VerificationFailed"
	ChildVerificationFailed = "ChildVerificationFailed"

	RedfishSubtypeNoSupport  = "RedfishSubtypeNoSupport"
	EndpointTypeNotSupported = "EndpointTypeNotSupported"
	EndpointNotEnabled       = "EndpointNotEnabled"
	DiscoverOK               = "DiscoverOK"

	StoreFailed             = "StoreFailed"
	UnexpectedErrorPreStore = "UnexpectedErrorPreStore"
)

Error codes for problems obtaining data from remote RF endpoints.

View Source
const (
	ServiceRootType       = "ServiceRoot"
	ChassisType           = "Chassis"
	ComputerSystemType    = "ComputerSystem"
	EthernetInterfaceType = "EthernetInterface"
	ManagerType           = "Manager"
	MemoryType            = "Memory"
	ProcessorType         = "Processor"
	DriveType             = "Drive"
	StorageGroupType      = "StorageGroup"
	PowerSupplyType       = "PowerSupply"
	PowerType             = "Power"
	NodeAccelRiserType    = "GPUSubsystem"
	AssemblyType          = "Assembly"
	HpeDeviceType         = "HpeDevice"
	OutletType            = "Outlet"
	PDUType               = "PowerDistribution"
	NetworkAdapterType    = "NetworkAdapter"
	AccountServiceType    = "AccountService"
	EventServiceType      = "EventService"
	LogServiceType        = "LogService"
	SessionServiceType    = "SessionService"
	TaskServiceType       = "TaskService"
	UpdateServiceType     = "UpdateService"
)

These are types of structures in rfendpoints that are built upon the underlying Redfish type of the same name.

View Source
const (
	RFSubtypeRack       = "Rack"
	RFSubtypeBlade      = "Blade"
	RFSubtypeEnclosure  = "Enclosure"
	RFSubtypeStandAlone = "StandAlone"
	RFSubtypeRackMount  = "RackMount"
	RFSubtypeCard       = "Card"
	RFSubtypeCartridge  = "Cartridge"
	RFSubtypeRow        = "Row"
	RFSubtypePod        = "Pod"
	RFSubtypeExpansion  = "Expansion"
	RFSubtypeSidecar    = "Sidecar"
	RFSubtypeZone       = "Zone"
	RFSubtypeSled       = "Sled"
	RFSubtypeShelf      = "Shelf"
	RFSubtypeDrawer     = "Drawer"
	RFSubtypeModule     = "Module"
	RFSubtypeComponent  = "Component"
	RFSubtypeOther      = "Other"

	RFSubtypePhysical              = "Physical"
	RFSubtypeVirtual               = "Virtual"
	RFSubtypeOS                    = "OS"
	RFSubtypePhysicallyPartitioned = "PhysicallyPartitioned"
	RFSubtypeVirtuallyPartitioned  = "VirtuallyPartitioned"

	RFSubtypeManagementController = "ManagementController"
	RFSubtypeEnclosureManager     = "EnclosureManager"
	RFSubtypeBMC                  = "BMC"
	RFSubtypeRackManager          = "RackManager"
	RFSubtypeAuxiliaryController  = "AuxiliaryController"

	// PDU Types
	RFSubtypeRackPDU                 = "RackPDU"
	RFSubtypeFloorPDU                = "FloorPDU"
	RFSubtypeManualTransferSwitch    = "ManualTransferSwitch"
	RFSubtypeAutomaticTransferSwitch = "AutomaticTransferSwitch"

	// Outlet types
	RFSubtypeOutNEMA_5_15R       = "NEMA_5_15R"
	RFSubtypeOutNEMA_5_20R       = "NEMA_5_20R"
	RFSubtypeOutNEMA_L5_20R      = "NEMA_L5_20R"
	RFSubtypeOutNEMA_L5_30R      = "NEMA_L5_30R"
	RFSubtypeOutNEMA_L6_20R      = "NEMA_L6_20R"
	RFSubtypeOutNEMA_L6_30R      = "NEMA_L6_30R"
	RFSubtypeOutC13              = "C13"
	RFSubtypeOutC15              = "C15"
	RFSubtypeOutC19              = "C19"
	RFSubtypeOutCEE_7_Type_E     = "CEE_7_Type_E"
	RFSubtypeOutCEE_7_Type_F     = "CEE_7_Type_F"
	RFSubtypeOutSEV_1011_TYPE_12 = "SEV_1011_TYPE_12"
	RFSubtypeOutSEV_1011_TYPE_23 = "SEV_1011_TYPE_23"
	RFSubtypeOutBS_1363_Type_G   = "BS_1363_Type_G"

	RFSubtypeUnknown = "Unknown" // Not found/error
)

Redfish object subtypes, i.e. {type-name}Type, For example, ChassisType, ManagerType, etc.

View Source
const (
	EnabledDefault        = true
	UseSSDPDefault        = false
	MACRequiredDefault    = false
	RediscOnUpdateDefault = false
)

Defaults for RedfishEndpoint properties

View Source
const (
	CrayMfr     = "Cray"
	IntelMfr    = "Intel"
	DellMfr     = "Dell"
	GigabyteMfr = "Gigabyte"
)

Parsing manufacturer string

View Source
const MaxFanout int = 1000
View Source
const PKG_VERSION = "0.2"

Variables

View Source
var ErrRFDiscFQDNMissing = errors.New("FQDN unexpectedly empty string")
View Source
var ErrRFDiscILOLicenseReq = errors.New("iLO License Required")
View Source
var ErrRFDiscURLNotFound = errors.New("URL request returned 404: Not Found")

Functions

func EnableGenTestingPayloads

func EnableGenTestingPayloads(ep_id_and_title string) error

Turn on dumping of http output with path info, formatted for http mock responses. format is ep_id:ep_title. ep_id is the single endpoint to dump and ep_title(optional) is to be used in variable names to make them unique. If ep_title is not included, the ep_id will be used.

NOTE: Not tread safe. Set once per process before invoking client commands.

func EventRecordMsgId

func EventRecordMsgId(erec *EventRecord) (registry, version, msgid string)

Parse the MessageId field of an eventRecord within an event.

If erec.MessageId: "Registry.1.0.MessageId" (or 1.0.0), Return: 'registry'="Registry", 'version'="1.0", and 'msgid'="MessageId".

If only two fields, 'version' will be "", if only one, 'registry' will be empty as well and it will be returned as 'msgid'.

func GenTestingPayloads

func GenTestingPayloads(f *os.File, name, path string, payload []byte) error

This dumps a particular endpoint in such a way that it can be used as a mock remote endpoint in unit tests. There should be one per type of endpoint (HMS type, manufacturer, base model, major firmware version/vendor etc.). Whenever interesting differences present themselves, basically.

Output is to a file. Note that '>' is used to filter case statement entries so that they can be organized later as a single block (it will be interleaved due to execution order otherwise).

func GetChassisFRUID

func GetChassisFRUID(c *EpChassis) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetDriveFRUID

func GetDriveFRUID(d *EpDrive) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetHSNNICFRUID

func GetHSNNICFRUID(hmstype, id, manufacturer, partNum, serialNum string) string

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetHTTPClientTimeout

func GetHTTPClientTimeout() int

Get the HTTP Client timeout in seconds used during Redfish interogation

func GetHpeDeviceFRUID

func GetHpeDeviceFRUID(d *EpHpeDevice) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetIPAddressString

func GetIPAddressString(ip string) string

Return the ip address string, in normalized form for ipv6, or the empty string if it is not a valid ipv4 or ipv6 address. Normalization for ipv6 involves lower-casing, removing leading zeros, and adding'[' ']' brackets, plus anything else net.ParseIP does. If a port is present, it is added after any required bracketing.

func GetManagerFRUID

func GetManagerFRUID(m *EpManager) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetMemoryFRUID

func GetMemoryFRUID(m *EpMemory) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetNetworkAdapterFRUID

func GetNetworkAdapterFRUID(na *EpNetworkAdapter) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetNodeAccelRiserFRUID

func GetNodeAccelRiserFRUID(r *EpNodeAccelRiser) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetOffsetMACString

func GetOffsetMACString(mac string, offset int64) (string, error)

Given a valid MAC in 12-byte hex format (with/without ":"), return a MAC address that is the original value plus offset, which can be negative.

Returns: New MAC string in ":" hex format (keeping upper/lowercase unless

   case is mixed, then defaulting to lower) and err == nil
OR Empty-String/Non-NIL-error if MAC string is invalid/bad-format
   or would over/underflow.

func GetPDUFRUID

func GetPDUFRUID(p *EpPDU) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetPowerSupplyFRUID

func GetPowerSupplyFRUID(p *EpPowerSupply) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetProcessorFRUID

func GetProcessorFRUID(p *EpProcessor) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func GetSystemFRUID

func GetSystemFRUID(s *EpSystem) (fruid string, err error)

Build FRUID using standard fields: <Type>.<Manufacturer>.<PartNumber>.<SerialNumber> else return an error.

func IsManufacturer

func IsManufacturer(mfrCheckStr, mfr string) int

This should only return 1 if the RF manufacturer string (mfrCheckStr) is mfr (see above), 0 for not and -1 if mfrCheckStr is blank or non-alpha-numeric. This should be used in combination with other checks ideally.

func IsUnmarshalTypeError

func IsUnmarshalTypeError(err error) bool

If json.Unmarshal failed with a single-field error or something worse.

func MACCompare

func MACCompare(mac1, mac2 string) (int, error)

Normalize and compare two MAC strings and report -1 if mac1 is lower, 1 if mac1 is higher, and 0 if they match.

func NormalizeMAC

func NormalizeMAC(mac string) string

Normalize the MAC string to be lower case, ":"-separated 6-hex-byte format. If the MAC does not seem to be valid (strange separator, wrong length, etc.) return the ORIGINAL string

func NormalizeMACIfValid

func NormalizeMACIfValid(mac string) string

Normalize the MAC string to be lower case, ":"-separated 6-hex-byte format. If the MAC does not seem to be valid (strange separator, wrong length, etc.) return the EMPTY string

func NormalizeVerifyMAC

func NormalizeVerifyMAC(mac string) (string, error)

Normalize the MAC string to be lower case, ":"-separated 6-hex-byte format. If the MAC does not seem to be valid (strange separator, wrong length, etc.) return the EMPTY string AND set err != nil

func RfDefaultClient

func RfDefaultClient() *hms_certs.HTTPClientPair

Returns default-configuration HTTP Client

func SetDebug

func SetDebug(level int)

func SetHTTPClientTimeout

func SetHTTPClientTimeout(timeout int)

Set the HTTP Client timeout in seconds used during Redfish interogation. 0 means no timeout. NOTE: Global, to be called only once at startup.

func SetLogger

func SetLogger(l *log.Logger)

func SetVerbose

func SetVerbose(level int)

func SplitAddrZone

func SplitAddrZone(ipaddr string) (addr, zone string)

Split off the portion of the address string following the last '%'

func StringSplitLast

func StringSplitLast(s string, token byte) (prefix, suffix string)

Split a string into two parts at the LAST instance of token. strings functions make this annoying.

func VersionFields

func VersionFields(vers, delim string, num int) (version string, included int)

For a version string, e.g. 1.0.0, include only the first 'num' parts. Return 'version' with included fields only, plus the number of fields 'included'. If less are found, 'included' will be less than 'num'.

Example: For vers=1.0.0 and num=2, return "1.0", 2.

Types

type AccountService

type AccountService struct {
	OContext                        string      `json:"@odata.context"`
	Oid                             string      `json:"@odata.id"`
	Otype                           string      `json:"@odata.type"`
	Id                              string      `json:"Id"`
	Name                            string      `json:"Name"`
	Description                     string      `json:"Description"`
	Status                          StatusRF    `json:"Status"`
	ServiceEnabled                  *bool       `json:"ServiceEnabled,omitempty"`
	AuthFailureLoggingThreshold     json.Number `json:"AuthFailureLoggingThreshold"`
	MinPasswordLength               json.Number `json:"MinPasswordLength"`
	AccountLockoutThreshold         json.Number `json:"AccountLockoutThreshold"`
	AccountLockoutDuration          json.Number `json:"AccountLockoutDuration"`
	AccountLockoutCounterResetAfter json.Number `json:"AccountLockoutCounterResetAfter"`

	Accounts ResourceID `json:"Accounts"`
	Roles    ResourceID `json:"Roles"`
}

Redfish account service. This is the top-level object linked via the service root. It configures general account parameters and links to individual accounts and user roles.

type ActionFactoryReset

type ActionFactoryReset struct {
	AllowableValues []string `json:"FactoryResetType@Redfish.AllowableValues"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

FactoryReset - OEM (Cray) only so far

type ActionNamed

type ActionNamed struct {
	AllowableValues []string `json:"Name@Redfish.AllowableValues"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

Action "Name" - OEM (Cray) only so far

type ActionPowerControl

type ActionPowerControl struct {
	AllowableValues []string `json:"PowerState@Redfish.AllowableValues,omitempty"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

PowerControl - Outlet

type ActionReset

type ActionReset struct {
	AllowableValues []string `json:"ResetType@Redfish.AllowableValues"`
	RFActionInfo    string   `json:"@Redfish.ActionInfo"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

Action type Reset - May be found under Chassis, System or Manager Actions

type ActionResetBreaker

type ActionResetBreaker struct {
	AllowableValues []string `json:"ResetBreaker@Redfish.AllowableValues,omitempty"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

Action type ResetBreaker - Outlet

type ActionResetStatistics

type ActionResetStatistics struct {
	AllowableValues []string `json:"ResetStatistics@Redfish.AllowableValues,omitempty"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

Action type ResetStatistics - Outlet Is there AllowableValues here? No idea what {type}@ prefix should be then.

type ActionSimpleUpdate

type ActionSimpleUpdate struct {
	Target string `json:"target,omitempty"`
	Title  string `json:"title,omitempty"`
}

UpdateService - Simple update action payload.

type ActionTestEvent

type ActionTestEvent struct {
	AllowableValues []string `json:"EventType@Redfish.AllowableValues"`
	Target          string   `json:"target"`
	Title           string   `json:"title,omitempty"`
}

EventService - Submit Test Event action payload.

type Alarm

type Alarm struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	Id          string `json:"Id"`
	Description string `json:"Description"`
	Name        string `json:"Name"`

	Actions        *AlarmActions    `json:"Actions,omitempty"`
	AlarmState     string           `json:"AlarmState"`
	AutomaticReArm *bool            `json:"AutomaticReArm,omitempty"`
	OEM            *json.RawMessage `json:"Oem,omitempty"`
	Message        string           `json:"Message"`
	MessageArgs    []string         `json:"MessageArgs"`
	MessageId      string           `json:"MessageId"`
	Severity       string           `json:"Severity"`

	Links AlarmLinks `json:"Links"`
}

Redfish Alarms

DMTF: "An Alarm is an entity that has a latch type behavior. It is designed to be used to persist sensor threshold crossing or to capture the momentary state of another property."

type AlarmActions

type AlarmActions struct {
	OEM *json.RawMessage `json:"Oem,omitempty"`
}

Actions for Alarm - OEM only for now

type AlarmCollection

type AlarmCollection GenericCollection

Collection of Sensors, i.e. linked to a parent component, e.g. PDU

type AlarmLinks struct {
	OEM             *json.RawMessage `json:"Oem,omitempty"`
	RelatedProperty ResourceID       `json:"RelatedProperty"`
	RelatedSensor   ResourceID       `json:"RelatedSensor"`
}

Links for Alarm

type Assembly

type Assembly struct {
	OContext    string            `json:"@odata.context"`
	Oid         string            `json:"@odata.id"`
	Otype       string            `json:"@odata.type"`
	Description string            `json:"Description"`
	Name        string            `json:"Name"`
	Id          string            `json:"Id"`
	Assemblies  []*NodeAccelRiser `json:"Assemblies"`
}

JSON decoded struct returned from Redfish for a particular set of ids. Assembly resources deviate from GenericCollections by by using the Assemblies array instead of a Members array Example: /redfish/v1/Chassis/<system_id>/Assembly

type Chassis

type Chassis struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	Actions *ChassisActions `json:"Actions,omitempty"`

	ChassisLocationInfoRF
	ChassisFRUInfoRF

	PowerState string   `json:"PowerState"`
	Status     StatusRF `json:"Status"`

	NetworkAdapters ResourceID `json:"NetworkAdapters"`
	Power           ResourceID `json:"Power"`
	Assembly        ResourceID `json:"Assembly"`
	Thermal         ResourceID `json:"Thermal"`
	Controls        ResourceID `json:"Controls"`

	Links ChassisLinks `json:"Links"`

	OEM *ChassisOEM `json:"Oem,omitempty"`
}

JSON decoded struct returned from the BMC of type "Chassis"

Example: /redfish/v1/Chassis/System.Embedded.1

type ChassisActions

type ChassisActions struct {
	ChassisReset ActionReset        `json:"#Chassis.Reset"`
	OEM          *ChassisActionsOEM `json:"Oem,omitempty"`
}

Redfish Actions for Chassis components

type ChassisActionsOEM

type ChassisActionsOEM struct {
	ChassisEmergencyPower *ActionReset `json:"#Chassis.EmergencyPower,omitempty"`
}

Redfish Chassis Actions - OEM sub-struct

type ChassisCollection

type ChassisCollection GenericCollection

JSON decoded collection struct returned from Redfish "Chassis" Example: /redfish/v1/Chassis

type ChassisFRUInfoRF

type ChassisFRUInfoRF struct {
	AssetTag     string `json:"AssetTag"`
	ChassisType  string `json:"ChassisType"`
	Model        string `json:"Model"`
	Manufacturer string `json:"Manufacturer"`
	PartNumber   string `json:"PartNumber"`
	SerialNumber string `json:"SerialNumber"`
	SKU          string `json:"SKU"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures)

type ChassisLinks struct {
	ComputerSystems []ResourceID `json:"ComputerSystems"` // Nodes in chassis
	Contains        []ResourceID `json:"Contains"`        // Sub-chassis ids
	ContainedBy     ResourceID   `json:"ContainedBy"`     // Parent chassis
	CooledBy        []ResourceID `json:"CooledBy"`
	Drives          []ResourceID `json:"Drives"`
	ManagedBy       []ResourceID `json:"ManagedBy"`
	PoweredBy       []ResourceID `json:"PoweredBy"`
	Storage         []ResourceID `json:"Storage"`
	Switches        []ResourceID `json:"Switches"`
}

Redfish Chassis - Links section

type ChassisLocationInfoRF

type ChassisLocationInfoRF struct {
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
	Hostname    string `json:"HostName"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures).

type ChassisOEM

type ChassisOEM struct {
	Hpe *ChassisOemHpe `json:"Hpe,omitempty"`
}

type ChassisOemHpe

type ChassisOemHpe struct {
	// Actions
	// BayNumber
	// Firmware
	Links HpeOemChassisLinks `json:"Links"`
}

type Circuit

type Circuit struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// Embedded structs
	CircuitsLocationInfo
	CircuitFRUInfo

	Actions *CircuitActions `json:"Actions,omitempty"`

	Id          string `json:"Id"`
	Description string `json:"Description"`
	Name        string `json:"Name"`
	CircuitType string `json:"CircuitType"`

	// Current State (all enums)
	BreakerState string   `json:"BreakerState"`
	PowerState   string   `json:"PowerState"`
	Status       StatusRF `json:"Status"`
	IndicatorLED string   `json:"IndicatorLED"`

	// Configuration
	CriticalCircuit          *bool       `json:"CriticalCircuit,omitempty"`
	PowerCycleDelaySeconds   json.Number `json:"PowerCycleDelaySeconds,omitempty"`
	PowerOnDelaySeconds      json.Number `json:"PowerOnDelaySeconds,omitempty"`
	PowerRestoreDelaySeconds json.Number `json:"PowerRestoreDelaySeconds,omitempty"`
	PowerRestorePolicy       string      `json:"PowerRestorePolicy,omitempty"`

	Outlets       []ResourceID     `json:"Outlets"`
	OutletsOCount int              `json:"Outlets@odata.count,omitempty"`
	Oem           *json.RawMessage `json:"Oem,omitempty"`

	// Links for outlet
	Links CircuitLinks `json:"Links"`

	// Sensors
	CurrentSensor           SensorExcerpt      `json:"CurrentSensor,omitempty"`
	EnergySensor            SensorExcerpt      `json:"EnergySensor,omitempty"`
	FrequencySensor         SensorExcerpt      `json:"FrequencySensor,omitempty"`
	PowerSensor             SensorPowerExcerpt `json:"PowerSensor,omitempty"`
	PolyPhaseCurrentSensors Currents           `json:"PolyPhaseCurrentSensors,omitempty"`
	PolyPhaseEnergySensors  EnergyReadings     `json:"PolyPhaseEnergySensors,omitempty"`
	PolyPhasePowerSensors   PowerReadings      `json:"PolyPhasePowerSensors,omitempty"`
	PolyPhaseVoltageSensors Voltages           `json:"PolyPhaseVoltageSensors,omitempty"`
	TemperatureSensor       SensorExcerpt      `json:"TemperatureSensor,omitempty"`
	VoltageSensor           SensorExcerpt      `json:"VoltageSensor,omitempty"`
}

Redfish Circuit

This represents a Circuitwhich will have power components linked to it.

Example: /redfish/v1/PowerEquipment/RackPDUs/1/Branches/A

type CircuitActions

type CircuitActions struct {
	PowerControl    *ActionPowerControl    `json:"#Circuit.PowerControl,omitempty"`
	ResetBreaker    *ActionResetBreaker    `json:"#Circuit.ResetBreaker,omitempty"`
	ResetStatistics *ActionResetStatistics `json:"#Circuit.ResetStatistics,omitempty"`
	OEM             *json.RawMessage       `json:"Oem,omitempty"`
}

Redfish Circuit Actions sub-struct

type CircuitCollection

type CircuitCollection GenericCollection

Collection of Circuits, i.e. linked with a PDU

type CircuitFRUInfo

type CircuitFRUInfo struct {
	NominalVoltage   string      `json:"NominalVoltage,omitempty"`
	CircuitType      string      `json:"CircuitType"` // Enum
	PlugType         string      `json:"PlugType"`    // Enum - Matches OutletType
	PhaseWiringType  string      `json:"PhaseWiringType,omitempty"`
	PowerEnabled     *bool       `json:"PowerEnabled,omitempty"` // Can be powered?
	RatedCurrentAmps json.Number `json:"RatedCurrentAmps,omitempty"`
	VoltageType      string      `json:"VoltageType,omitempty"`
}

Circuits do not have individual FRUs, PDUs do, but their properties are potentially important. This is FRU-dependent data for HwInventory Note: omits configurable parameters. Note2: Circuit schema is fairly similar to Outlet, and links to Outlets.

type CircuitLinks struct {
	OEM           *json.RawMessage `json:"Oem,omitempty"`
	BranchCircuit ResourceID       `json:"BranchCircuit"`
}

Links for Circuit

type CircuitSummary

type CircuitSummary struct {
	ControlledOutlets json.Number `json:"ControlledOutlets,omitempty"`
	MonitoredBranches json.Number `json:"MonitoredBranches,omitempty"`
	MonitoredOutlets  json.Number `json:"MonitoredOutlets,omitempty"`
	MonitoredPhases   json.Number `json:"MonitoredPhases,omitempty"`
	TotalBranches     json.Number `json:"TotalBranches,omitempty"`
	TotalOutlets      json.Number `json:"TotalOutlets,omitempty"`
	TotalPhases       json.Number `json:"TotalPhases,omitempty"`
}

CircuitSummary sub-struct of PowerDistribution These are all-readonly

type CircuitsLocationInfo

type CircuitsLocationInfo struct {
	Id          string `json:"Id"`
	Description string `json:"Description"`
	Name        string `json:"Name"`
}

Circuits do not have individual FRUs, PDUs do, but their properties are potentially important. This is location-dependent data for HwInventory Note: Circuit schema is fairly similar to Outlet, and links to Outlets.

type ComponentChassisInfo

type ComponentChassisInfo struct {
	Name    string          `json:"Name,omitempty"`
	Actions *ChassisActions `json:"Actions,omitempty"`
}

Type specific info for Redfish Chassis components

type ComponentDescription

type ComponentDescription struct {
	ID             string `json:"ID"`   // Key, HMS ID, i.e. xname
	Type           string `json:"Type"` // Key, HMS Type
	Domain         string `json:"Domain,omitempty"`
	FQDN           string `json:"FQDN,omitempty"`
	RedfishType    string `json:"RedfishType"`
	RedfishSubtype string `json:"RedfishSubtype"`
	MACAddr        string `json:"MACAddr,omitempty"`
	UUID           string `json:"UUID,omitempty"`
	OdataID        string `json:"OdataID"`
	RfEndpointID   string `json:"RedfishEndpointID"`
}

type ComponentManagerInfo

type ComponentManagerInfo struct {
	Name       string             `json:"Name,omitempty"`
	Actions    *ManagerActions    `json:"Actions,omitempty"`
	EthNICInfo []*EthernetNICInfo `json:"EthernetNICInfo,omitempty"`
}

type ComponentOutletInfo

type ComponentOutletInfo struct {
	Name    string         `json:"Name,omitempty"`
	Actions *OutletActions `json:"Actions,omitempty"`
}

type ComponentPDUInfo

type ComponentPDUInfo struct {
	Name    string                    `json:"Name,omitempty"`
	Actions *PowerDistributionActions `json:"Actions,omitempty"`
}

type ComponentSystemInfo

type ComponentSystemInfo struct {
	Name       string                 `json:"Name,omitempty"`
	Actions    *ComputerSystemActions `json:"Actions,omitempty"`
	EthNICInfo []*EthernetNICInfo     `json:"EthernetNICInfo,omitempty"`
	PowerCtlInfo
	Controls []*Control `json:"Controls,omitempty"`
}

Type specific info for Redfish ComputerSystem components

type ComputerSystem

type ComputerSystem struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// Embedded structs - used for SystemHWInventory.
	SystemLocationInfoRF // Location/instance specifc properties
	SystemFRUInfoRF      // FRU-specific data that follows the physical HW.

	Actions *ComputerSystemActions `json:"Actions,omitempty"`

	Boot ComputerSystemBoot `json:"Boot"`

	PowerState   string   `json:"PowerState"`
	IndicatorLED string   `json:"IndicatorLED"`
	Status       StatusRF `json:"Status"`

	Bios               ResourceID `json:"Bios"`
	EthernetInterfaces ResourceID `json:"EthernetInterfaces"`
	LogServices        ResourceID `json:"LogServices"`
	Memory             ResourceID `json:"Memory"`
	Processors         ResourceID `json:"Processors"`
	SecureBoot         ResourceID `json:"SecureBoot"`
	SimpleStorage      ResourceID `json:"SimpleStorage"`
	Storage            ResourceID `json:"Storage"`

	Links ComputerSystemLinks `json:"Links"`
}

Redfish pass-through from Redfish Processor

Example: /redfish/v1/Systems/System.Embedded.1

This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields consitiute the type specific fields in the HWInventory objects that are returned in response to queries. JSON decoded struct returned from the BMC of type "ComputerSystem"

type ComputerSystemActions

type ComputerSystemActions struct {
	ComputerSystemReset ActionReset `json:"#ComputerSystem.Reset"`
}

Redfish ComputerSystem sub-struct - Actions

type ComputerSystemBoot

type ComputerSystemBoot struct {
	BootSourceOverrideEnabled    string   `json:"BootSourceOverrideEnabled"`
	BootSourceOverrideTarget     string   `json:"BootSourceOverrideTarget"`
	AllowableValues              []string `json:"BootSourceOverrideTarget@Redfish.AllowableValues"`
	UefiTargetBootSourceOverride string   `json:"UefiTargetBootSourceOverride"`
}

Redfsh ComputerSystem sub-struct - Boot options/settings/parameters

type ComputerSystemLinks struct {
	Chassis   []ResourceID `json:"Chassis"`
	ManagedBy []ResourceID `json:"ManagedBy"`
	PoweredBy []ResourceID `json:"PoweredBy"`
}

Redfish Links struct - All those defined for ComputerSystem objects

type ComputerSystemMemorySummary

type ComputerSystemMemorySummary struct {
	TotalSystemMemoryGiB json.Number `json:"TotalSystemMemoryGiB"`
}

Redfish MemorySummary struct - Sub-struct of ComputerSystem

type ComputerSystemProcessorSummary

type ComputerSystemProcessorSummary struct {
	Count json.Number `json:"Count"`
	Model string      `json:"Model"`
}

Redfish ProcessorSummary struct - Sub-struct of ComputerSystem

type ContactInfo

type ContactInfo struct {
	ContactName  string `json:"ContactName"`
	EmailAddress string `json:"EmailAddress"`
	PhoneNumber  string `json:"PhoneNumber,omitempty"`
}

Within Location - ContactInfo

type Control added in v1.30.16

type Control struct {
	URL     string    `json:"URL"`
	Control RFControl `json:"Control"`
}

type ControlCollection added in v1.30.16

type ControlCollection GenericCollection

JSON decoded collection struct returned from Redfish "Controls" Example: /redfish/v1/Chassis/<chassis_id>/Controls

type CrayPwrLimit

type CrayPwrLimit struct {
	Min int `json:"Min,omitempty"`
	Max int `json:"Max,omitempty"`
}

type Currents

type Currents struct {
	Line1   *SensorExcerpt `json:"Line1,omitempty"`
	Line2   *SensorExcerpt `json:"Line2,omitempty"`
	Line3   *SensorExcerpt `json:"Line3,omitempty"`
	Neutral *SensorExcerpt `json:"Neutral,omitempty"`
}

Currents - Used in Outlet and Circuit

type DiscoveryInfo

type DiscoveryInfo struct {
	LastAttempt    string `json:"LastDiscoveryAttempt,omitempty"`
	LastStatus     string `json:"LastDiscoveryStatus"`
	RedfishVersion string `json:"RedfishVersion,omitempty"`
}

func (*DiscoveryInfo) TSNow

func (d *DiscoveryInfo) TSNow()

Set timestamp to now.

func (*DiscoveryInfo) UpdateLastStatusWithTS

func (d *DiscoveryInfo) UpdateLastStatusWithTS(status string)

Update Status and set timestamp to now.

type Drive

type Drive struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// Embedded structs.
	DriveLocationInfoRF
	DriveFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from Redfish "Drive" This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields constitute the type specific fields in the HWInventory objects that are returned in response to queries.

type DriveFRUInfoRF

type DriveFRUInfoRF struct {

	//Manufacture Info
	Manufacturer string `json:"Manufacturer"`
	SerialNumber string `json:"SerialNumber"`
	PartNumber   string `json:"PartNumber"`
	Model        string `json:"Model"`
	SKU          string `json:"SKU"`

	//Capabilities Info
	CapacityBytes    json.Number `json:"CapacityBytes"`
	Protocol         string      `json:"Protocol"`
	MediaType        string      `json:"MediaType"`
	RotationSpeedRPM json.Number `json:"RotationSpeedRPM"`
	BlockSizeBytes   json.Number `json:"BlockSizeBytes"`
	CapableSpeedGbs  json.Number `json:"CapableSpeedGbs"`

	//Status Info
	FailurePredicted              bool        `json:"FailurePredicted"`
	EncryptionAbility             string      `json:"EncryptionAbility"`
	EncryptionStatus              string      `json:"EncryptionStatus"`
	NegotiatedSpeedGbs            json.Number `json:"NegotiatedSpeedGbs"`
	PredictedMediaLifeLeftPercent json.Number `json:"PredictedMediaLifeLeftPercent"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures)

type DriveLocationInfoRF

type DriveLocationInfoRF struct {
	// Redfish pass-through from rf.Drive
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures).

type EnergyReadings

type EnergyReadings struct {
	Line1ToLine2   *SensorExcerpt `json:"Line1ToLine2,omitempty"`
	Line1ToNeutral *SensorExcerpt `json:"Line1ToNeutral,omitempty"`
	Line2ToLine3   *SensorExcerpt `json:"Line2ToLine3,omitempty"`
	Line2ToNeutral *SensorExcerpt `json:"Line2ToNeutral,omitempty"`
	Line3ToLine1   *SensorExcerpt `json:"Line3ToLine1,omitempty"`
	Line3ToNeutral *SensorExcerpt `json:"Line3ToNeutral,omitempty"`
}

EnergyReadings - Used in Outlet and Circuit

type EpAccountService

type EpAccountService struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ServiceDescription

	AccountServiceURL string `json:"accountServiceURL"` // Full URL to this svc
	RootFQDN          string `json:"rootFQDN"`          // i.e. for epRF
	RootHostname      string `json:"rootHostname"`
	RootDomain        string `json:"rootDomain"`

	LastStatus string `json:"lastStatus"`

	AccountServiceRF AccountService `json:"accountServiceRF"`
	// contains filtered or unexported fields
}

This is the AccountService for the corresponding RedfishEP

func NewEpAccountService

func NewEpAccountService(epRF *RedfishEP, odataID string) *EpAccountService

Create new struct to discover the AccountService for this RedfishEP

type EpAssembly

type EpAssembly struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	InventoryData

	AssemblyURL string `json:"assemblyURL"` // Full URL to this RF Assembly obj
	ParentOID   string `json:"parentOID"`   // odata.id for parent
	ParentType  string `json:"parentType"`  // Chassis
	LastStatus  string `json:"LastStatus"`

	AssemblyRF  Assembly `json:"AssemblyRF"`
	AssemblyRaw *json.RawMessage
	// contains filtered or unexported fields
}

This is the top-level Assembly object for a particular Chassis.

func NewEpAssembly

func NewEpAssembly(s *EpSystem, odataID ResourceID, pOID, pType string) *EpAssembly

Initializes EpAssembly struct with minimal information needed to pass along to its children.

type EpChassis

type EpChassis struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct - Chassis specific info
	ComponentChassisInfo

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	BaseOdataID string `json:"BaseOdataID"`
	ChassisURL  string `json:"ChassisURL"` // Full URL to this Chassis

	PChassisOID  string `json:"pChassisOID"`  // odata.id for parent, if nested
	PChassisType string `json:"pChassisType"` // ChassisType enum from parent

	// The Oids here are map keys stored by the endpoint.  Via the
	// epRF ptr we can obtain the Go EpManager or EpSystem structs.
	//
	// We will want to store some higher-level information when we know
	// more about the system type, but for now they are just for navigation.
	//
	// Note that since there is always only a single "ContainedBy" link, we
	// use this, if it exists, to set the parent chassis OdataID field above
	// (e.g. PChassisOID/PChassesType).
	ManagedBy    []ResourceID `json:"managedBy"`
	ChildChassis []ResourceID `json:"childChassis"`
	ChildSystems []ResourceID `json:"childSystems"`

	LastStatus string `json:"lastStatus"`

	ChassisRF Chassis `json:"chassisRF"`

	Power         *EpPower        `json:"Power"`
	PowerSupplies EpPowerSupplies `json:"PowerSupplies"`
	// contains filtered or unexported fields
}

These are the discovered attributes for a particular entry in the /Chassis/ URL for a given RF endpoint. The chassis is important to understand where a particular system may be in an enclosure (if it is not the only one) and what type it is. Additionally, power operations may be carried out at the chassis level and there may be some nesting of chassis (e.g. blade and cage) that we may need to understand.

func NewEpChassis

func NewEpChassis(epRF *RedfishEP, odataID ResourceID, rawOrdinal int) *EpChassis

Initializes EpSystem struct with minimal information needed to discover it, i.e. endpoint info and the OdataID of the system to look at. This should be the only way this struct is created.

type EpChassisSet

type EpChassisSet struct {
	Num  int                   `json:"num"`
	OIDs map[string]*EpChassis `json:"oids"`
}

Set of EpChassis, representing a Redfish "chassis" under some RF endpoint.

type EpDrive

type EpDrive struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	DriveURL   string `json:"driveURL"`   // Full URL to this RF Drive obj
	ParentOID  string `json:"parentOID"`  // odata.id for parent
	ParentType string `json:"parentType"` // ComputerSystem or Manager
	LastStatus string `json:"LastStatus"`

	DriveRF Drive `json:"DriveRF"`
	// contains filtered or unexported fields
}

This is one of possibly several drives for a particular EpSystem(Redfish "ComputerSystem" or just "System").

func NewEpDrive

func NewEpDrive(s *EpStorageCollection, odataID ResourceID, rawOrdinal int) *EpDrive

Initializes EpDrive struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the Drive to look at. This should be the only way this struct is created for Drives under a system.

type EpDrives

type EpDrives struct {
	Num  int                 `json:"num"`
	OIDs map[string]*EpDrive `json:"oids"`
}

Set of EpDrive, each representing a Redfish "Drive" listed under a Redfish ComputerSystem aka System. Unlike Systems/Chassis, there is no top-level listing of all drives under an RF endpoint, i.e. each one is specific to a collection belonging to a single parent System.

type EpEthInterface

type EpEthInterface struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	BaseOdataID string `json:"BaseOdataID"`

	EtherURL   string `json:"etherURL"`   // Full URL to this  EthernetInterface
	ParentOID  string `json:"parentOID"`  // odata.id for parent
	ParentType string `json:"parentType"` // ComputerSystem or Manager

	Hostname string `json:"hostname"`
	Domain   string `json:"domain"`
	MACAddr  string `json:"MACAddr"`

	LastStatus string `json:"LastStatus"`

	EtherIfaceRF EthernetInterface `json:"EtherIfaceRF"`
	// contains filtered or unexported fields
}

This is one of possibly several ethernet interfaces for a a particular EpSystem(Redfish "ComputerSystem" or just "System"), or for a particular manager, i.e. BMC.

func NewEpEthInterface

func NewEpEthInterface(e *RedfishEP, pOID, pType string, odataID ResourceID, rawOrdinal int) *EpEthInterface

Initializes EpEthInterface struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the EthernetInterface to look at. This should be the only way this struct is created for interfaces under a system. TODO: constructor for manager if needed.

type EpEthInterfaces

type EpEthInterfaces struct {
	Num  int                        `json:"num"`
	OIDs map[string]*EpEthInterface `json:"oids"`
}

Set of EpEthInterface, each representing a Redfish "EthernetInterface" listed under some Redfish "System" or "Manager". Unlike Systems or Chassis, there is no top-level listing of all interfaces under an RF endpoint, i.e. each set is specific to a single parent System or Manager.

type EpEventService

type EpEventService struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ServiceDescription

	EventServiceURL string `json:"eventServiceURL"` // Full URL to this svc
	RootFQDN        string `json:"rootFQDN"`        // i.e. for epRF
	RootHostname    string `json:"rootHostname"`
	RootDomain      string `json:"rootDomain"`

	LastStatus string `json:"lastStatus"`

	EventServiceRF EventService `json:"eventServiceRF"`
	// contains filtered or unexported fields
}

This is the EventService for the corresponding RedfishEP

func NewEpEventService

func NewEpEventService(epRF *RedfishEP, odataID string) *EpEventService

Create new struct to discover the EventService for this RedfishEP

type EpHpeDevice

type EpHpeDevice struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	InventoryData

	DeviceURL  string `json:"deviceURL"`  // Full URL to this RF Assembly obj
	ParentOID  string `json:"parentOID"`  // odata.id for parent
	ParentType string `json:"parentType"` // Chassis
	LastStatus string `json:"LastStatus"`

	DeviceRF HpeDevice `json:"DeviceRF"`
	// contains filtered or unexported fields
}

This is the top-level Oem HpeDevice object for a particular Chassis.

func NewEpHpeDevice

func NewEpHpeDevice(s *EpSystem, odataID ResourceID, pOID, pType string, rawOrdinal int) *EpHpeDevice

Initializes EpHpeDevice struct with minimal information needed to pass along to its children.

type EpHpeDevices

type EpHpeDevices struct {
	Num  int                     `json:"num"`
	OIDs map[string]*EpHpeDevice `json:"oids"`
}

Set of EpHpeDevices, each representing a Redfish HPE OEM device (possibly a GPU) listed under a Redfish Chassis.

type EpManager

type EpManager struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct: Manager specific data
	ComponentManagerInfo

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	ManagerURL  string `json:"ManagerURL"` // Full URL to this Manager
	BaseOdataID string `json:"BaseOdataID"`

	ChassisOID  string `json:"ChassisOID"`  // odata.id for containing chassis
	ChassisType string `json:"ChassisType"` // ChassisType enum from container

	LastStatus string `json:"LastStatus"`

	// The oids here are map keys for structs stored in the EpEndpoint.  Via
	// the epRF ptr we can obtain the correspodning Go EpSystem or EpChassis
	// structs.  While a manager will usually manage a single system or
	// multi-system enclosure or chassis, it is not necessarily a strict
	// one-for-one mapping in either direction.
	//
	// We will want to store some higher-level information when we know
	// more about the Manager type, but for now they are just for navigation.
	//
	// Note that since there is always only a single "ManagerInChassis" link,
	// use this, if it exists, to set the ChassisOID field above.
	ManagerInChassis ResourceID   `json:"managerInChassis"`
	ManagedChassis   []ResourceID `json:"managedChassis"`
	ManagedSystems   []ResourceID `json:"managedSystems"`

	ManagerRF Manager `json:"managerRF"`

	// Ethernet Interfaces are children of Managers or Systems, not top
	// level components like Chassis or Managers.  Therefore we put the
	// local collection here.  Chassis or Managers are consolodated at the
	// EpEndpoint level in maps and we will use the odataID recorded here to
	// reference these via the epRF pointer.
	ENetInterfaces EpEthInterfaces `json:"enetInterfaces"`
	// contains filtered or unexported fields
}

These are the discovered attributes for a particular entry in the /Manager/ URL for a given RF endpoint. The manager is important to understand as they will represent important components such as BMCs and a top-level manager (if there is more than one) will implement the Redfish entry point we will be interacting with.

func NewEpManager

func NewEpManager(epRF *RedfishEP, odataID ResourceID, rawOrdinal int) *EpManager

Initializes EpSystem struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the system to look at. This should be the only way this struct is created.

type EpManagers

type EpManagers struct {
	Num  int                   `json:"num"`
	OIDs map[string]*EpManager `json:"oids"`
}

Set of EpManager, representing a Redfish "Manager" under some RF endpoint.

type EpMemory

type EpMemory struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	BaseOdataID string `json:"BaseOdataID"`

	MemoryURL  string `json:"memoryURL"`  // Full URL to this RF Memory obj
	ParentOID  string `json:"parentOID"`  // odata.id for parent
	ParentType string `json:"parentType"` // ComputerSystem or Manager
	LastStatus string `json:"LastStatus"`

	MemoryRF Memory `json:"MemoryRF"`
	// contains filtered or unexported fields
}

This is one of possibly several memory modules, e.g. DIMMS for a particular EpSystem(Redfish "ComputerSystem" or just "System").

func NewEpMemory

func NewEpMemory(s *EpSystem, odataID ResourceID, rawOrdinal int) *EpMemory

Initializes EpMemory struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the Memory module to look at. This should be the only way this struct is created for Redfish Memory objects under a system.

type EpMemoryMods

type EpMemoryMods struct {
	Num  int                  `json:"num"`
	OIDs map[string]*EpMemory `json:"oids"`
}

Set of EpMemory, each representing a Redfish "Memory" object, e.g. DIMM listed under a Redfish ComputerSystem aka System. Unlike Systems/Chassis, there is no top-level listing of all memory under an RF endpoint, i.e. each one is specific to a collection belonging to a single parent System.

type EpNetworkAdapter

type EpNetworkAdapter struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	NetworkAdapterURL string `json:"nodeAccelRiserURL"` // Full URL to this RF NetworkAdapter obj
	ParentOID         string `json:"parentOID"`         // odata.id for parent
	ParentType        string `json:"parentType"`        // Chassis
	LastStatus        string `json:"LastStatus"`

	NetworkAdapterRF *NetworkAdapter `json:"NetworkAdapterRF"`
	// contains filtered or unexported fields
}

This is one of possibly several NetworkAdapters for a particular EpChassis (Redfish "Chassis").

func NewEpNetworkAdapter

func NewEpNetworkAdapter(s *EpSystem, poid, pType string, odataID ResourceID, rawOrdinal int) *EpNetworkAdapter

Initializes EpNetworkAdapter struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the NetworkAdapter to look at. This should be the only way this struct is created for NetworkAdapters under a chassis.

type EpNetworkAdapters

type EpNetworkAdapters struct {
	Num  int                          `json:"num"`
	OIDs map[string]*EpNetworkAdapter `json:"oids"`
}

Set of EpNetworkAdapters, each representing a NetworkAdapter (HSN NIC, etc) listed under a Redfish Chassis.

type EpNodeAccelRiser

type EpNodeAccelRiser struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	NodeAccelRiserURL string `json:"nodeAccelRiserURL"` // Full URL to this RF PowerSupply obj
	ParentOID         string `json:"parentOID"`         // odata.id for parent
	ParentType        string `json:"parentType"`        // Chassis
	LastStatus        string `json:"LastStatus"`

	NodeAccelRiserRF *NodeAccelRiser `json:"NodeAccelRiserRF"`
	// contains filtered or unexported fields
}

This is one of possibly several NodeAccelRiser cards for a particular EpChassis (Redfish "Chassis").

func NewEpNodeAccelRiser

func NewEpNodeAccelRiser(assembly *EpAssembly, odataID ResourceID, rawOrdinal int) *EpNodeAccelRiser

Initializes EpNodeAccelRiser struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the NodeAccelRiser to look at. This should be the only way this struct is created for NodeAccelRiser cards under a chassis.

type EpNodeAccelRisers

type EpNodeAccelRisers struct {
	Num  int                          `json:"num"`
	OIDs map[string]*EpNodeAccelRiser `json:"oids"`
}

Set of EpNodeAccelRiser, each representing a GPUSubsystem baseboard "NodeAccelRiser" listed under a Redfish Chassis.

type EpOutlet

type EpOutlet struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct - PDU specific info
	ComponentOutletInfo

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	BaseOdataID string `json:"BaseOdataID"`
	OutletURL   string `json:"outletURL"` // Full URL to this Chassis
	LastStatus  string `json:"lastStatus"`
	OutletRF    Outlet `json:"outletRF"`
	// contains filtered or unexported fields
}

This represents an outlet under a PDU parent. It is the individual outlets that will be interacted with (e.g. turned on or off) in most cases.

func NewEpOutlet

func NewEpOutlet(pdu *EpPDU, odataID ResourceID, rawOrdinal int) *EpOutlet

Initializes EpSystem struct with minimal information needed to discover it, i.e. endpoint info and the OdataID of the system to look at. This should be the only way this struct is created.

type EpOutlets

type EpOutlets struct {
	Num  int                  `json:"num"`
	OIDs map[string]*EpOutlet `json:"oids"`
}

Set of EpOutlet, representing a individual outlets under a Redfish "PowerDistribution" object, e.g. RackPDU.

type EpPDU

type EpPDU struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct - PDU specific info
	ComponentPDUInfo

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	BaseOdataID         string            `json:"BaseOdataID"`
	PDUURL              string            `json:"pduURL"` // Full URL to me
	LastStatus          string            `json:"lastStatus"`
	PowerDistributionRF PowerDistribution `json:"powerDistributionRF"`

	// Child/linked components
	Outlets EpOutlets `json:"outlets"`
	// contains filtered or unexported fields
}

This represents a PDU. Most of the behavior is defined on the child outlets that we will discover as children, (e.g. like processors under Systems), a relationship that will be hold in the detailed hardware inventory.

func NewEpPDU

func NewEpPDU(epRF *RedfishEP, odataID ResourceID, rawOrdinal int) *EpPDU

Initializes EpSystem struct with minimal information needed to discover it, i.e. endpoint info and the OdataID of the system to look at. This should be the only way this struct is created.

type EpPDUs

type EpPDUs struct {
	Num  int               `json:"num"`
	OIDs map[string]*EpPDU `json:"oids"`
}

Set of EpPDU, representing a Redfish "PowerDistribution" object, e.g. RackPDU

type EpPower

type EpPower struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	InventoryData

	PowerURL   string `json:"powerURL"`   // Full URL to this RF Power obj
	ParentOID  string `json:"parentOID"`  // odata.id for parent
	ParentType string `json:"parentType"` // Chassis
	LastStatus string `json:"LastStatus"`

	PowerRF  Power `json:"PowerRF"`
	PowerRaw *json.RawMessage
	// contains filtered or unexported fields
}

This is the top-level Power object for a particular Chassis.

func NewEpPower

func NewEpPower(chassis *EpChassis, odataID ResourceID) *EpPower

Initializes EpPower struct with minimal information needed to pass along to its children.

type EpPowerSupplies

type EpPowerSupplies struct {
	Num  int                       `json:"num"`
	OIDs map[string]*EpPowerSupply `json:"oids"`
}

Set of EpPowerSupply, each representing a Redfish "PowerSupply" listed under a Redfish Chassis.

type EpPowerSupply

type EpPowerSupply struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	PowerSupplyURL string `json:"powerSupplyURL"` // Full URL to this RF PowerSupply obj
	ParentOID      string `json:"parentOID"`      // odata.id for parent
	ParentType     string `json:"parentType"`     // Chassis
	LastStatus     string `json:"LastStatus"`

	PowerSupplyRF *PowerSupply `json:"PowerSupplyRF"`
	// contains filtered or unexported fields
}

This is one of possibly several PowerSupplies for a particular EpChassis (Redfish "Chassis").

func NewEpPowerSupply

func NewEpPowerSupply(power *EpPower, odataID ResourceID, rawOrdinal int) *EpPowerSupply

Initializes EpPowerSupply struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the PowerSupply to look at. This should be the only way this struct is created for PowerSupplies under a chassis.

type EpProcessor

type EpProcessor struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	ProcessorURL string `json:"processorURL"` // Full URL to this RF Processor obj
	ParentOID    string `json:"parentOID"`    // odata.id for parent
	ParentType   string `json:"parentType"`   // ComputerSystem or Manager
	LastStatus   string `json:"LastStatus"`

	ProcessorRF Processor `json:"ProcessorRF"`
	// contains filtered or unexported fields
}

This is one of possibly several processors for a a particular EpSystem(Redfish "ComputerSystem" or just "System").

func NewEpProcessor

func NewEpProcessor(s *EpSystem, odataID ResourceID, rawOrdinal int) *EpProcessor

Initializes EpProcesor struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the Processor to look at. This should be the only way this struct is created for processors under a system.

type EpProcessors

type EpProcessors struct {
	Num  int                     `json:"num"`
	OIDs map[string]*EpProcessor `json:"oids"`
}

Set of EpProcessor, each representing a Redfish "Processor" listed under a Redfish ComputerSystem aka System. Unlike Systems/Chassis, there is no top-level listing of all processors under an RF endpoint, i.e. each one is specific to a collection belonging to a single parent System.

type EpSessionService

type EpSessionService struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ServiceDescription

	SessionServiceURL string `json:"sessionServiceURL"` // Full URL to this svc
	RootFQDN          string `json:"rootFQDN"`          // i.e. for epRF
	RootHostname      string `json:"rootHostname"`
	RootDomain        string `json:"rootDomain"`

	LastStatus string `json:"lastStatus"`

	SessionServiceRF SessionService `json:"sessionServiceRF"`
	// contains filtered or unexported fields
}

This is the SessionService for the corresponding RedfishEP

func NewEpSessionService

func NewEpSessionService(epRF *RedfishEP, odataID string) *EpSessionService

Create new struct to discover the SessionService for this RedfishEP

type EpStorage

type EpStorage struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	StorageURL string `json:"storageCollectionURL"` // Full URL to this RF Storage obj
	ParentOID  string `json:"parentOID"`            // odata.id for parent
	ParentType string `json:"parentType"`           // ComputerSystem or Manager
	LastStatus string `json:"LastStatus"`

	StorageRF  Storage `json:"StorageRF"`
	StorageRaw *json.RawMessage
	// contains filtered or unexported fields
}

This is the top-level Storage object for a particular ComputerSystem.

func NewEpStorage

func NewEpStorage(sys *EpSystem, odataID ResourceID) *EpStorage

Initializes EpStorage struct with minimal information needed to pass along to its children.

type EpStorageCollection

type EpStorageCollection struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	BaseOdataID string `json:"BaseOdataID"`

	Ordinal    int `json:"Ordinal"`
	RawOrdinal int `json:"-"`

	StorageCollectionURL string `json:"storageCollectionURL"` // Full URL to this RF StorageCollection obj
	ParentOID            string `json:"parentOID"`            // odata.id for parent
	ParentType           string `json:"parentType"`           // ComputerSystem or Manager
	LastStatus           string `json:"LastStatus"`

	StorageCollectionRF  StorageCollection `json:"StorageCollectionRF"`
	StorageCollectionRaw *json.RawMessage
	// contains filtered or unexported fields
}

This is one of possibly several Storage Collections for a particular ComputerSystem's Storage object.

func NewEpStorageCollection

func NewEpStorageCollection(s *EpStorage, odataID ResourceID, rawOrdinal int) *EpStorageCollection

Initializes EpStorageCollection struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the StorageCollection to look at.

type EpStorageCollections

type EpStorageCollections struct {
	Num  int                             `json:"num"`
	OIDs map[string]*EpStorageCollection `json:"oids"`
}

Set of EpStorageCollection objects, each representing a Redfish "StorageCollection" listed under a Redfish ComputerSystem's Storage object.

type EpSystem

type EpSystem struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ComponentDescription

	// Embedded struct
	ComponentSystemInfo

	// Embedded struct - Locational/FRU, state, and status info
	InventoryData

	SystemURL   string `json:"systemURL"` // Full URL to this ComputerSystem
	BaseOdataID string `json:"BaseOdataID"`

	PChassisOID  string `json:"ParentOID"`    // odata.id for parent chassis
	PChassisType string `json:"PChassisType"` // ChassisType enum from parent
	ManagerOID   string `json:"ManagerOID"`   // Most immediate manager if mult.
	ManagerType  string `json:"ManagerType"`  // Almost always BMC or equiv.

	LastStatus string `json:"lastStatus"`

	// These values are used as keys to locate EpManager and EpChassis
	// components via the top-level maps for each RF endpoint, via the epRF
	// endpoint, since these a Chassisre top-level groups just like "systems" are.
	//
	// Note that for simple systems, we are likely to only have the
	// containing (e.g. server) chassis and BMC listed here, which we will
	// use to populate the PChassisOID and ManagerOID fields above, but we
	// save the whole list for completeness (as we create a struct for
	// every chassis listed at the root) as we may need to support more
	// complicated structures later on.
	ManagedBy     []ResourceID `json:"managedBy"`
	ChassisForSys []ResourceID `json:"chassisForSys"`

	SystemRF ComputerSystem `json:"ComputerSystemRF"`

	// Ethernet Interfaces are children of Managers or Systems, not top
	// level components like Chassis or Managers.  Therefore we put the
	// local collection here.  Chassis or Managers are consolodated at the
	// EpEndpoint level in maps and we will use the odataID recorded here to
	// reference these via the epRF pointer.
	ENetInterfaces EpEthInterfaces `json:"enetInterfaces"`

	// Assembly and NodeAccelRiser info comes from the Chassis level but we
	// associate it with nodes (systems) so we record it here.
	Assembly        *EpAssembly       `json:"Assembly"`
	NodeAccelRisers EpNodeAccelRisers `json:"NodeAccelRisers"`

	// HpeDevice info comes from the Chassis level HPE OEM Links but we
	// associate it with nodes (systems) so we record it here. We discover
	// GPUs on HPE hardware as an HpeDevice.
	HpeDevices EpHpeDevices `json:"HpeDevices"`

	// NetworkAdapter (HSN NIC) info comes from the Chassis level but we
	// associate it with nodes (systems) so we record it here.
	NetworkAdapters EpNetworkAdapters `json:"NetworkAdapters"`

	// Power info comes from the chassis level but we associate it with
	// nodes (systems) so we record it here.
	PowerInfo PowerInfo `json:"powerInfo"`

	// Processors and Memory are similar to EthernetInterfaces, children
	// only of a particular ComputerSystem
	Processors EpProcessors `json:"processors"`
	MemoryMods EpMemoryMods `json:"memoryMods"`

	StorageGroups EpStorageCollections `json:"storageGroups"`
	Drives        EpDrives             `json:"drives"`
	// contains filtered or unexported fields
}

These are the discovered attributes for a particular entry in the Systems URL for a given RF endpoint. They will not be usable by themselves unless the hostname matching the host IP is available via Redfish. In the future, there will be a way to map "canonical" hostnames to each system under an endpoint via a file, and/or generate them programatically according to some method.

func NewEpSystem

func NewEpSystem(epRF *RedfishEP, odataID ResourceID, rawOrdinal int) *EpSystem

Initializes EpSystem struct with minimal information needed to discover it, i.e. endpoint info and the odataID of the system to look at. This should be the only way this struct is created.

type EpSystems

type EpSystems struct {
	Num  int                  `json:"num"`
	OIDs map[string]*EpSystem `json:"ids"`
}

Set of EpSystem, representing a Redfish "ComputerSystem" listed in some RF endpoint's "Systems" collection.

type EpTaskService

type EpTaskService struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ServiceDescription

	TaskServiceURL string `json:"taskServiceURL"` // Full URL to this svc
	RootFQDN       string `json:"rootFQDN"`       // i.e. for epRF
	RootHostname   string `json:"rootHostname"`
	RootDomain     string `json:"rootDomain"`

	LastStatus string `json:"lastStatus"`

	TaskServiceRF TaskService `json:"taskServiceRF"`
	// contains filtered or unexported fields
}

This is the TaskService for the corresponding RedfishEP

func NewEpTaskService

func NewEpTaskService(epRF *RedfishEP, odataID string) *EpTaskService

Create new struct to discover the TaskService for this RedfishEP

type EpUpdateService

type EpUpdateService struct {
	// Embedded struct: id, type, odataID and associated RfEndpointID.
	ServiceDescription

	UpdateServiceURL string `json:"updateServiceURL"` // Full URL to this svc
	RootFQDN         string `json:"rootFQDN"`         // i.e. for epRF
	RootHostname     string `json:"rootHostname"`
	RootDomain       string `json:"rootDomain"`

	LastStatus string `json:"lastStatus"`

	UpdateServiceRF UpdateService `json:"updateServiceRF"`
	// contains filtered or unexported fields
}

This is the UpdateService for the corresponding RedfishEP

func NewEpUpdateService

func NewEpUpdateService(epRF *RedfishEP, odataID string) *EpUpdateService

Create new struct to discover the UpdateService for this RedfishEP

type EthernetInterface

type EthernetInterface struct {
	OContext               string              `json:"@odata.context"`
	Oid                    string              `json:"@odata.id"`
	Otype                  string              `json:"@odata.type"`
	AutoNeg                *bool               `json:"AutoNeg,omitempty"`
	Description            string              `json:"Description"`
	FQDN                   string              `json:"FQDN"`
	FullDuplex             *bool               `json:"FullDuplex,omitempty"`
	Hostname               string              `json:"HostName"`
	Id                     string              `json:"Id"`
	IPv4Addresses          []IPv4Address       `json:"IPv4Addresses"`
	IPv6Addresses          []IPv6Address       `json:"IPv6Addresses"`
	IPv6StaticAddresses    []IPv6StaticAddress `json:"IPv6StaticAddresses"`
	IPv6DefaultGateway     string              `json:"IPv6DefaultGateway"`
	InterfaceEnabled       *bool               `json:"InterfaceEnabled,omitempty"`
	MACAddress             string              `json:"MACAddress"`
	PermanentMACAddress    string              `json:"PermanentMACAddress"`
	MTUSize                json.Number         `json:"MTUSize"`
	MaxIPv6StaticAddresses json.Number         `json:"MaxIPv6StaticAddresses"`
	Name                   string              `json:"Name"`
	NameServers            []string            `json:"NameServers"`
	SpeedMbps              json.Number         `json:"SpeedMbps"`
	Status                 StatusRF            `json:"Status"`
	UefiDevicePath         string              `json:"UefiDevicePath"`
	VLAN                   VLAN                `json:"VLAN"`
}

JSON decoded struct returned from Redfish of type "EthernetInterface" Example:

/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces/NIC.Integrated.1-3-1

type EthernetInterfaceCollection

type EthernetInterfaceCollection GenericCollection

JSON decoded collection struct of Redfish type "EthernetInterfaceCollection" Examples: /redfish/v1/Systems/<system_id>/EthernetInterfaces

/redfish/v1/Managers/<manager_id>/EthernetInterfaces

type EthernetNICInfo

type EthernetNICInfo struct {
	RedfishId           string `json:"RedfishId"`
	Oid                 string `json:"@odata.id"`
	Description         string `json:"Description,omitempty"`
	FQDN                string `json:"FQDN,omitempty"`
	Hostname            string `json:"Hostname,omitempty"`
	InterfaceEnabled    *bool  `json:"InterfaceEnabled,omitempty"`
	MACAddress          string `json:"MACAddress"`
	PermanentMACAddress string `json:"PermanentMACAddress,omitempty"`
}

type Event

type Event struct {
	OContext     string        `json:"@odata.context"`
	Oid          string        `json:"@odata.id"`
	Otype        string        `json:"@odata.type"`
	Id           string        `json:"Id"`
	Name         string        `json:"Name"`
	Context      string        `json:"Context"` // Later versions
	Description  string        `json:"Description"`
	Events       []EventRecord `json:"Events"`
	EventsOCount int           `json:"Events@odata.count"`
}

Redfish event. Can contain multiple EventRecord structs in Events array.

func EventDecode

func EventDecode(raw []byte) (*Event, error)

Decode Event and return newly allocated pointer, or else nil/error Error contains loggable details.

type EventDestination

type EventDestination struct {
	OContext    string   `json:"@odata.context"`
	Oid         string   `json:"@odata.id"`
	Otype       string   `json:"@odata.type"`
	Id          string   `json:"Id"`
	Context     string   `json:"Context"`
	Destination string   `json:"Destination"`
	EventTypes  []string `json:"EventTypes"`
	Protocol    string   `json:"Protocol"`
}

Redfish object representing a current event subscription being carried out by a Redfish manager/endpoint.

type EventDestinationCollection

type EventDestinationCollection GenericCollection

JSON decoded event subscription struct linked from Redfish "EventService" Example: /redfish/v1/EventService/Subscriptions

type EventRecord

type EventRecord struct {
	EventType         string     `json:"EventType"`
	EventId           string     `json:"EventId"`
	EventTimestamp    string     `json:"EventTimestamp"`
	Severity          string     `json:"Severity"`
	Message           string     `json:"Message"`
	MessageId         string     `json:"MessageId"`
	MessageArgs       []string   `json:"MessageArgs"`
	Context           string     `json:"Context"` // Older versions
	OriginOfCondition ResourceID `json:"OriginOfCondition"`
}

An individual event record. Multiple EventRecords can be contained in the Event object that is actually POSTed to the subcriber.

Note that "Message" is just a simple string and is optional. Instead, it may be necessary to use "MessageId" to look up a "Message" object in the corresponding Message Registry. In any case, there may be greater detail in the Message entry as it is more than just a simple string, e.g. it will place the MessageArgs in the context of the particular message. The MessageId format is registry.version.message. See "Message" below for details.

type EventService

type EventService struct {
	OContext                        string      `json:"@odata.context"`
	Oid                             string      `json:"@odata.id"`
	Otype                           string      `json:"@odata.type"`
	Id                              string      `json:"Id"`
	Name                            string      `json:"Name"`
	Status                          StatusRF    `json:"Status"`
	ServiceEnabled                  *bool       `json:"ServiceEnabled,omitempty"`
	DeliveryRetryAttempts           json.Number `json:"DeliveryRetryAttempts"`
	DeliveryRetryIntervalInSeconds  json.Number `json:"DeliveryRetryIntervalInSeconds"`
	EventTypesForSubscription       []string    `json:"EventTypesForSubscription"`
	EventTypesForSubscriptionOCount json.Number `json:"EventTypesForSubscription@odata.count"`

	Subscriptions ResourceID `json:"Subscriptions"`

	Actions EventServiceActions `json:"Actions"`
}

Redfish event service. This is the top-level object linked via the service root. It gives information of the types of subscriptions available and the URIs to create them. It also links to the current set of subscriptions, each primarily defined by the type(s) of event/alert of interest and the URL to POST them to when they occur.

type EventServiceActions

type EventServiceActions struct {
	SubmitTestEvent ActionTestEvent `json:"#EventService.SubmitTestEvent"`
}

EventService - Actions defined by Redfish for this type

type GBTProcessorOem

type GBTProcessorOem struct {
	ProcessorSerialNumber string `json:"Processor Serial Number,omitempty"`
}

type GenericCollection

type GenericCollection struct {
	OContext      string       `json:"@odata.context"`
	OCount        int          `json:"@odata.count"` // Oldest schemas use
	Oid           string       `json:"@odata.id"`
	Otype         string       `json:"@odata.type"`
	Description   string       `json:"Description"`
	Members       []ResourceID `json:"Members"`
	Outlets       []ResourceID `json:"Outlets"`             // For HPE PDU Outlets
	MembersOCount int          `json:"Members@odata.count"` // Most schemas
	Name          string       `json:"Name"`
}

JSON decoded struct returned from Redfish for a particular set of ids. Many collection resources are essentially identical in terms of their fields, so we define it generically here.

type HPEAccPowerService added in v1.30.9

type HPEAccPowerService struct {
	Links struct {
		PowerLimit ResourceID `json:"PowerLimit"`
	} `json:"Links"`
	PowerRegulationEnabled bool `json:"PowerRegulationEnabled"`
}

Redfish when following the HPE AccPowerService URI

type HPEPowerLimit added in v1.30.9

type HPEPowerLimit struct {
	Actions struct {
		ConfigurePowerLimit struct {
			Target string `json:"target"`
		} `json:"#HpeServerAccPowerLimit.ConfigurePowerLimit"`
	} `json:"Actions"`
	PowerLimitRanges []struct {
		MaximumPowerLimit int `json:"MaximumPowerLimit"`
		MinimumPowerLimit int `json:"MinimumPowerLimit"`
	} `json:"PowerLimitRanges"`
	Name string `json:"Name"`
}

Redfish when following the HPE PowerLimit URI

type HealthRF

type HealthRF string

Redfish "Health", "HealthRollUp" enum

type HpeDevice

type HpeDevice struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	HpeDeviceLocationInfoRF
	HpeDeviceFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from Redfish HPE OEM Device This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields consitiute the type specific fields in the HWInventory objects that are returned in response to queries.

type HpeDeviceCollection

type HpeDeviceCollection GenericCollection

type HpeDeviceFRUInfoRF

type HpeDeviceFRUInfoRF struct {
	// Redfish pass-through from rf.HpeDevice
	Manufacturer      string `json:"Manufacturer"`
	Model             string `json:"Model"`
	SerialNumber      string `json:"SerialNumber"`
	PartNumber        string `json:"PartNumber"`
	DeviceType        string `json:"DeviceType"`
	ProductPartNumber string `json:"ProductPartNumber"`
	ProductVersion    string `json:"ProductVersion"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system.

type HpeDeviceLocationInfoRF

type HpeDeviceLocationInfoRF struct {
	// Redfish pass-through from rf.Processor
	Id       string `json:"Id"`
	Name     string `json:"Name"`
	Location string `json:"Location"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU

type HpeOemChassisLinks struct {
	Devices ResourceID `json:"Devices"`
}

type HttpPushUriApplyTime

type HttpPushUriApplyTime struct {
	ApplyTime                          string      `json:"ApplyTime,omitempty"`
	MaintenanceWindowDurationInSeconds json.Number `json:"MaintenanceWindowDurationInSeconds,omitempty"`
	MaintenanceWindowStartTime         string      `json:"MaintenanceWindowStartTime,omitempty"`
}

UpdateService - HTTP push URI apply time payload.

type HttpPushUriOptions

type HttpPushUriOptions struct {
	HttpPushUriApplyTime *HttpPushUriApplyTime `json:"HttpPushUriApplyTime,omitempty"`
}

UpdateService - HTTP push URI options payload.

type IPv4Address

type IPv4Address struct {
	Address       string `json:"Address"`
	AddressOrigin string `json:"AddressOrigin"`
	Gateway       string `json:"Gateway"`
	SubnetMask    string `json:"SubnetMask"`
}

An IPv4 address, e.g. as found in EthernetInterface

type IPv6Address

type IPv6Address struct {
	Address       string      `json:"Address"`
	AddressOrigin string      `json:"AddressOrigin"`
	AddressState  string      `json:"AddressState"`
	PrefixLength  json.Number `json:"PrefixLength"`
}

An IPv6 address, e.g. as found in EthernetInterface

type IPv6StaticAddress

type IPv6StaticAddress struct {
	Address      string      `json:"Address"`
	PrefixLength json.Number `json:"PrefixLength"`
}

A static IPv4 address, e.g. as found in EthernetInterface

type Identifier

type Identifier struct {
	DurableName       string `json:"DurableName"`
	DurableNameFormat string `json:"DurableNameFormat"` // Enum
}

Identifier

Resource type.  Appears under various schemas

type InventoryData

type InventoryData struct {
	Ordinal        int    `json:"Ordinal"`
	RawOrdinal     int    `json:"-"`
	Status         string `json:"Status"`
	State          string `json:"State"`
	Flag           string `json:"Flag"`
	Arch           string `json:"Arch"`
	NetType        string `json:"NetType"`
	DefaultRole    string `json:"DefaultRole"`
	DefaultSubRole string `json:"DefaultSubRole"`
	DefaultClass   string `json:"DefaultClass"`
	FRUID          string `json:"FRUID"`
	Subtype        string `json:"Subtype"` // HMS Subtype, NYI
}

type Location

type Location struct {
	ContactInfo   *ContactInfo   `json:"ContactInfo,omitempty"`
	Latitude      json.Number    `json:"Latitude,omitempty"`
	Longitude     json.Number    `json:"Longitude,omitempty"`
	PartLocation  *PartLocation  `json:"PartLocation,omitempty"`
	Placement     *Placement     `json:"Placement,omitempty"`
	PostalAddress *PostalAddress `json:"PostalAddress,omitempty"`
}

Location

Resource type. Appears under Chassis, PowerDistribution, etc.

type Manager

type Manager struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	Actions *ManagerActions `json:"Actions,omitempty"`

	// Embedded structs.
	ManagerLocationInfoRF
	ManagerFRUInfoRF

	PowerState            string   `json:"PowerState"`
	ServiceEntryPointUUID string   `json:"ServiceEntryPointUUID"`
	UUID                  string   `json:"UUID"`
	Status                StatusRF `json:"Status"`

	EthernetInterfaces ResourceID `json:"EthernetInterfaces"`
	NetworkProtocol    ResourceID `json:"NetworkProtocol"`
	LogServices        ResourceID `json:"LogServices"`
	SerialInterfaces   ResourceID `json:"SerialInterfaces"`
	VirtualMedia       ResourceID `json:"VirtualMedia"`

	Links ManagerLinks `json:"Links"`
}

JSON decoded struct returned from an entry in the BMC "Managers" collection

Example: /redfish/v1/Managers/iDRAC.Embedded.1

type ManagerAccount

type ManagerAccount struct {
	OContext    string `json:"@odata.context"`
	Oid         string `json:"@odata.id"`
	Otype       string `json:"@odata.type"`
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
	Enabled     *bool  `json:"Enabled,omitempty"`
	UserName    string `json:"UserName"`
	Password    string `json:"Password"`
	RoleId      string `json:"RoleId"`
	Locked      *bool  `json:"Locked,omitempty"`

	Links ManagerAccountLinks `json:"Links"`
}

An account on a Redfish endpoint. Needs to link to a valid Role, e.g. administrator, read-only, etc. Note password is always blank on GET, this is only used when creating or updating an account.

type ManagerAccountCollection

type ManagerAccountCollection GenericCollection

JSON decoded Account collection struct linked from Redfish "AccountService" Example: /redfish/v1/AccountService/Accounts

type ManagerAccountLinks struct {
	Role ResourceID `json:"Role"`
}

type ManagerActions

type ManagerActions struct {
	ManagerReset ActionReset        `json:"#Manager.Reset"`
	OEM          *ManagerActionsOEM `json:"Oem,omitempty"`
}

Redfish Manager sub-struct - Actions

type ManagerActionsOEM

type ManagerActionsOEM struct {
	ManagerFactoryReset *ActionFactoryReset `json:"#Manager.FactoryReset,omitempty"`
	CrayProcessSchedule *ActionNamed        `json:"#CrayProcess.Schedule,omitempty"`
}

Redfish Manager Actions - OEM sub-struct

type ManagerCollection

type ManagerCollection GenericCollection

JSON decoded collection struct returned from Redfish "Manager" Example: /redfish/v1/Managers

type ManagerFRUInfoRF

type ManagerFRUInfoRF struct {
	ManagerType  string `json:"ManagerType"`
	Model        string `json:"Model"`
	Manufacturer string `json:"Manufacturer"`
	PartNumber   string `json:"PartNumber"`
	SerialNumber string `json:"SerialNumber"`
}
type ManagerLinks struct {
	ManagerForChassis []ResourceID `json:"ManagerForChassis"`
	ManagerInChassis  ResourceID   `json:"ManagerInChassis"`
	ManagerForServers []ResourceID `json:"ManagerForServers"`
}

type ManagerLocationInfoRF

type ManagerLocationInfoRF struct {
	DateTime            string `json:"DateTime"`
	DateTimeLocalOffset string `json:"DateTimeLocalOffset"`
	Description         string `json:"Description"`
	FirmwareVersion     string `json:"FirmwareVersion"`
	Id                  string `json:"Id"`
	Name                string `json:"Name"`
}

type Memory

type Memory struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	MemoryLocationInfoRF
	MemoryFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from rf.Memory This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields consitiute the type specific fields in the HWInventory objects that are returned in response to queries.

type MemoryCollection

type MemoryCollection GenericCollection

JSON decoded collection struct returned from Redfish "Memory" Example: /redfish/v1/Systems/<system_id>/Memory

type MemoryFRUInfoRF

type MemoryFRUInfoRF struct {
	// Redfish pass-through from rf.Memory
	BaseModuleType    string      `json:"BaseModuleType,omitempty"`
	BusWidthBits      json.Number `json:"BusWidthBits,omitempty"`
	CapacityMiB       json.Number `json:"CapacityMiB"`
	DataWidthBits     json.Number `json:"DataWidthBits,omitempty"`
	ErrorCorrection   string      `json:"ErrorCorrection,omitempty"`
	Manufacturer      string      `json:"Manufacturer,omitempty"`
	MemoryType        string      `json:"MemoryType,omitempty"`
	MemoryDeviceType  string      `json:"MemoryDeviceType,omitempty"`
	OperatingSpeedMhz json.Number `json:"OperatingSpeedMhz"`
	PartNumber        string      `json:"PartNumber,omitempty"`
	RankCount         json.Number `json:"RankCount,omitempty"`
	SerialNumber      string      `json:"SerialNumber"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures)

type MemoryLocationInfoRF

type MemoryLocationInfoRF struct {
	// Redfish pass-through from rf.Memory
	Id             string           `json:"Id"`
	Name           string           `json:"Name"`
	Description    string           `json:"Description"`
	MemoryLocation MemoryLocationRF `json:"MemoryLocation"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures)

type MemoryLocationRF

type MemoryLocationRF struct {
	Socket           json.Number `json:"Socket"`
	MemoryController json.Number `json:"MemoryController"`
	Channel          json.Number `json:"Channel"`
	Slot             json.Number `json:"Slot"`
}

type Message

type Message struct {
	MessageId         string   `json:"MessageId"`
	Message           string   `json:"Message"`
	RelatedProperties []string `json:"RelatedProperties"`
	MessageArgs       []string `json:"MessageArgs"`
	Severity          string   `json:"Severity"`
	Resolution        string   `json:"Resolution"`
}

A Redfish "Message", given in tasks and message registries. Not the same as a LogEntry or EventRecord. Rather, EventRecords will contain a MessageId to look up a Message in the given registry of the given version for detailed information about what occurred, i.e. without actually packaging all of this info in each event.

There is a "Registries" link at the service root that has a link to message registries that may be specific to the implementation.

e.g. /redfish/v1/Registries -> /redfish/v1/Registries/Messages/En

"Standard" registries are available at:

http://redfish.dmtf.org/schemas/registries

For example: http://redfish.dmtf.org/schemas/registries/v1/Base.1.1.0.json

The MessageId format is registry.version.message.

e.g. Base.1.0.0.PropertyUnknown  (Standard Redfish Base schema)
     iDRAC.1.4.0.AMP0300         (via /redfish/v1/Registries/Messages/En)

type NAActionResetToDefault

type NAActionResetToDefault struct {
	Target string `json:"target"`
	Title  string `json:"title,omitempty"`
}

Redfish NetworkAdapter sub-struct - ResetToDefault

type NAActions

type NAActions struct {
	NetworkAdapterResetToDefault NAActionResetToDefault `json:"#NetworkAdapter.ResetSettingsToDefault"`
}

Redfish NetworkAdapter sub-struct - Actions

type NAController

type NAController struct {
	ControllerCapabilities NAControllerCapabilities `json:"ControllerCapabilities"`
	FirmwarePackageVersion string                   `json:"FirmwarePackageVersion,omitempty"`
	Links                  NAControllerLinks        `json:"Links"`
}

Redfish NetworkAdapter sub-struct - Controller

type NAControllerCapabilities

type NAControllerCapabilities struct {
	DataCenterBridging         NADataCenterBridging    `json:"DataCenterBridging"`
	NPIV                       NANPIV                  `json:"NPIV"`
	NetworkDeviceFunctionCount int                     `json:"NetworkDeviceFunctionCount,omitempty"`
	NetworkPortCount           int                     `json:"NetworkPortCount,omitempty"`
	VirtualizationOffload      NAVirtualizationOffload `json:"VirtualizationOffload"`
}

Redfish NetworkAdapter sub-struct - ControllerCapabilities

type NAControllerLinks struct {
	NetworkDeviceFunctions     []ResourceID `json:"NetworkDeviceFunctions"`
	NetworkDeviceFunctionCount int          `json:"NetworkDeviceFunctions@odata.count,omitempty"`
	NetworkPorts               []ResourceID `json:"NetworkPorts"`
	NetworkPortCount           int          `json:"NetworkPorts@odata.count,omitempty"`
	PCIeDevices                []ResourceID `json:"PCIeDevices"`
	PCIeDeviceCount            int          `json:"PCIeDevices@odata.count,omitempty"`
}

Redfish NetworkAdapter sub-struct - ControllerLinks

type NADataCenterBridging

type NADataCenterBridging struct {
	Capable bool `json:"Capable,omitempty"`
}

Redfish NetworkAdapter sub-struct - DataCenterBridging

type NAFRUInfoRF

type NAFRUInfoRF struct {
	Manufacturer string `json:"Manufacturer"`
	Model        string `json:"Model"`
	PartNumber   string `json:"PartNumber"`
	SKU          string `json:"SKU,omitempty"`
	SerialNumber string `json:"SerialNumber"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system.

type NALocationInfoRF

type NALocationInfoRF struct {
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU

type NANPIV

type NANPIV struct {
	MaxDeviceLogins int `json:"MaxDeviceLogins,omitempty"`
	MaxPortLogins   int `json:"MaxPortLogins,omitempty"`
}

Redfish NetworkAdapter sub-struct - NPIV

type NASRIOV

type NASRIOV struct {
	SRIOVVEPACapable bool `json:"SRIOVVEPACapable,omitempty"`
}

Redfish NetworkAdapter sub-struct - SRIOV

type NAVirtualFunction struct {
	DeviceMaxCount         int `json:"DeviceMaxCount,omitempty"`
	MinAssignmentGroupSize int `json:"MinAssignmentGroupSize,omitempty"`
	NetworkPortMaxCount    int `json:"NetworkPortMaxCount,omitempty"`
}

Redfish NetworkAdapter sub-struct - VirtualFunction

type NAVirtualizationOffload struct {
	SRIOV           NASRIOV           `json:"SRIOV"`
	VirtualFunction NAVirtualFunction `json:"VirtualFunction"`
}

Redfish NetworkAdapter sub-struct - VirtualizationOffload

type NetworkAdapter

type NetworkAdapter struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	NALocationInfoRF
	NAFRUInfoRF

	Actions                *NAActions     `json:"Actions,omitempty"`
	Controllers            []NAController `json:"Controllers,omitempty"`
	NetworkDeviceFunctions ResourceID     `json:"NetworkDeviceFunctions"`
	NetworkPorts           ResourceID     `json:"NetworkPorts"`
	Status                 *StatusRF      `json:"Status,omitempty"`
}

Redfish pass-through from Redfish "NetworkAdapter" This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields constitute the type specific fields in the HWInventory objects that are returned in response to queries.

type NetworkAdapterCollection

type NetworkAdapterCollection GenericCollection

JSON decoded collection struct returned from Redfish "NetworkAdapter" Example: /redfish/v1/Chassis/<chassis_id>/NetworkAdapters

type NodeAccelRiser

type NodeAccelRiser struct {
	Oid string `json:"@odata.id"`

	// Embedded structs.
	NodeAccelRiserLocationInfoRF
	NodeAccelRiserFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from Redfish "Assembly" This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields constitute the type specific fields in the HWInventory objects that are returned in response to queries.

type NodeAccelRiserFRUInfoRF

type NodeAccelRiserFRUInfoRF struct {
	//Manufacturer Info
	PhysicalContext        string             `json:"PhysicalContext"`
	Producer               string             `json:"Producer"`
	SerialNumber           string             `json:"SerialNumber"`
	PartNumber             string             `json:"PartNumber"`
	Model                  string             `json:"Model"`
	ProductionDate         string             `json:"ProductionDate"`
	Version                string             `json:"Version"`
	EngineeringChangeLevel string             `json:"EngineeringChangeLevel"`
	OEM                    *NodeAccelRiserOEM `json:"Oem,omitempty"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system.

type NodeAccelRiserLocationInfoRF

type NodeAccelRiserLocationInfoRF struct {
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures).

type NodeAccelRiserOEM

type NodeAccelRiserOEM struct {
	PCBSerialNumber string `json:"PCBSerialNumber"`
}

type OEMPowerInfo added in v1.30.9

type OEMPowerInfo struct {
	HPE *OEMPowerInfoHPE `json:"Hpe,omitempty"`
}

type OEMPowerInfoHPE added in v1.30.9

type OEMPowerInfoHPE struct {
	Links struct {
		AccPowerService ResourceID `json:"AccPowerService"`
	} `json:"Links"`
}

type Outlet

type Outlet struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// HwInv instance properties - Embedded struct
	OutletLocationInfo

	// HwInv durable FRU properties - Embedded struct
	OutletFRUInfo

	// Actions
	Actions *OutletActions `json:"Actions,omitempty"`

	// Current State (all enums)
	BreakerState string   `json:"BreakerState"`
	PowerState   string   `json:"PowerState"`
	Status       StatusRF `json:"Status"`
	IndicatorLED string   `json:"IndicatorLED"`

	// Sensors
	CurrentSensor           *SensorExcerpt      `json:"CurrentSensor,omitempty"`
	EnergySensor            *SensorExcerpt      `json:"EnergySensor,omitempty"`
	FrequencySensor         *SensorExcerpt      `json:"FrequencySensor,omitempty"`
	PowerSensor             *SensorPowerExcerpt `json:"PowerSensor,omitempty"`
	PolyPhaseCurrentSensors *Currents           `json:"PolyPhaseCurrentSensors,omitempty"`
	PolyPhaseEnergySensors  *EnergyReadings     `json:"PolyPhaseEnergySensors,omitempty"`
	PolyPhasePowerSensors   *PowerReadings      `json:"PolyPhasePowerSensors,omitempty"`
	PolyPhaseVoltageSensors *Voltages           `json:"PolyPhaseVoltageSensors,omitempty"`
	TemperatureSensor       *SensorExcerpt      `json:"TemperatureSensor,omitempty"`
	VoltageSensor           *SensorExcerpt      `json:"VoltageSensor,omitempty"`

	// Configuration
	PowerCycleDelaySeconds   json.Number `json:"PowerCycleDelaySeconds,omitempty"`
	PowerOnDelaySeconds      json.Number `json:"PowerOnDelaySeconds,omitempty"`
	PowerRestoreDelaySeconds json.Number `json:"PowerRestoreDelaySeconds,omitempty"`
	PowerRestorePolicy       string      `json:"PowerRestorePolicy,omitempty"`

	Oem *json.RawMessage `json:"Oem,omitempty"`

	// Links - if useful to continue inventory discovery
	Links OutletLinks `json:"Links"`
}

Redfish PDU Outlet

This represents an individual outlet on a PDU

Example: /redfish/v1/PowerEquipment/RackPDUs/1/Outlets/A1

type OutletActions

type OutletActions struct {
	PowerControl    *ActionPowerControl    `json:"#Outlet.PowerControl,omitempty"`
	ResetBreaker    *ActionResetBreaker    `json:"#Outlet.ResetBreaker,omitempty"`
	ResetStatistics *ActionResetStatistics `json:"#Outlet.ResetStatistics,omitempty"`
	OEM             *json.RawMessage       `json:"Oem,omitempty"`
}

Redfish Outlet Actions sub-struct

type OutletCollection

type OutletCollection GenericCollection

Collection of Outlets, i.e. linked to a PDU

type OutletFRUInfo

type OutletFRUInfo struct {
	NominalVoltage   string         `json:"NominalVoltage,omitempty"`
	OutletType       string         `json:"OutletType"` // Enum
	EnergySensor     *SensorExcerpt `json:"EnergySensor,omitempty"`
	FrequencySensor  *SensorExcerpt `json:"FrequencySensor,omitempty"`
	PhaseWiringType  string         `json:"PhaseWiringType,omitempty"` // Enum
	PowerEnabled     *bool          `json:"PowerEnabled,omitempty"`    // Can be powered?
	RatedCurrentAmps json.Number    `json:"RatedCurrentAmps,omitempty"`
	VoltageType      string         `json:"VoltageType,omitempty"` // Enum
}

Outlets do not have individual FRUs, PDUs do, but their properties are potentially important. This is FRU-dependent data for HwInventory Note: omits configurable parameters.

type OutletLinks struct {
	OEM           *json.RawMessage `json:"Oem,omitempty"`
	BranchCircuit ResourceID       `json:"BranchCircuit"`
}

Links for outlet

type OutletLocationInfo

type OutletLocationInfo struct {
	Id          string `json:"Id"`
	Description string `json:"Description"`
	Name        string `json:"Name"`
}

Outlets do not have individual FRUs, PDUs do, but their properties are potentially important. This is location-dependent data for HwInventory

type PartLocation

type PartLocation struct {
	LocationOrdinalValue json.Number `json:"LocationOrdinalValue,omitempty"`
	LocationType         string      `json:"LocationType"` //enum
	Orientation          string      `json:"Orientation"`  //enum
	Reference            string      `json:"Reference"`    //enum
	ServiceLabel         string      `json:"ServiceLabel"`
}

Within Location - PartLocation

type Placement

type Placement struct {
	AdditionalInfo  string      `json:"AdditionalInfo,omitempty"`
	Rack            string      `json:"Rack,omitempty"`
	RackOffset      json.Number `json:"RackOffset,omitempty"`
	RackOffsetUnits string      `json:"RackOffsetUnits,omitempty"`
	Row             string      `json:"Row,omitempty"`
}

type PostalAddress

type PostalAddress struct {
	Country    string `json:"Country"`
	Territory  string `json:"Territory"`
	City       string `json:"City"`
	Street     string `json:"Street"`
	Name       string `json:"Name"`
	PostalCode string `json:"PostalCode"`
	Building   string `json:"Building"`
	Floor      string `json:"Floor"`
	Room       string `json:"Room"`
}

Within Location - PostalAddress

type Power

type Power struct {
	OContext            string         `json:"@odata.context"`
	OCount              int            `json:"@odata.count"` // Oldest schemas use
	Oid                 string         `json:"@odata.id"`
	Otype               string         `json:"@odata.type"`
	Description         string         `json:"Description"`
	Name                string         `json:"Name"`
	Id                  string         `json:"Id"`
	PowerSupplies       []*PowerSupply `json:"PowerSupplies"`
	PowerSuppliesOCount int            `json:"PowerSupplies@odata.count"` // Most schemas
}

The Power type definition below is based on current L1 Power support, and does not have many of the fields defined in the DMTF Redfish Power 1.6.0 schema, specifically PowerControl. However, HSM does capture PowerControl info for ComputerSystems (Nodes), see ComponentSystemInfo definition.

type PowerControl

type PowerControl struct {
	ResourceID
	MemberId           string        `json:"MemberId,omitempty"`
	Name               string        `json:"Name,omitempty"`
	PowerCapacityWatts int           `json:"PowerCapacityWatts,omitempty"`
	OEM                *PwrCtlOEM    `json:"OEM,omitempty"`
	RelatedItem        []*ResourceID `json:"RelatedItem,omitempty"`
}

type PowerCtlInfo

type PowerCtlInfo struct {
	PowerURL string          `json:"PowerURL,omitempty"`
	PowerCtl []*PowerControl `json:"PowerControl,omitempty"`
}

type PowerDistribution

type PowerDistribution struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// Embedded structs - see below
	PowerDistributionLocationInfo
	PowerDistributionFRUInfo

	Actions *PowerDistributionActions `json:"Actions,omitempty"`
	OEM     *json.RawMessage          `json:"Oem,omitempty"`

	// These are all links to collections that point to the given type
	Alarms       ResourceID `json:"Alarms"`             // Alarms
	Branches     ResourceID `json:"Branches"`           // Circuits
	Feeders      ResourceID `json:"Feeders,omitempty"`  // Circuit
	Mains        ResourceID `json:"Mains"`              // Circuits
	Outlets      ResourceID `json:"Outlets"`            // Outlets
	OutletGroups ResourceID `json:"OutletGroups"`       // OutletGroups
	Subfeeds     ResourceID `json:"Subfeeds,omitempty"` // Circuits
	Metrics      ResourceID `json:"Metrics"`            // PowerDistributionMetrics
	Sensors      ResourceID `json:"Sensors,omitempty"`  // Sensors

	// Current State (all enums)
	PowerState string   `json:"PowerState"`
	Status     StatusRF `json:"Status"`
}

Redfish PowerDistribution

From DMTF: "This resource shall be used to represent a Power Distribution component or unit for a Redfish implementation."

Example: /redfish/v1/PowerEquipment/RackPDUs/1

type PowerDistributionActions

type PowerDistributionActions struct {
	OEM *json.RawMessage `json:"Oem,omitempty"`
}

Redfish PowerDistribution Actions sub-struct

type PowerDistributionCollection

type PowerDistributionCollection GenericCollection

Collection of PowerDistribution references (e.g. RackPDU)

type PowerDistributionFRUInfo

type PowerDistributionFRUInfo struct {
	AssetTag          string         `json:"AssetTag"`
	DateOfManufacture string         `json:"DateOfManufacture,omitempty"`
	EquipmentType     string         `json:"EquipmentType"`
	FirmwareVersion   string         `json:"FirmwareVersion"`
	HardwareRevision  string         `json:"HardwareRevision"`
	Manufacturer      string         `json:"Manufacturer"`
	Model             string         `json:"Model"`
	PartNumber        string         `json:"PartNumber"`
	SerialNumber      string         `json:"SerialNumber"`
	CircuitSummary    CircuitSummary `json:"CircuitSummary"`
}

Redfish fields from the PowerDistribution schema that go into HWInventoryByFRU. We capture them as an embedded struct within the full schema during inventory discovery.

type PowerDistributionLocationInfo

type PowerDistributionLocationInfo struct {
	Id          string    `json:"Id"`
	Description string    `json:"Description"`
	Name        string    `json:"Name"`
	UUID        string    `json:"UUID"`
	Location    *Location `json:Location,omitempty"`
}

Redfish fields from the PowerDistributionFRUInfo schema that go into HWInventoryByLocation. We capture them as an embedded struct within the full schema during inventory discovery.

type PowerEquipment

type PowerEquipment struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	Id          string `json:"Id"`
	Description string `json:"Description"`
	Name        string `json:"Name"`

	Status StatusRF `json:"Status"`

	Actions    *PowerEquipmentActions `json:"Actions,omitempty"`
	OemActions *json.RawMessage       `json:"OemActions,omitempty"`

	// These are all pointers to collections
	Alarms           ResourceID `json:"Alarms"`
	Generators       ResourceID `json:"Generators,omitempty"`
	FloorPDUs        ResourceID `json:"FloorPDUs"`
	PowerMeters      ResourceID `json:"PowerMeters,omitempty"`
	RackPDUs         ResourceID `json:"RackPDUs"`
	Rectifiers       ResourceID `json:"Rectifiers"`
	Sensors          ResourceID `json:"Sensors,omitempty"`
	Switchgear       ResourceID `json:"Switchgear,omitempty"`
	TransferSwitches ResourceID `json:"TransferSwitches"`
	UPSs             ResourceID `json:"UPSs"`
	VFDs             ResourceID `json:"VFDs,omitempty"`

	// Array of alarm objects
	TriggeredAlarms []Alarm `json:"TriggeredAlarms"`
	// Links to chassis/managers
	Links PowerEquipmentLinks `json:"Links"`
}

Redfish PowerEquipment

From DMTF: "This resource shall be used to represent the set of Power Equipment for a Redfish implementation."

Example: /redfish/v1/PowerEquipment

type PowerEquipmentActions

type PowerEquipmentActions struct {
	OEM *json.RawMessage `json:"Oem,omitempty"`
}

Actions for PowerEquipment - OEM only for now

type PowerEquipmentLinks struct {
	Chassis         []ResourceID `json:"Chassis"`
	ChassisOCount   int          `json:"Chassis@odata.count"`
	ManagedBy       []ResourceID `json:"ManagedBy"`
	ManagedByOCount int          `json:"ManagedBy@odata.count"`
}

PowerEquipment sub-struct - PowerEquipmentLinks

type PowerInfo

type PowerInfo struct {
	OEM          *OEMPowerInfo   `json:"Oem,omitempty"`
	PowerControl []*PowerControl `json:"PowerControl"`
}

Redfish when following the Power URI in a chassis

type PowerReadings

type PowerReadings struct {
	Line1ToLine2   *SensorPowerExcerpt `json:"Line1ToLine2,omitempty"`
	Line1ToNeutral *SensorPowerExcerpt `json:"Line1ToNeutral,omitempty"`
	Line2ToLine3   *SensorPowerExcerpt `json:"Line2ToLine3,omitempty"`
	Line2ToNeutral *SensorPowerExcerpt `json:"Line2ToNeutral,omitempty"`
	Line3ToLine1   *SensorPowerExcerpt `json:"Line3ToLine1,omitempty"`
	Line3ToNeutral *SensorPowerExcerpt `json:"Line3ToNeutral,omitempty"`
}

PowerReadings - Used in Outlet and Circuit Note: For all of these, we may only have one of the particular fields in a given resource.

type PowerSupply

type PowerSupply struct {
	Oid string `json:"@odata.id"`

	// Embedded structs.
	PowerSupplyLocationInfoRF
	PowerSupplyFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from Redfish "PowerSupply" This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields constitute the type specific fields in the HWInventory objects that are returned in response to queries.

type PowerSupplyFRUInfoRF

type PowerSupplyFRUInfoRF struct {
	//Manufacture Info
	Manufacturer       string `json:"Manufacturer"`
	SerialNumber       string `json:"SerialNumber"`
	Model              string `json:"Model"`
	PartNumber         string `json:"PartNumber"`
	PowerCapacityWatts int    `json:"PowerCapacityWatts"`
	PowerInputWatts    int    `json:"PowerInputWatts"`
	PowerOutputWatts   int    `json:"PowerOutputWatts"`
	PowerSupplyType    string `json:"PowerSupplyType"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures)

type PowerSupplyLocationInfoRF

type PowerSupplyLocationInfoRF struct {
	Name            string `json:"Name"`
	FirmwareVersion string `json:"FirmwareVersion"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU

type Processor

type Processor struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	// Embedded structs.
	ProcessorLocationInfoRF
	ProcessorFRUInfoRF

	Status StatusRF `json:"Status"`
}

Redfish pass-through from Redfish "Processor" This is the set of Redfish fields for this object that HMS understands and/or finds useful. Those assigned to either the *LocationInfo or *FRUInfo subfields consitiute the type specific fields in the HWInventory objects that are returned in response to queries.

type ProcessorCollection

type ProcessorCollection GenericCollection

JSON decoded collection struct returned from Redfish "Processors" Example: /redfish/v1/Systems/<system_id>/Processors

type ProcessorFRUInfoRF

type ProcessorFRUInfoRF struct {
	// Redfish pass-through from rf.Processor
	InstructionSet        string        `json:"InstructionSet"`
	Manufacturer          string        `json:"Manufacturer"`
	MaxSpeedMHz           json.Number   `json:"MaxSpeedMHz"`
	Model                 string        `json:"Model"`
	SerialNumber          string        `json:"SerialNumber"`
	PartNumber            string        `json:"PartNumber"`
	ProcessorArchitecture string        `json:"ProcessorArchitecture"`
	ProcessorId           ProcessorIdRF `json:"ProcessorId"`
	ProcessorType         string        `json:"ProcessorType"`
	TotalCores            json.Number   `json:"TotalCores"`
	TotalThreads          json.Number   `json:"TotalThreads"`
	Oem                   *ProcessorOEM `json:"Oem"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then link with it's current location i.e. an x-name. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures)

type ProcessorIdRF

type ProcessorIdRF struct {
	EffectiveFamily         string `json:"EffectiveFamily"`
	EffectiveModel          string `json:"EffectiveModel"`
	IdentificationRegisters string `json:"IdentificationRegisters"`
	MicrocodeInfo           string `json:"MicrocodeInfo"`
	Step                    string `json:"Step"`
	VendorID                string `json:"VendorID"`
}

type ProcessorLocationInfoRF

type ProcessorLocationInfoRF struct {
	// Redfish pass-through from rf.Processor
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
	Socket      string `json:"Socket"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures).

type ProcessorOEM

type ProcessorOEM struct {
	GBTProcessorOemProperty *GBTProcessorOem `json:"GBTProcessorOemProperty,omitempty"`
}

type PwrCtlOEM

type PwrCtlOEM struct {
	Cray *PwrCtlOEMCray `json:"Cray,omitempty"`
	HPE  *PwrCtlOEMHPE  `json:"HPE,omitempty"`
}

type PwrCtlOEMCray

type PwrCtlOEMCray struct {
	PowerIdleWatts  int           `json:"PowerIdleWatts,omitempty"`
	PowerLimit      *CrayPwrLimit `json:"PowerLimit,omitempty"`
	PowerResetWatts int           `json:"PowerResetWatts,omitempty"`
}

type PwrCtlOEMHPE added in v1.30.9

type PwrCtlOEMHPE struct {
	PowerLimit             CrayPwrLimit `json:"PowerLimit"`
	PowerRegulationEnabled bool         `json:"PowerRegulationEnabled"`
	Status                 string       `json:"Status"`
	Target                 string       `json:"Target"`
}

type PwrCtlRelatedItem

type PwrCtlRelatedItem struct {
	Oid string `json:"@odata.id"`
}

type RAParameter

type RAParameter struct {
	Name            string   `json:"Name"`
	AllowableValues []string `json:"AllowableValues"`
	DataType        string   `json:"DataType"`
	Required        bool     `json:"Required"`
}

RAParameter for the array of Reset actions

type RFControl added in v1.30.16

type RFControl struct {
	ControlDelaySeconds int      `json:"ControlDelaySeconds"`
	ControlMode         string   `json:"ControlMode"`
	ControlType         string   `json:"ControlType"`
	Id                  string   `json:"Id"`
	Name                string   `json:"Name"`
	PhysicalContext     string   `json:"PhysicalContext"`
	SetPoint            int      `json:"SetPoint"`
	SetPointUnits       string   `json:"SetPointUnits"`
	SettingRangeMax     int      `json:"SettingRangeMax"`
	SettingRangeMin     int      `json:"SettingRangeMin"`
	Status              StatusRF `json:"Status"`
}

type RawRedfishEP

type RawRedfishEP struct {
	ID             string `json:"ID"`
	Type           string `json:"Type"`
	Name           string `json:"Name"` // user supplied descriptive name
	Hostname       string `json:"Hostname"`
	Domain         string `json:"Domain"`
	FQDN           string `json:"FQDN"`
	Enabled        *bool  `json:"Enabled"`
	UUID           string `json:"UUID"`
	User           string `json:"User"`
	Password       string `json:"Password"`
	UseSSDP        *bool  `json:"UseSSDP"`
	MACRequired    *bool  `json:"MACRequired"`
	MACAddr        string `json:"MACAddr"`
	IPAddr         string `json:"IPAddress"`
	RediscOnUpdate *bool  `json:"RediscoverOnUpdate"`
	TemplateID     string `json:"TemplateID"`
}

This is a scan-friendly version of RedfishEndpoint that can be used to create or update an entry (or at least the writable fields set by the user). The redfish endpoint addresses can be given variously as hostname + domain, FQDN, or IP addresses. They are "preferred" in this order. If the hostname and domain are not provided, they will be obtained from the FQDN, however if the hostname is provided, the FQDN must match. If both hostname and domain are provided, they override any FQDN values or an error occurs.

TODO: In the future there will be some process to autmatically add these

for endpoints that advertise their presence, e.g. via SSDP, but we
will likely always need the ability to add manual endpoints that do
not.  Those that do advertise will likely just need a generic
identifier, e.g. a domain with no specific host info, or perhaps a
subnet.

func (RawRedfishEP) String

func (rrep RawRedfishEP) String() string

String function to redact passwords from any kind of output

type RawRedfishEPs

type RawRedfishEPs struct {
	RedfishEndpoints []RawRedfishEP `json:"RedfishEndpoints"`
}

JSON-friendly array of RawRedfishEP entries

type RedfishEP

type RedfishEP struct {
	// Embedded struct
	RedfishEPDescription

	ServiceRootURL string `json:"serviceRootURL"` // URL of root service
	RedfishType    string `json:"redfishType"`    // i.e. ServiceRoot
	IPaddr         string `json:"ipaddr"`
	OdataID        string `json:"odataID"` // i.e. /redfish/v1

	ServiceRootRF  ServiceRoot       `json:"serviceRootRF"`
	NumChassis     int               `json:"numChassis"`
	NumManagers    int               `json:"numManagers"`
	NumSystems     int               `json:"numSystems"`
	NumRackPDUs    int               `json:"numRackPDUs"`
	AccountService *EpAccountService `json:"accountService"`
	SessionService *EpSessionService `json:"sessionService"`
	EventService   *EpEventService   `json:"eventService"`
	TaskService    *EpTaskService    `json:"taskService"`
	UpdateService  *EpUpdateService  `json:"updateService"`
	Chassis        EpChassisSet      `json:"chassis"`
	Managers       EpManagers        `json:"managers"`
	Systems        EpSystems         `json:"systems"`
	RackPDUs       EpPDUs            `json:"rackpdus"`
	// contains filtered or unexported fields
}

This is the endpoint structure generated from a base RedfishEPDescription. It is used to facilitate connections to the endpoints and is is used to discover top-level resources (e.g. systems) so that they can be discovered in more details with routines appropriate to each type.

func NewRedfishEp

func NewRedfishEp(rep *RedfishEPDescription) (*RedfishEP, error)

Create RedfishEP struct from a validated RedfishEndpointDescription. The description would be generated from user-supplied RawEndpoints and/or retrieved from the database. The RedfishEP struct is set up based on the description to conduct queries of the remote endpoint and to store the raw data retrieved from it.

func (*RedfishEP) CheckPrePhase1

func (ep *RedfishEP) CheckPrePhase1() error

Checks any fields that must be set in order to properly query the endpoint and organize and name subcomponents afterwards.

func (*RedfishEP) GETRelative

func (ep *RedfishEP) GETRelative(rpath string) (json.RawMessage, error)

GET the page at the given rpath relative to the redfish hostname of the given endpoint, e.g. /redfish/v1/Systems/System.Embedded.1. Keeping with Redfish style there should always be a leading slash and the "/redfish/v1" part should presumably always be present in the rpath (as the odata.id always includes this).

If no error results, result should be the raw body (i.e. Redfish JSON). returned. This is the starting point for decoding the JSON into a particular structure (i.e. given the resource's schema, or into a generic interface{} map.

func (*RedfishEP) GetRootInfo

func (ep *RedfishEP) GetRootInfo()

For a given Redfish endpoint, get top-level information, i.e. how many systems, chassis, managers, etc. and initalize these structures so can be discovered in more detail.

func (*RedfishEP) GetSystems

func (ep *RedfishEP) GetSystems() string

func (*RedfishEP) VerifySystems

func (ep *RedfishEP) VerifySystems() error

type RedfishEPDescription

type RedfishEPDescription struct {
	ID             string        `json:"ID"`
	Type           string        `json:"Type"`
	Name           string        `json:"Name,omitempty"` // user supplied descriptive name
	Hostname       string        `json:"Hostname"`
	Domain         string        `json:"Domain"`
	FQDN           string        `json:"FQDN"`
	Enabled        bool          `json:"Enabled"`
	UUID           string        `json:"UUID,omitempty"`
	User           string        `json:"User"`
	Password       string        `json:"Password"` // Temporary until more secure method
	UseSSDP        bool          `json:"UseSSDP,omitempty"`
	MACRequired    bool          `json:"MACRequired,omitempty"`
	MACAddr        string        `json:"MACAddr,omitempty"`
	IPAddr         string        `json:"IPAddress,omitempty"`
	RediscOnUpdate bool          `json:"RediscoverOnUpdate"`
	TemplateID     string        `json:"TemplateID,omitempty"`
	DiscInfo       DiscoveryInfo `json:"DiscoveryInfo"`
}

func NewRedfishEPDescription

func NewRedfishEPDescription(rep *RawRedfishEP) (*RedfishEPDescription, error)

Create RedfishEPDescription from unvalidated input, e.g. provided by the user. Fields that were omitted can be populated with default values.

func (RedfishEPDescription) String

func (red RedfishEPDescription) String() string

String function to redact passwords from any kind of output

type RedfishEPDescriptions

type RedfishEPDescriptions struct {
	RfEPDescriptions []RedfishEPDescription
}

func NewRedfishEPDescriptions

func NewRedfishEPDescriptions(reps *RawRedfishEPs) (*RedfishEPDescriptions, error)

Create RedfishEPDescriptions struct from raw input from decoded RawEndpoints struct, e.g. from a JSON file or POST body.

type RedfishEPs

type RedfishEPs struct {
	Num int                   `json:"num"`
	IDs map[string]*RedfishEP `json:"ids"`
	// contains filtered or unexported fields
}

Set of RedfishEP, struct representing a root-level RF endpoint in system.

func NewRedfishEps

func NewRedfishEps(epds *RedfishEPDescriptions) (*RedfishEPs, error)

Create RedfishEPs structs from a set of validated RedfishEndpointDescriptions.

func (*RedfishEPs) GetAllRootInfo

func (eps *RedfishEPs) GetAllRootInfo()

Loop through all endpoints to get top-level information, i.e. how many systems, etc. and initalize these structures so they can be discovered in more detail.

Note this is done in parallel, each RedfishEP in a separate thread. Each RedfishEP structure should not share any data with the others so little synchronization is needed. We could conceivably speed things up more by parallelizing the individual page gets, but that would have to be done a bit more carefully and for now this should be fast enough.

type RedfishError

type RedfishError struct {
	Error RedfishErrorContents `json:"error"`
}

RedfishError - Contains an error payload from a Redfish service. Error - Contains properties used to describe an error from a Redfish Service. Schemas are available at:

https://redfish.dmtf.org/redfish/schema_index

redfish-error: https://redfish.dmtf.org/schemas/redfish-error.v1_0_0.json

type RedfishErrorContents

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

RedfishErrorContents - Contains properties used to describe an error from a Redfish Service. Code - A string indicating a specific MessageId from the message registry. Message - A human-readable error message corresponding to the message in the message registry. ExtendedInfo - An array of message objects describing one or more error message(s). Schemas are available at:

https://redfish.dmtf.org/redfish/schema_index

redfish-error: https://redfish.dmtf.org/schemas/redfish-error.v1_0_0.json

type ResetActionInfo

type ResetActionInfo struct {
	ID           string        `json:"Id"`
	RAParameters []RAParameter `json:"Parameters"`
	Name         string        `json:"Name"`
}

ResetActionInfo contains a list of parameters for a Redfish ResetAction

type ResourceID

type ResourceID struct {
	Oid string `json:"@odata.id"`
}

Resource link, often found in collection array or "Links" section.

Example: {
               "@odata.id": "/redfish/v1/Systems/System.Embedded.1"
         }

func (*ResourceID) Basename

func (r *ResourceID) Basename() string

Get Redfish ID portion of URI, i.e. the basename of the string

type ResourceIDSlice

type ResourceIDSlice []ResourceID

For sort interface, wraps []ResourceID

func (ResourceIDSlice) Len

func (rs ResourceIDSlice) Len() int

For sort interface, length function

func (ResourceIDSlice) Less

func (rs ResourceIDSlice) Less(i, j int) bool

For sort interface, comparison operation

func (ResourceIDSlice) Swap

func (rs ResourceIDSlice) Swap(i, j int)

For sort interface, swaps at indexes

type Role

type Role struct {
	OContext           string   `json:"@odata.context"`
	Oid                string   `json:"@odata.id"`
	Otype              string   `json:"@odata.type"`
	Id                 string   `json:"Id"`
	Name               string   `json:"Name"`
	Description        string   `json:"Description"`
	IsPredefined       *bool    `json:"IsPredefined,omitempty"`
	AssignedPrivileges []string `json:"AssignedPrivileges"`
	OemPrivileges      []string `json:"OemPrivileges"`
}

A type of account on a Redfish endpoint. Maybe be "built-in" or some custom type defined by the administrator. Each ManagerAccount is linked to a role.

type RoleCollection

type RoleCollection GenericCollection

JSON decoded Role collection struct linked from Redfish "AccountService" Example: /redfish/v1/AccountService/Roles

type Sensor

type Sensor struct {
	OContext string `json:"@odata.context"`
	Oid      string `json:"@odata.id"`
	Otype    string `json:"@odata.type"`

	Id          string    `json:"Id"`
	Description string    `json:"Description"`
	Name        string    `json:"Name"`
	Location    *Location `json:Location,omitempty"`

	Actions                            SensorActions    `json:"Actions,omitempty"`
	Accuracy                           json.Number      `json:"Accuracy,omitempty"`
	AdjustedMaxAllowableOperatingValue json.Number      `json:"AdjustedMaxAllowableOperatingValue,omitempty"`
	AdjustedMinAllowableOperatingValue json.Number      `json:"AdjustedMinAllowableOperatingValue,omitempty"`
	ApparentVA                         json.Number      `json:"ApparentVA,omitempty"`
	ElectricalContext                  string           `json:"ElectricalContext"` // enum
	LoadPercent                        json.Number      `json:"LoadPercent,omitempty"`
	MaxAllowableOperatingValue         json.Number      `json:"MaxAllowableOperatingValue,omitempty"`
	MinAllowableOperatingValue         json.Number      `json:"MinAllowableOperatingValue,omitempty"`
	OEM                                *json.RawMessage `json:"Oem,omitempty"`
	PeakReading                        json.Number      `json:"PeakReading,omitempty"`
	PeakReadingTime                    string           `json:"PeakReadingtime,omitempty"`
	PowerFactor                        json.Number      `json:"PowerFactor,omitempty"`
	PhysicalContext                    string           `json:"PhysicalContext,omitempty"`    //enum
	PhysicalSubContext                 string           `json:"PhysicalSubContext,omitempty"` //enum
	Precision                          json.Number      `json:"Precision,omitempty"`
	ReactiveVAR                        json.Number      `json:"ReactiveVAR,omitempty"`
	Reading                            json.Number      `json:"Reading,omitempty"`
	ReadingRangeMax                    json.Number      `json:"ReadingRangeMax,omitempty"`
	ReadingRangeMin                    json.Number      `json:"ReadingRangeMin,omitempty"`
	ReadingType                        string           `json:"ReadingType,omitempty"` //enum
	ReadingUnits                       string           `json:"ReadingUnits,omitempty"`
	Status                             StatusRF         `json:"Status,omitempty"`
	SensingFrequency                   json.Number      `json:"SensingFrequency,omitempty"`
	SensorResetTime                    json.Number      `json:"SensorResetTime,omitempty"`
	Thresholds                         *Thresholds      `json:"Thresholds,omitempty"`
	VoltageType                        string           `json:"VoltageType,omitempty"` // enum
}

Sensor

From the DMTF: "This resource shall be used to represent resources that represent the sensor data."

Example: /redfish/v1/PowerEquipment/RackPDUs/1/Sensors/FrequencyA1

type SensorActions

type SensorActions struct {
	ResetStatistics ActionResetStatistics `json:"#Sensor.ResetStatistics,omitempty"`
	OEM             *json.RawMessage      `json:"Oem,omitempty"`
}

Redfish Sensor Actions sub-struct

type SensorExcerpt

type SensorExcerpt struct {
	DataSourceUri      string      `json:"DataSourceUri"`
	Name               string      `json:"Name"`
	PeakReading        json.Number `json:"PeakReading,omitempty"`
	PhysicalContext    string      `json:"PhysicalContext,omitempty"`    //enum
	PhysicalSubContext string      `json:"PhysicalSubContext,omitempty"` //enum
	Reading            json.Number `json:"Reading,omitempty"`
	ReadingUnits       string      `json:"ReadingUnits,omitempty"`
	Status             StatusRF    `json:"Status,omitempty"`
}

SensorExcerpt - Substruct of Outlet and other power-related objects This is the more general non-power version of SensorPowerExcerpt

type SensorPowerExcerpt

type SensorPowerExcerpt struct {
	ApparentVA         json.Number `json:"ApparentVA,omitempty"`
	DataSourceUri      string      `json:"DataSourceUri"`
	LoadPercent        json.Number `json:"LoadPercent,omitempty"`
	Name               string      `json:"Name"`
	PeakReading        json.Number `json:"PeakReading,omitempty"`
	PowerFactor        json.Number `json:"PowerFactor,omitempty"`
	PhysicalContext    string      `json:"PhysicalContext,omitempty"`    //enum
	PhysicalSubContext string      `json:"PhysicalSubContext,omitempty"` //enum
	ReactiveVAR        json.Number `json:"ReactiveVAR,omitempty"`
	Reading            json.Number `json:"Reading,omitempty"`
	ReadingUnits       string      `json:"ReadingUnits,omitempty"`
	Status             StatusRF    `json:"Status,omitempty"`
}

SensorPowerExcerpt - Substruct of Outlet and other power-related objects From DMTF: "This resource shall be used to represent resources that represent the sensor data."

type SensorsCollection

type SensorsCollection GenericCollection

Collection of Sensors, i.e. linked to a parent component, e.g. PDU

type SerialInterfaceCollection

type SerialInterfaceCollection GenericCollection

JSON decoded collection struct of Redfish type "SerialInterfaceCollection" Example: /redfish/v1/Managers/<manager_id>/SerialInterfaces

type ServiceDescription

type ServiceDescription struct {
	RfEndpointID   string `json:"RedfishEndpointID"` // Key
	RedfishType    string `json:"RedfishType"`       // Key
	RedfishSubtype string `json:"RedfishSubtype,omitempty"`
	UUID           string `json:"UUID"`
	OdataID        string `json:"OdataID"`
}

Struct to be embedded in Redfish service objects. These are the key fields in the storage schema.

type ServiceRoot

type ServiceRoot struct {
	OContext       string `json:"@odata.context"`
	Oid            string `json:"@odata.id"`
	Otype          string `json:"@odata.type"`
	Name           string `json:"Name"`
	Description    string `json:"Description"`
	RedfishVersion string `json:"RedfishVersion"`
	UUID           string `json:"UUID"`

	Systems        ResourceID `json:"Systems"`
	Chassis        ResourceID `json:"Chassis"`
	Managers       ResourceID `json:"Managers"`
	Tasks          ResourceID `json:"Tasks"` // Actually points to "TaskService"
	SessionService ResourceID `json:"SessionService"`
	AccountService ResourceID `json:"AccountService"`
	EventService   ResourceID `json:"EventService"`
	UpdateService  ResourceID `json:"UpdateService"`
	Registries     ResourceID `json:"Registries"`

	// PDU stuff
	PowerEquipment    ResourceID `json:"PowerEquipment"`
	PowerDistribution ResourceID `json:"PowerDistribution"`

	Links ServiceRootLinks `json:"Links"`
}
type ServiceRootLinks struct {
	Sessions ResourceID `json:"Sessions"`
}

Redfish ServiceRoot - Links section

type Session

type Session struct {
	OContext    string `json:"@odata.context"`
	Oid         string `json:"@odata.id"`
	Otype       string `json:"@odata.type"`
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
	UserName    string `json:"UserName"`
}

A session that has been created via the session service.

type SessionCollection

type SessionCollection GenericCollection

JSON decoded collection struct returned from Redfish "SessionService" There is also a pointer in the system root under "Links" Example: /redfish/v1/SessionService/Sessions

type SessionService

type SessionService struct {
	OContext       string      `json:"@odata.context"`
	Oid            string      `json:"@odata.id"`
	Otype          string      `json:"@odata.type"`
	Id             string      `json:"Id"`
	Name           string      `json:"Name"`
	Status         StatusRF    `json:"Status"`
	ServiceEnabled *bool       `json:"ServiceEnabled,omitempty"`
	SessionTimeout json.Number `json:"SessionTimeout"`

	Sessions ResourceID `json:"Sessions"`
}

Redfish session service. This is the top-level object linked via the service root. It provides information about the session service and links to the set of active sessions. Note that there should also be a direct link from the service root as it is the only part of the root that is available without authentication.

type SimpleStorageCollection

type SimpleStorageCollection GenericCollection

JSON decoded collection struct returned from Redfish "SimpleStorage" Example: /redfish/v1/Systems/<system_id>/SimpleStorage

type StateRF

type StateRF string

Redfish "State" Enum

type StatusRF

type StatusRF struct {
	Health       HealthRF `json:"Health"`
	HealthRollUp HealthRF `json:"HealthRollUp,omitempty"`
	State        StateRF  `json:"State,omitempty"`
}

Status struct, used in many places.

type Storage

type Storage GenericCollection

JSON decoded collection struct returned from Redfish "Storage" Example: /redfish/v1/Systems/<system_id>/Storage

type StorageCollection

type StorageCollection struct {
	OContext     string       `json:"@odata.context"`
	OCount       int          `json:"@odata.count"` // Oldest schemas use
	Oid          string       `json:"@odata.id"`
	Otype        string       `json:"@odata.type"`
	Description  string       `json:"Description"`
	Name         string       `json:"Name"`
	Drives       []ResourceID `json:"Drives"`
	DrivesOCount int          `json:"Drives@odata.count"` // Most schemas
}

JSON decoded struct returned from Redfish for a particular set of ids. Storage Collection resources deviate from GenericCollections by by using the Drives array and Drives count fields instead of a Members array and Members count fields. Example: /redfish/v1/Systems/<system_id>/Storage/<storage_collection_id>

type SystemCollection

type SystemCollection GenericCollection

JSON decoded collection struct returned from Redfish "Systems" Example: /redfish/v1/Systems

type SystemFRUInfoRF

type SystemFRUInfoRF struct {
	// Redfish pass-through from Redfish ComputerSystem
	AssetTag     string `json:"AssetTag"`
	BiosVersion  string `json:"BiosVersion"`
	Model        string `json:"Model"`
	Manufacturer string `json:"Manufacturer"`
	PartNumber   string `json:"PartNumber"`
	SerialNumber string `json:"SerialNumber"`
	SKU          string `json:"SKU"`
	SystemType   string `json:"SystemType"`
	UUID         string `json:"UUID"`
}

Durable Redfish properties to be stored in hardware inventory as a specific FRU, which is then (typically) associated with a location i.e. an x-name in HMS terms and the ProcessorLocationInfo fields in Redfish terms on the controller. These properties should follow the hardware and allow it to be tracked even when it is removed from the system. TODO: How to version these (as HMS structures).

type SystemLocationInfoRF

type SystemLocationInfoRF struct {
	// Redfish pass-through from Redfish ComputerSystem
	Id          string `json:"Id"`
	Name        string `json:"Name"`
	Description string `json:"Description"`
	Hostname    string `json:"HostName"`

	ProcessorSummary ComputerSystemProcessorSummary `json:"ProcessorSummary"`

	MemorySummary ComputerSystemMemorySummary `json:"MemorySummary"`
}

Location-specific Redfish properties to be stored in hardware inventory These are only relevant to the currently installed location of the FRU TODO: How to version these (as HMS structures).

type Task

type Task struct {
	OContext   string `json:"@odata.context"`
	Oid        string `json:"@odata.id"`
	Otype      string `json:"@odata.type"`
	Id         string `json:"Id"`
	Name       string `json:"Name"`
	TaskState  string `json:"TaskState"`
	StartTime  string `json:"StartTime"`
	EndTime    string `json:"EndTime"`
	TaskStatus string `json:"TaskStatus"`

	Messages []Message `json:"Messages"`
}

A Redfish task, via the Redfish TaskService

type TaskCollection

type TaskCollection GenericCollection

JSON decoded task subscription struct linked from Redfish "TaskService" Example: /redfish/v1/TaskService/Subscriptions

type TaskService

type TaskService struct {
	OContext                        string   `json:"@odata.context"`
	Oid                             string   `json:"@odata.id"`
	Otype                           string   `json:"@odata.type"`
	Id                              string   `json:"Id"`
	Name                            string   `json:"Name"`
	Status                          StatusRF `json:"Status"`
	ServiceEnabled                  *bool    `json:"ServiceEnabled,omitempty"`
	DateTime                        string   `json:"DateTime"`
	CompletedTaskOverWritePolicy    string   `json:"CompletedTaskOverWritePolicy"`
	LifeCycleEventOnTaskStateChange *bool    `json:"LifeCycleEventOnTaskStateChange"`

	Tasks ResourceID `json:"Tasks"`
}

Redfish task service. This is the top-level object linked via the service root. It provides information about the task service and links to the set of active tasks.

type Threshold

type Threshold struct {
	Activation string      `json:"Activation"` // enum
	DwellTime  string      `json:"DwellTime"`
	Reading    json.Number `json:"Reading,omitempty"`
}

Sub-struct of Sensor - Threshold

type Thresholds

type Thresholds struct {
	LowerCaution  Threshold `json:LowerCaution"`
	LowerCritical Threshold `json:LowerCritical"`
	LowerFatal    Threshold `json:LowerFatal"`
	UpperCaution  Threshold `json:UpperCaution"`
	UpperCritical Threshold `json:UpperCritical"`
	UpperFatal    Threshold `json:UpperFatal"`
}

Sub-struct of Sensor - Thresholds

type UpdateService

type UpdateService struct {
	OContext          string      `json:"@odata.context"`
	Oetag             string      `json:"@odata.etag,omitempty"`
	Oid               string      `json:"@odata.id"`
	Otype             string      `json:"@odata.type"`
	Id                string      `json:"Id"`
	Name              string      `json:"Name"`
	Status            *StatusRF   `json:"Status,omitempty"`
	ServiceEnabled    *bool       `json:"ServiceEnabled,omitempty"`
	FirmwareInventory *ResourceID `json:"FirmwareInventory,omitempty"`
	SoftwareInventory *ResourceID `json:"SoftwareInventory,omitempty"`

	Actions UpdateServiceActions `json:"Actions"`

	HttpPushUri            string              `json:"HttpPushUri,omitempty"`
	HttpPushUriOptions     *HttpPushUriOptions `json:"HttpPushUriOptions,omitempty"`
	HttpPushUriOptionsBusy *bool               `json:"HttpPushUriOptionsBusy,omitempty"`
	HttpPushUriTargets     []string            `json:"HttpPushUriTargets,omitempty"`
	HttpPushUriTargetsBusy *bool               `json:"HttpPushUriTargetsBusy,omitempty"`
}

Redfish update service. This is the top-level object linked via the service root. It gives information of the allowed actions and push URI configuration. It also links to the available inventories.

type UpdateServiceActions

type UpdateServiceActions struct {
	SimpleUpdate *ActionSimpleUpdate `json:"#UpdateService.SimpleUpdate,omitempty"`
}

UpdateService - Actions defined by Redfish for this type

type VLAN

type VLAN struct {
	VLANEnable *bool       `json:"VLANEnable,omitempty"`
	VLANid     json.Number `json:"VLANid"`
}

A VLAN definition, e.g. as found in EthernetInterface. This will not be used in the case where multiple VLANs exist. An entry in the Links section will list these in the latter case.

type Voltages

type Voltages struct {
	Line1ToLine2   *SensorExcerpt `json:"Line1ToLine2,omitempty"`
	Line1ToNeutral *SensorExcerpt `json:"Line1ToNeutral,omitempty"`
	Line2ToLine3   *SensorExcerpt `json:"Line2ToLine3,omitempty"`
	Line2ToNeutral *SensorExcerpt `json:"Line2ToNeutral,omitempty"`
	Line3ToLine1   *SensorExcerpt `json:"Line3ToLine1,omitempty"`
	Line3ToNeutral *SensorExcerpt `json:"Line3ToNeutral,omitempty"`
}

Voltages - Used in Outlet and Circuit

Jump to

Keyboard shortcuts

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