redfishapi

package
v0.0.0-...-44af468 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BeautifyJSON

func BeautifyJSON(raw string) (string, error)

func DumpObj

func DumpObj(obj interface{})

Types

type Chassis

type Chassis struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	// AssetTag shall contain an identifying string that
	// tracks the chassis for inventory purposes.
	AssetTag string
	// ChassisType shall indicate the physical form factor
	// for the type of chassis.
	ChassisType ChassisType
	// Description provides a description of this resource.
	Description string
	// Location shall contain location information of the
	// associated chassis.
	Location common.Location
	// Manufacturer shall contain the name of the
	// organization responsible for producing the chassis. This organization
	// might be the entity from whom the chassis is purchased, but this is
	// not necessarily true.
	Manufacturer string
	// Model shall contain the name by which the
	// manufacturer generally refers to the chassis.
	Model string
	// PartNumber shall contain a part number assigned by
	// the organization that is responsible for producing or manufacturing
	// the chassis.
	PartNumber string
	// PowerState shall contain the power state of the
	// chassis.
	PowerState string
	SKU        string
	// SerialNumber shall contain a manufacturer-allocated
	// number that identifies the chassis.
	SerialNumber string
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
	// UUID shall contain the universal unique identifier
	// number for this chassis.
	UUID string
	// contains filtered or unexported fields
}

Chassis represents the physical components of a system. This resource represents the sheet-metal confined spaces and logical zones such as racks, enclosures, chassis and all other containers. Subsystems (like sensors) that operate outside of a system's data plane (meaning the resources are not accessible to software running on the system) are linked either directly or indirectly through this resource.

func GetChassis

func GetChassis(c common.Client, uri string) (*Chassis, error)

GetChassis will get a Chassis instance from the Redfish service.

func ListReferencedChassis

func ListReferencedChassis(c common.Client, link string) ([]*Chassis, error)

ListReferencedChassis gets the collection of Chassis from a provided reference.

func (*Chassis) Power

func (chassis *Chassis) Power() (*Power, error)

Power gets the power information for the chassis

func (*Chassis) Thermal

func (chassis *Chassis) Thermal() (*Thermal, error)

Thermal gets the thermal temperature and cooling information for the chassis

func (*Chassis) UnmarshalJSON

func (chassis *Chassis) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Chassis object from the raw JSON.

func (*Chassis) Update

func (chassis *Chassis) Update() error

Update commits updates to this object's properties to the running system.

type ChassisType

type ChassisType string

ChassisType is a physical form of the chassis

const (
	// BladeChassisType is an enclosed or semi-enclosed, typically vertically-oriented, system
	// chassis which must be plugged into a multi-system chassis to function normally.
	BladeChassisType ChassisType = "Blade"
	// CardChassisType is a loose device or circuit board intended to be installed in a system
	// or other enclosure.
	CardChassisType ChassisType = "Card"
	// CartridgeChassisType is a small self-contained system intended to be plugged into a multi-system
	// chassis.
	CartridgeChassisType ChassisType = "Cartridge"
	// ComponentChassisType is a small chassis, card, or device which contains devices for a particular
	// subsystem or function.
	ComponentChassisType ChassisType = "Component"
	// DrawerChassisType is an enclosed or semi-enclosed, typically horizontally-oriented, system
	// chassis which may be slid into a multi-system chassis.
	DrawerChassisType ChassisType = "Drawer"
	// EnclosureChassisType is a generic term for a chassis that does not fit any other description.
	EnclosureChassisType ChassisType = "Enclosure"
	// ExpansionChassisType is a chassis which expands the capabilities or capacity of another
	// chassis.
	ExpansionChassisType ChassisType = "Expansion"
	// IPBasedDriveChassisType is a chassis in a drive form factor with IP-based network connections.
	IPBasedDriveChassisType ChassisType = "IPBasedDrive"
	// ModuleChassisType is a small, typically removable, chassis or card which contains devices
	// for a particular subsystem or function.
	ModuleChassisType ChassisType = "Module"
	// OtherChassisType is a chassis that does not fit any of these definitions.
	OtherChassisType ChassisType = "Other"
	// PodChassisType is a collection of equipment racks in a large, likely transportable, container.
	PodChassisType ChassisType = "Pod"
	// RackChassisType is an equipment rack, typically a 19-inch wide freestanding unit.
	RackChassisType ChassisType = "Rack"
	// RackGroupChassisType is a group of racks which form a single entity or share infrastructure.
	RackGroupChassisType ChassisType = "RackGroup"
	// RackMountChassisType is a single system chassis designed specifically for mounting in an
	// equipment rack.
	RackMountChassisType ChassisType = "RackMount"
	// RowChassisType is a collection of equipment racks.
	RowChassisType ChassisType = "Row"
	// ShelfChassisType is an enclosed or semi-enclosed, typically horizontally-oriented, system
	// chassis which must be plugged into a multi-system chassis to function normally.
	ShelfChassisType ChassisType = "Shelf"
	// SidecarChassisType is a chassis that mates mechanically with another chassis to expand
	// its capabilities or capacity.
	SidecarChassisType ChassisType = "Sidecar"
	// SledChassisType is an enclosed or semi-enclosed, system chassis which must be plugged into
	// a multi-system chassis to function normally similar to a blade type chassis.
	SledChassisType ChassisType = "Sled"
	// StandAloneChassisType is a single, free-standing system, commonly called a tower or desktop
	// chassis.
	StandAloneChassisType ChassisType = "StandAlone"
	// StorageEnclosureChassisType is a chassis which encloses storage.
	StorageEnclosureChassisType ChassisType = "StorageEnclosure"
	// ZoneChassisType is a logical division or portion of a physical chassis that contains multiple
	// devices or systems that cannot be physically separated.
	ZoneChassisType ChassisType = "Zone"
)

type ComputerSystem

type ComputerSystem struct {
	common.Entity

	// ODataContext is the @odata.context
	ODataContext string `json:"@odata.context"`
	// ODataType is the @odata.type
	ODataType string `json:"@odata.type"`

	// Description is the resource description.
	Description string

	// Manufacturer shall contain a value that represents the manufacturer of the system.
	Manufacturer string

	MemorySummary MemorySummary
	// Model shall contain the information
	// about how the manufacturer references this system. This is typically
	// the product name, without the manufacturer name.
	Model string
	// Name is the resource name.
	Name string
	// PowerState shall contain the power state of the system.
	PowerState PowerState
	// ProcessorSummary shall contain properties which
	// describe the central processors for the current resource.
	ProcessorSummary ProcessorSummary

	// Redundancy references a redundancy
	// entity that specifies a kind and level of redundancy and a collection
	// (RedundancySet) of other ComputerSystems that provide the specified
	// redundancy to this ComputerSystem.
	Redundancy string
	// RedundancyCount is the number of Redundancy objects.
	RedundancyCount string `json:"[email protected]"`
	SKU             string
	SerialNumber    string

	// Status shall contain any status or health properties
	// of the resource.
	Status        common.Status
	BatteryHealth string
	Oem           json.RawMessage
	// contains filtered or unexported fields
}

ComputerSystem is used to represent resources that represent a computing system in the Redfish specification.

func GetComputerSystem

func GetComputerSystem(c common.Client, uri string) (*ComputerSystem, error)

GetComputerSystem will get a ComputerSystem instance from the service.

func ListReferencedComputerSystems

func ListReferencedComputerSystems(c common.Client, link string) ([]*ComputerSystem, error)

ListReferencedComputerSystems gets the collection of ComputerSystem from a provided reference.

func (*ComputerSystem) Processors

func (computersystem *ComputerSystem) Processors() ([]*Processor, error)

Processors returns a collection of processors from this system

func (*ComputerSystem) SimpleStorages

func (computersystem *ComputerSystem) SimpleStorages() ([]*SimpleStorage, error)

SimpleStorages gets all simple storage services of this system.

func (*ComputerSystem) SmartStorages

func (computersystem *ComputerSystem) SmartStorages() ([]*SmartStorage, error)

Storage gets the storage associated with this system.

func (*ComputerSystem) UnmarshalJSON

func (computersystem *ComputerSystem) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a ComputerSystem object from the raw JSON.

func (*ComputerSystem) Update

func (computersystem *ComputerSystem) Update() error

Update commits updates to this object's properties to the running system.

type Device

type Device struct {
	Name string
	// CapacityBytes shall represent the size (in bytes) of the Storage Device.
	CapacityBytes int64
	// Manufacturer shall indicate the name of the manufacturer of this storage device.
	Manufacturer string
	// Model shall indicate the model information as provided by the manufacturer
	// of this storage device.
	Model string
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
}

Device shall describe a storage device visible to SimpleStorage.

type Drive

type Drive struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`

	Id            string
	Name          string
	Model         string
	Description   string
	SerialNumber  string
	Location      string
	InterfaceType string
	CapacityGB    int
	Status        common.Status
}

Drive is used to represent a disk drive or other physical storage medium for a Redfish implementation.

func GetDrive

func GetDrive(c common.Client, uri string) (*Drive, error)

GetDrive will get a Drive instance from the service.

func ListReferencedDrives

func ListReferencedDrives(c common.Client, link string) ([]*Drive, error)

ListReferencedDrives gets the collection of Drives from a provided reference.

func (*Drive) UnmarshalJSON

func (drive *Drive) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Drive object from the raw JSON.

type EnvironmentalClass

type EnvironmentalClass string

EnvironmentalClass is

const (

	// A1EnvironmentalClass ASHRAE Environmental Class 'A1'.
	A1EnvironmentalClass EnvironmentalClass = "A1"
	// A2EnvironmentalClass ASHRAE Environmental Class 'A2'.
	A2EnvironmentalClass EnvironmentalClass = "A2"
	// A3EnvironmentalClass ASHRAE Environmental Class 'A3'.
	A3EnvironmentalClass EnvironmentalClass = "A3"
	// A4EnvironmentalClass ASHRAE Environmental Class 'A4'.
	A4EnvironmentalClass EnvironmentalClass = "A4"
)

type Fan

type Fan struct {
	common.Entity

	// HotPluggable shall indicate whether the
	// device can be inserted or removed while the underlying equipment
	// otherwise remains in its current operational state. Devices indicated
	// as hot-pluggable shall allow the device to become operable without
	// altering the operational state of the underlying equipment. Devices
	// that cannot be inserted or removed from equipment in operation, or
	// devices that cannot become operable without affecting the operational
	// state of that equipment, shall be indicated as not hot-pluggable.
	HotPluggable bool
	// IndicatorLED shall contain the indicator light state for the indicator
	// light associated with this fan.
	IndicatorLED common.IndicatorLED
	// Location shall contain location information of the associated fan.
	Location common.Location
	// LowerThresholdCritical shall indicate the Reading is below the normal
	// range but is not yet fatal. The units shall be the same units as the
	// related Reading property.
	LowerThresholdCritical float32
	// LowerThresholdFatal shall indicate the Reading is below the normal range
	// and is fatal. The units shall be the same units as the related Reading property.
	LowerThresholdFatal float32
	// LowerThresholdNonCritical shall indicate the Reading is below the normal
	// range but is not critical. The units shall be the same units as the related Reading property.
	LowerThresholdNonCritical float32
	// Manufacturer shall be the name of the organization responsible for producing
	// the fan. This organization might be the entity from whom the fan is
	// purchased, but this is not necessarily true.
	Manufacturer string
	// MaxReadingRange shall indicate the
	// highest possible value for Reading. The units shall be the same units
	// as the related Reading property.
	MaxReadingRange float32
	// MemberID shall uniquely identify the member within the collection. For
	// services supporting Redfish v1.6 or higher, this value shall be the
	// zero-based array index.
	MemberID string `json:"MemberId"`
	// MinReadingRange shall indicate the
	// lowest possible value for Reading. The units shall be the same units
	// as the related Reading property.
	MinReadingRange float32
	// Model shall contain the model information as defined by the manufacturer
	// for the associated fan.
	Model string
	// PartNumber shall contain the part number as defined by the manufacturer
	// for the associated fan.
	PartNumber string
	// PhysicalContext shall be a description of the affected device or region
	// within the chassis to which this fan is associated.
	PhysicalContext string
	// Reading shall be the current value of the fan sensor's reading.
	Reading float32
	// ReadingUnits shall be the units in which the fan's reading and thresholds are measured.
	ReadingUnits ReadingUnits
	// Redundancy is used to show redundancy for fans and other elements in
	// this resource. The use of IDs within these arrays shall reference the
	// members of the redundancy groups.
	Redundancy []Redundancy
	// RedundancyCount is the number of Redundancy elements.
	RedundancyCount int `json:"[email protected]"`
	// SensorNumber shall be a numerical identifier for this fan speed sensor
	// that is unique within this resource.
	SensorNumber int
	// SerialNumber shall contain the serial number as defined by the
	// manufacturer for the associated fan.
	SerialNumber string
	// SparePartNumber shall contain the spare or replacement part number as
	// defined by the manufacturer for the associated fan.
	SparePartNumber string
	// Status shall contain any status or health properties of the resource.
	Status common.Status
	// UpperThresholdCritical shall indicate the Reading is above the normal
	// range but is not yet fatal. The units shall be the same units as the
	// related Reading property.
	UpperThresholdCritical float32
	// UpperThresholdFatal shall indicate the Reading is above the normal range
	// and is fatal. The units shall be the same units as the related Reading property.
	UpperThresholdFatal float32
	// UpperThresholdNonCritical shall indicate the Reading is above the normal
	// range but is not critical. The units shall be the same units as the
	// related Reading property.
	UpperThresholdNonCritical float32
	// contains filtered or unexported fields
}

Fan is

func (*Fan) UnmarshalJSON

func (fan *Fan) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Fan object from the raw JSON.

type InputRange

type InputRange struct {
	// InputType shall contain the input type (AC or DC) of the associated range.
	InputType InputType
	// MaximumFrequencyHz shall contain the value in Hertz of the maximum line
	// input frequency which the power supply is capable of consuming for this range.
	MaximumFrequencyHz float32
	// MaximumVoltage shall contain the value in Volts of the maximum line input
	// voltage which the power supply is capable of consuming for this range.
	MaximumVoltage float32
	// MinimumFrequencyHz shall contain the value in Hertz of the minimum line
	// input frequency which the power supply is capable of consuming for this range.
	MinimumFrequencyHz float32
	// MinimumVoltage shall contain the value in Volts of the minimum line input
	// voltage which the power supply is capable of consuming for this range.
	MinimumVoltage float32
	// OutputWattage shall contain the maximum amount of power, in Watts, that
	// the associated power supply is rated to deliver while operating in this input range.
	OutputWattage float32
}

InputRange shall describe an input range that the associated power supply is able to utilize.

type InputType

type InputType string

InputType is the type of power input.

const (

	// ACInputType Alternating Current (AC) input range.
	ACInputType InputType = "AC"
	// DCInputType Direct Current (DC) input range.
	DCInputType InputType = "DC"
)

type IntrusionSensor

type IntrusionSensor string

IntrusionSensor is

const (

	// NormalIntrusionSensor No abnormal physical security condition is
	// detected at this time.
	NormalIntrusionSensor IntrusionSensor = "Normal"
	// HardwareIntrusionIntrusionSensor A door, lock, or other mechanism
	// protecting the internal system hardware from being accessed is
	// detected to be in an insecure state.
	HardwareIntrusionIntrusionSensor IntrusionSensor = "HardwareIntrusion"
	// TamperingDetectedIntrusionSensor Physical tampering of the monitored
	// entity is detected.
	TamperingDetectedIntrusionSensor IntrusionSensor = "TamperingDetected"
)

type IntrusionSensorReArm

type IntrusionSensorReArm string

IntrusionSensorReArm is

const (

	// ManualIntrusionSensorReArm A manual re-arm of this sensor restores it
	// to the normal state.
	ManualIntrusionSensorReArm IntrusionSensorReArm = "Manual"
	// AutomaticIntrusionSensorReArm Because no abnormal physical security
	// condition is detected, this sensor is automatically restored to the
	// normal state.
	AutomaticIntrusionSensorReArm IntrusionSensorReArm = "Automatic"
)

type LineInputVoltageType

type LineInputVoltageType string

LineInputVoltageType is the type of line voltage.

const (

	// UnknownLineInputVoltageType The power supply line input voltage type
	// cannot be determined.
	UnknownLineInputVoltageType LineInputVoltageType = "Unknown"
	// ACLowLineLineInputVoltageType 100-127V AC input.
	ACLowLineLineInputVoltageType LineInputVoltageType = "ACLowLine"
	// ACMidLineLineInputVoltageType 200-240V AC input.
	ACMidLineLineInputVoltageType LineInputVoltageType = "ACMidLine"
	// ACHighLineLineInputVoltageType 277V AC input.
	ACHighLineLineInputVoltageType LineInputVoltageType = "ACHighLine"
	// DCNeg48VLineInputVoltageType -48V DC input.
	DCNeg48VLineInputVoltageType LineInputVoltageType = "DCNeg48V"
	// DC380VLineInputVoltageType High Voltage DC input (380V).
	DC380VLineInputVoltageType LineInputVoltageType = "DC380V"
	// AC120VLineInputVoltageType AC 120V nominal input.
	AC120VLineInputVoltageType LineInputVoltageType = "AC120V"
	// AC240VLineInputVoltageType AC 240V nominal input.
	AC240VLineInputVoltageType LineInputVoltageType = "AC240V"
	// AC277VLineInputVoltageType AC 277V nominal input.
	AC277VLineInputVoltageType LineInputVoltageType = "AC277V"
	// ACandDCWideRangeLineInputVoltageType Wide range AC or DC input.
	ACandDCWideRangeLineInputVoltageType LineInputVoltageType = "ACandDCWideRange"
	// ACWideRangeLineInputVoltageType Wide range AC input.
	ACWideRangeLineInputVoltageType LineInputVoltageType = "ACWideRange"
	// DC240VLineInputVoltageType DC 240V nominal input.
	DC240VLineInputVoltageType LineInputVoltageType = "DC240V"
)

type MemorySummary

type MemorySummary struct {
	// Status is the status or health properties of the resource.
	Status common.Status
	// TotalSystemMemoryGiB is the amount of configured system general purpose
	// volatile (RAM) memory as measured in gibibytes.
	TotalSystemMemoryGiB float32
	// TotalSystemPersistentMemoryGiB is the total amount of configured
	// persistent memory available to the system as measured in gibibytes.
	TotalSystemPersistentMemoryGiB float32
}

MemorySummary contains properties which describe the central memory for a system.

type PhysicalSecurity

type PhysicalSecurity struct {

	// IntrusionSensor is This property shall represent the state of this
	// physical security sensor.  Hardware intrusion indicates the internal
	// hardware is detected as being accessed in an insecure state.
	// Tampering detected indicates the physical tampering of the monitored
	// entity is detected.
	IntrusionSensor IntrusionSensor
	// IntrusionSensorNumber is This property shall contain a numerical
	// identifier for this physical security sensor that is unique within
	// this resource.
	IntrusionSensorNumber int
	// IntrusionSensorReArm is This property shall represent the method that
	// restores this physical security sensor to the normal state.  Manual
	// indicates manual re-arm is needed.  Automatic indicates the state is
	// restored automatically because no abnormal physical security
	// conditions are detected.
	IntrusionSensorReArm IntrusionSensorReArm
}

PhysicalSecurity shall describe the sensor state of the physical security.

type Power

type Power struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	// Description provides a description of this resource.
	Description string
	// IndicatorLED shall contain the indicator light state for the indicator
	// light associated with this power supply.
	IndicatorLED common.IndicatorLED
	// PowerControl shall be the definition for power control (power reading and
	// limiting) for a Redfish implementation.
	PowerControl []PowerControl
	// PowerControlCount is the number of objects.
	PowerControlCount int `json:"[email protected]"`
	// PowerSupplies shall contain details of the power supplies associated with
	// this system or device.
	PowerSupplies []PowerSupply
	// PowerSuppliesCount is the number of objects.
	PowerSuppliesCount int `json:"[email protected]"`
	// Redundancy shall contain redundancy information for the power subsystem
	// of this system or device.
	Redundancy []Redundancy
	// RedundancyCount is the number of objects.
	RedundancyCount int `json:"[email protected]"`
	// Voltages shall be the definition for voltage
	// sensors for a Redfish implementation.
	Voltages []Voltage
	// VoltagesCount is the number of objects.
	VoltagesCount int `json:"[email protected]"`
}

Power is used to represent a power metrics resource for a Redfish implementation.

func GetPower

func GetPower(c common.Client, uri string) (*Power, error)

GetPower will get a Power instance from the service.

func ListReferencedPowers

func ListReferencedPowers(c common.Client, link string) ([]*Power, error)

ListReferencedPowers gets the collection of Power from a provided reference.

type PowerControl

type PowerControl struct {
	common.Entity

	// MemberID shall uniquely identify the member within the collection. For
	// services supporting Redfish v1.6 or higher, this value shall be the
	// zero-based array index.
	MemberID string `json:"MemberId"`
	// PhysicalContext shall be a description of the affected device(s) or region
	// within the chassis to which this power control applies.
	PhysicalContext common.PhysicalContext
	// PowerAllocatedWatts shall represent the total power currently allocated
	// to chassis resources.
	PowerAllocatedWatts float32
	// PowerAvailableWatts shall represent the amount of power capacity (in
	// Watts) not already allocated and shall equal PowerCapacityWatts -
	// PowerAllocatedWatts.
	PowerAvailableWatts float32
	// PowerCapacityWatts shall represent the total power capacity that is
	// available for allocation to the chassis resources.
	PowerCapacityWatts float32
	// PowerConsumedWatts shall represent the actual power being consumed (in
	// Watts) by the chassis.
	PowerConsumedWatts float32
	// PowerLimit shall contain power limit status and configuration information
	// for this chassis.
	PowerLimit PowerLimit
	// PowerMetrics shall contain power metrics for power readings (interval,
	// minimum/maximum/average power consumption) for the chassis.
	PowerMetrics PowerMetric
	// PowerRequestedWatts shall represent the
	// amount of power (in Watts) that the chassis resource is currently
	// requesting be budgeted to it for future use.
	PowerRequestedWatts float32
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
}

PowerControl is

func (*PowerControl) UnmarshalJSON

func (powercontrol *PowerControl) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a PowerControl object from the raw JSON.

type PowerLimit

type PowerLimit struct {
	// CorrectionInMs shall represent the time
	// interval in ms required for the limiting process to react and reduce
	// the power consumption below the limit.
	CorrectionInMs int64
	// LimitException shall represent the
	// action to be taken if the resource power consumption can not be
	// limited below the specified limit after several correction time
	// periods.
	LimitException PowerLimitException
	// LimitInWatts shall represent the power
	// cap limit in watts for the resource. If set to null, power capping
	// shall be disabled.
	LimitInWatts float32
}

PowerLimit shall contain power limit status and configuration information for this chassis.

type PowerLimitException

type PowerLimitException string

PowerLimitException is the type of power limit exception.

const (

	// NoActionPowerLimitException Take no action when the limit is exceeded.
	NoActionPowerLimitException PowerLimitException = "NoAction"
	// HardPowerOffPowerLimitException Turn the power off immediately when
	// the limit is exceeded.
	HardPowerOffPowerLimitException PowerLimitException = "HardPowerOff"
	// LogEventOnlyPowerLimitException Log an event when the limit is
	// exceeded, but take no further action.
	LogEventOnlyPowerLimitException PowerLimitException = "LogEventOnly"
	// OemPowerLimitException Take an OEM-defined action.
	OemPowerLimitException PowerLimitException = "Oem"
)

type PowerMetric

type PowerMetric struct {
	// AverageConsumedWatts shall represent the
	// average power level that occurred averaged over the last IntervalInMin
	// minutes.
	AverageConsumedWatts float32
	// IntervalInMin shall represent the time
	// interval (or window), in minutes, in which the PowerMetrics properties
	// are measured over.
	// Should be an integer, but some Dell implementations return as a float.
	IntervalInMin float32
	// MaxConsumedWatts shall represent the
	// maximum power level in watts that occurred within the last
	// IntervalInMin minutes.
	MaxConsumedWatts float32
	// MinConsumedWatts shall represent the
	// minimum power level in watts that occurred within the last
	// IntervalInMin minutes.
	MinConsumedWatts float32
}

PowerMetric shall contain power metrics for power readings (interval, minimum/maximum/average power consumption) for a resource.

type PowerState

type PowerState string

PowerState is the power state of the system.

const (

	// OnPowerState the system is powered on.
	OnPowerState PowerState = "On"
	// OffPowerState the system is powered off, although some components may
	// continue to have AUX power such as management controller.
	OffPowerState PowerState = "Off"
	// PoweringOnPowerState A temporary state between Off and On. This
	// temporary state can be very short.
	PoweringOnPowerState PowerState = "PoweringOn"
	// PoweringOffPowerState A temporary state between On and Off. The power
	// off action can take time while the OS is in the shutdown process.
	PoweringOffPowerState PowerState = "PoweringOff"
)

type PowerSupply

type PowerSupply struct {
	common.Entity

	// EfficiencyPercent shall contain the value of the measured power
	// efficiency, as a percentage, of the associated power supply.
	EfficiencyPercent float32
	// FirmwareVersion shall contain the firmware version as
	// defined by the manufacturer for the associated power supply.
	FirmwareVersion string
	// HotPluggable shall indicate whether the
	// device can be inserted or removed while the underlying equipment
	// otherwise remains in its current operational state. Devices indicated
	// as hot-pluggable shall allow the device to become operable without
	// altering the operational state of the underlying equipment. Devices
	// that cannot be inserted or removed from equipment in operation, or
	// devices that cannot become operable without affecting the operational
	// state of that equipment, shall be indicated as not hot-pluggable.
	HotPluggable bool
	// IndicatorLED shall contain the indicator
	// light state for the indicator light associated with this power supply.
	IndicatorLED common.IndicatorLED
	// InputRanges shall be a collection of ranges usable by the power supply unit.
	InputRanges []InputRange
	// LastPowerOutputWatts shall contain the average power
	// output, measured in Watts, of the associated power supply.
	LastPowerOutputWatts float32
	// LineInputVoltage shall contain the value in Volts of
	// the line input voltage (measured or configured for) that the power
	// supply has been configured to operate with or is currently receiving.
	LineInputVoltage float32
	// LineInputVoltageType shall contain the type of input
	// line voltage supported by the associated power supply.
	LineInputVoltageType LineInputVoltageType
	// Location shall contain location information of the
	// associated power supply.
	Location common.Location
	// Manufacturer shall be the name of the
	// organization responsible for producing the power supply. This
	// organization might be the entity from whom the power supply is
	// purchased, but this is not necessarily true.
	Manufacturer string
	// MemberID shall uniquely identify the
	// member within the collection. For services supporting Redfish v1.6 or
	// higher, this value shall be the zero-based array index.
	MemberID string `json:"MemberId"`
	// Model shall contain the model information as defined
	// by the manufacturer for the associated power supply.
	Model string
	// PartNumber shall contain the part number as defined
	// by the manufacturer for the associated power supply.
	PartNumber string
	// PowerCapacityWatts shall contain the maximum amount
	// of power, in Watts, that the associated power supply is rated to
	// deliver.
	PowerCapacityWatts float32
	// PowerInputWatts shall contain the value of the
	// measured input power, in Watts, of the associated power supply.
	PowerInputWatts float32
	// PowerOutputWatts shall contain the value of the
	// measured output power, in Watts, of the associated power supply.
	PowerOutputWatts float32
	// PowerSupplyType shall contain the input power type
	// (AC or DC) of the associated power supply.
	PowerSupplyType PowerSupplyType
	// Redundancy is used to show redundancy for power supplies and other
	// elements in this resource. The use of IDs within these arrays shall
	// reference the members of the redundancy groups.
	Redundancy []Redundancy
	// RedundancyCount is the number of objects.
	RedundancyCount int `json:"[email protected]"`
	// SerialNumber shall contain the serial number as
	// defined by the manufacturer for the associated power supply.
	SerialNumber string
	// SparePartNumber shall contain the spare or
	// replacement part number as defined by the manufacturer for the
	// associated power supply.
	SparePartNumber string
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
	// contains filtered or unexported fields
}

PowerSupply is Details of a power supplies associated with this system or device.

func (*PowerSupply) UnmarshalJSON

func (powersupply *PowerSupply) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a PowerSupply object from the raw JSON.

func (*PowerSupply) Update

func (powersupply *PowerSupply) Update() error

Update commits updates to this object's properties to the running system.

type PowerSupplyType

type PowerSupplyType string

PowerSupplyType is the type of power supply.

const (

	// UnknownPowerSupplyType The power supply type cannot be determined.
	UnknownPowerSupplyType PowerSupplyType = "Unknown"
	// ACPowerSupplyType Alternating Current (AC) power supply.
	ACPowerSupplyType PowerSupplyType = "AC"
	// DCPowerSupplyType Direct Current (DC) power supply.
	DCPowerSupplyType PowerSupplyType = "DC"
	// ACorDCPowerSupplyType Power Supply supports both DC or AC.
	ACorDCPowerSupplyType PowerSupplyType = "ACorDC"
)

type Processor

type Processor struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	// Description provides a description of this resource.
	Description string
	// Manufacturer shall contain a string which identifies
	// the manufacturer of the processor.
	Manufacturer string
	// MaxSpeedMHz shall indicate the maximum rated clock
	// speed of the processor in MHz.
	MaxSpeedMHz float32
	// MaxTDPWatts shall be the maximum Thermal
	// Design Power (TDP) in watts.
	MaxTDPWatts int

	// Model shall indicate the model information as
	// provided by the manufacturer of this processor.
	Model string
	// ProcessorID shall contain identification information for this processor.
	ProcessorID ProcessorID `json:"ProcessorId"`
	// Socket shall contain the string which identifies the
	// physical location or socket of the processor.
	//czw remove
	//Socket string
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
	// TotalCores shall indicate the total count of
	// independent processor cores contained within this processor.
	TotalCores int
	// TotalEnabledCores shall indicate the total count of
	// enabled independent processor cores contained within this processor.
	TotalEnabledCores int
	// TotalThreads shall indicate the total count of
	// independent execution threads supported by this processor.
	TotalThreads int
	// contains filtered or unexported fields
}

Processor is used to represent a single processor contained within a system.

func GetProcessor

func GetProcessor(c common.Client, uri string) (*Processor, error)

GetProcessor will get a Processor instance from the system

func ListReferencedProcessors

func ListReferencedProcessors(c common.Client, link string) ([]*Processor, error)

ListReferencedProcessors gets the collection of Processor from a provided reference.

func (*Processor) UnmarshalJSON

func (processor *Processor) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Processor object from the raw JSON.

type ProcessorID

type ProcessorID struct {
	// EffectiveFamily shall indicate the effective Family
	// information as provided by the manufacturer of this processor.
	EffectiveFamily string
	// EffectiveModel shall indicate the effective Model
	// information as provided by the manufacturer of this processor.
	EffectiveModel string
	// IdentificationRegisters shall include the raw CPUID
	// instruction output as provided by the manufacturer of this processor.
	IdentificationRegisters string
	// MicrocodeInfo shall indicate the Microcode
	// Information as provided by the manufacturer of this processor.
	MicrocodeInfo string
	// Step shall indicate the Step or revision string
	// information as provided by the manufacturer of this processor.
	Step string
	// VendorID shall indicate the Vendor Identification
	// string information as provided by the manufacturer of this processor.
	VendorID string `json:"VendorId"`
}

ProcessorID shall contain identification information for a processor.

type ProcessorSummary

type ProcessorSummary struct {
	// Count is the number of physical central processors in the system.
	Count int
	// LogicalProcessorCount is the number of logical central processors in the system.
	LogicalProcessorCount int
	// Model is the processor model for the central processors in the system,
	// per the description in the Processor Information - Processor Family
	// section of the SMBIOS Specification DSP0134 2.8 or later.
	Model string
	// Status is any status or health properties of the resource.
	Status common.Status
}

ProcessorSummary is This type shall contain properties which describe the central processors for a system.

type ReadingUnits

type ReadingUnits string

ReadingUnits is the type of units used for a reading.

const (

	// RPMReadingUnits Indicates that the fan reading and thresholds are
	// measured in rotations per minute.
	RPMReadingUnits ReadingUnits = "RPM"
	// PercentReadingUnits Indicates that the fan reading and thresholds are
	// measured in percentage.
	PercentReadingUnits ReadingUnits = "Percent"
)

type Redundancy

type Redundancy struct {
	common.Entity

	// MaxNumSupported shall contain the maximum number of members allowed in
	// the redundancy group.
	MaxNumSupported int
	// MemberID value of this string shall uniquely identify the member within
	// the collection.
	MemberID string `json:"MemberId"`
	// MinNumNeeded shall contain the minimum
	// number of members allowed in the redundancy group for the current
	// redundancy mode to still be fault tolerant.
	MinNumNeeded int

	/*

		data: {
			"@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal/Redundancy/iDRAC.Embedded.1%23SystemBoardFanRedundancy",
			"MaxNumSupported": null,
			"MemberID": "iDRAC.Embedded.1#SystemBoardFanRedundancy",
			"MinNumNeeded": null,
			"Mode": [
				{
					"Member": "FailOver"
				}
			],
			"Name": "System Board Fan Redundancy",
			"RedundancySet": [],
			"[email protected]": 0,
			"Status": {
				"Health": "Ok",
				"State": "Enabled"
			}
		}

		czw remove it, json decode error
	*/
	//Mode RedundancyMode
	// RedundancyEnabled shall be a boolean indicating whether the redundancy is
	// enabled.
	RedundancyEnabled bool

	// RedundancySetCount is the number of RedundancySets.
	RedundancySetCount int `json:"[email protected]"`
	// Status shall contain any status or health properties of the resource.
	Status common.Status
	// contains filtered or unexported fields
}

Redundancy represents the Redundancy element property. All values for resources described by this schema shall comply to the requirements as described in the Redfish specification. The value of this string shall be of the format for the reserved word *Redundancy*.

func GetRedundancy

func GetRedundancy(c common.Client, uri string) (*Redundancy, error)

GetRedundancy will get a Redundancy instance from the service.

func ListReferencedRedundancies

func ListReferencedRedundancies(c common.Client, link string) ([]*Redundancy, error)

ListReferencedRedundancies gets the collection of Redundancy from a provided reference.

func (*Redundancy) UnmarshalJSON

func (redundancy *Redundancy) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Redundancy object from the raw JSON.

func (*Redundancy) Update

func (redundancy *Redundancy) Update() error

Update commits updates to this object's properties to the running system.

type RedundancyMode

type RedundancyMode string

RedundancyMode is the redundancy mode.

const (
	// FailoverRedundancyMode Failure of one unit will automatically cause
	// its functions to be taken over by a standby or offline unit in the
	// redundancy set.
	FailoverRedundancyMode RedundancyMode = "Failover"
	// NMRedundancyMode Multiple units are available and active such that
	// normal operation will continue if one or more units fail.
	NMRedundancyMode RedundancyMode = "N+m"
	// SharingRedundancyMode Multiple units contribute or share such that
	// operation will continue, but at a reduced capacity, if one or more
	// units fail.
	SharingRedundancyMode RedundancyMode = "Sharing"
	// SparingRedundancyMode One or more spare units are available to take
	// over the function of a failed unit, but takeover is not automatic.
	SparingRedundancyMode RedundancyMode = "Sparing"
	// NotRedundantRedundancyMode The subsystem is not configured in a
	// redundancy mode, either due to configuration or the functionality has
	// been disabled by the user.
	NotRedundantRedundancyMode RedundancyMode = "NotRedundant"
)

type Service

type Service struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataID is the odata identifier.
	ODataID string `json:"@odata.id"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`

	// Description provides a description of this resource.
	Description string

	// Oem contains all the vendor specific actions. It is vendor responsibility to parse
	// this field accordingly
	Oem json.RawMessage
	// Product shall include the name of the product represented by this Redfish
	// service.
	Product string
	// RedfishVersion shall represent the version of the Redfish service. The
	// format of this string shall be of the format
	// majorversion.minorversion.errata in compliance with Protocol Version
	// section of the Redfish specification.
	RedfishVersion string

	// UUID shall be an exact match of the UUID value returned in a 200OK from
	// an SSDP M-SEARCH request during discovery. RFC4122 describes methods that
	// can be used to create a UUID value. The value should be considered to be
	// opaque. Client software should only treat the overall value as a
	// universally unique identifier and should not interpret any sub-fields
	// within the UUID.
	UUID string

	// Vendor shall include the name of the manufacturer or vendor represented
	// by this Redfish service. If this property is supported, the vendor name
	// shall not be included in the value of the Product property.
	Vendor string
	// contains filtered or unexported fields
}

Service represents the root Redfish service. All values for resources described by this schema shall comply to the requirements as described in the Redfish specification.

func ServiceRoot

func ServiceRoot(c common.Client) (*Service, error)

ServiceRoot will get a Service instance from the service.

func (*Service) Chassis

func (serviceroot *Service) Chassis() ([]*Chassis, error)

func (*Service) CreateSession

func (serviceroot *Service) CreateSession(username, password string) (*common.AuthToken, error)

CreateSession creates a new session and returns the token and id

func (*Service) DeleteSession

func (serviceroot *Service) DeleteSession(url string) error

DeleteSession logout the specified session

func (*Service) Sessions

func (serviceroot *Service) Sessions() ([]*common.Session, error)

Sessions gets the system's active sessions

func (*Service) Systems

func (serviceroot *Service) Systems() ([]*ComputerSystem, error)

Systems get the system instances from the service

func (*Service) UnmarshalJSON

func (serviceroot *Service) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Service object from the raw JSON.

type SimpleStorage

type SimpleStorage struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	// Actions is The Actions property shall contain the available actions
	// for this resource.
	Actions string
	// Description provides a description of this resource.
	Description string
	// Devices shall contain a list of storage devices
	// associated with this resource.
	Devices []Device
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
	// UefiDevicePath is used to identify and locate the specific storage
	// controller.
	UefiDevicePath string
	// contains filtered or unexported fields
}

SimpleStorage is used to represent a storage controller and its directly-attached devices.

func GetSimpleStorage

func GetSimpleStorage(c common.Client, uri string) (*SimpleStorage, error)

GetSimpleStorage will get a SimpleStorage instance from the service.

func ListReferencedSimpleStorages

func ListReferencedSimpleStorages(c common.Client, link string) ([]*SimpleStorage, error)

ListReferencedSimpleStorages gets the collection of SimpleStorage from a provided reference.

func (*SimpleStorage) UnmarshalJSON

func (simplestorage *SimpleStorage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a SimpleStorage object from the raw JSON.

type SmartStorage

type SmartStorage struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	Id        string
	Name      string
	// Description provides a description of this resource.
	Description string

	Model                string
	SerialNumber         string
	Location             string
	CurrentOperatingMode string
	Status               common.Status
	// contains filtered or unexported fields
}

SmartStorage is used to represent a storage controller and its directly-attached devices.

func GetSmartStorage

func GetSmartStorage(c common.Client, uri string) (*SmartStorage, error)

GetSmartStorage will get a SmartStorage instance from the service.

func ListReferencedSmartStorages

func ListReferencedSmartStorages(c common.Client, link string) ([]*SmartStorage, error)

ListReferencedSmartStorages gets the collection of SmartStorage from a provided reference.

func (*SmartStorage) Drives

func (smartstorage *SmartStorage) Drives() ([]*Drive, error)

func (*SmartStorage) UnmarshalJSON

func (smartstorage *SmartStorage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a SmartStorage object from the raw JSON.

type Temperature

type Temperature struct {
	common.Entity
	// AdjustedMaxAllowableOperatingValue shall
	// indicate the adjusted maximum allowable operating temperature for the
	// equipment monitored by this temperature sensor, as specified by a
	// standards body, manufacturer, or a combination, and adjusted based on
	// environmental conditions present. For example, liquid inlet
	// temperature may be adjusted based on the available liquid pressure.
	AdjustedMaxAllowableOperatingValue float32
	// AdjustedMinAllowableOperatingValue shall
	// indicate the adjusted minimum allowable operating temperature for the
	// equipment monitored by this temperature sensor, as specified by a
	// standards body, manufacturer, or a combination, and adjusted based on
	// environmental conditions present. For example, liquid inlet
	// temperature may be adjusted based on the available liquid pressure.
	AdjustedMinAllowableOperatingValue float32
	// DeltaPhysicalContext shall be a description of the affected device or
	// region within the chassis to which the DeltaReadingCelsius temperature
	// measurement applies, relative to PhysicalContext.
	DeltaPhysicalContext string
	// DeltaReadingCelsius shall be the delta of the values of the temperature
	// readings across this sensor and the sensor at DeltaPhysicalContext.
	DeltaReadingCelsius float32
	// LowerThresholdCritical shall indicate
	// the ReadingCelsius is below the normal range but is not yet fatal. The
	// units shall be the same units as the related ReadingCelsius property.
	LowerThresholdCritical float32
	// LowerThresholdFatal shall indicate the
	// ReadingCelsius is below the normal range and is fatal. The units shall
	// be the same units as the related ReadingCelsius property.
	LowerThresholdFatal float32
	// LowerThresholdNonCritical shall indicate
	// the ReadingCelsius is below the normal range but is not critical. The
	// units shall be the same units as the related ReadingCelsius property.
	LowerThresholdNonCritical float32
	// LowerThresholdUser shall contain the value at which
	// the ReadingCelsius property is below the user-defined range. The
	// value of the property shall use the same units as the ReadingCelsius
	// property. The value shall be equal to the value of
	// LowerThresholdNonCritical, LowerThresholdCritical, or
	// LowerThresholdFatal, unless set by a user.
	LowerThresholdUser float32
	// MaxAllowableOperatingValue shall
	// indicate the maximum allowable operating temperature for the equipment
	// monitored by this temperature sensor, as specified by a standards
	// body, manufacturer, or a combination.
	MaxAllowableOperatingValue float32
	// MaxReadingRangeTemp shall indicate the
	// highest possible value for ReadingCelsius. The units shall be the same
	// units as the related ReadingCelsius property.
	MaxReadingRangeTemp float32
	// MemberID shall uniquely identify the member within the collection. For
	// services supporting Redfish v1.6 or higher, this value shall be the
	// zero-based array index.
	MemberID string `json:"MemberID"`
	// MinAllowableOperatingValue shall indicate the minimum allowable operating
	// temperature for the equipment monitored by this temperature sensor, as
	// specified by a standards body, manufacturer, or a combination.
	MinAllowableOperatingValue float32
	// MinReadingRangeTemp shall indicate the lowest possible value for
	// ReadingCelsius. The units shall be the same units as the related
	// ReadingCelsius property.
	MinReadingRangeTemp float32
	// PhysicalContext shall be a description of the affected device or region
	// within the chassis to which this temperature measurement applies.
	PhysicalContext string
	// ReadingCelsius shall be the current value of the temperature sensor's reading.
	ReadingCelsius float32
	// SensorNumber shall be a numerical identifier for this temperature sensor
	// that is unique within this resource.
	SensorNumber int
	// Status shall contain any status or health properties of the resource.
	Status common.Status
	// UpperThresholdCritical shall indicate
	// the ReadingCelsius is above the normal range but is not yet fatal. The
	// units shall be the same units as the related ReadingCelsius property.
	UpperThresholdCritical float32
	// UpperThresholdFatal shall indicate the
	// ReadingCelsius is above the normal range and is fatal. The units shall
	// be the same units as the related ReadingCelsius property.
	UpperThresholdFatal float32
	// UpperThresholdNonCritical shall indicate
	// the ReadingCelsius is above the normal range but is not critical. The
	// units shall be the same units as the related ReadingCelsius property.
	UpperThresholdNonCritical float32
	// UpperThresholdUser shall contain the value at which
	// the ReadingCelsius property is above the user-defined range. The
	// value of the property shall use the same units as the ReadingCelsius
	// property. The value shall be equal to the value of
	// UpperThresholdNonCritical, UpperThresholdCritical, or
	// UpperThresholdFatal, unless set by a user.
	UpperThresholdUser float32
}

Temperature is

type Thermal

type Thermal struct {
	common.Entity

	// ODataContext is the odata context.
	ODataContext string `json:"@odata.context"`
	// ODataType is the odata type.
	ODataType string `json:"@odata.type"`
	// Description provides a description of this resource.
	Description string
	// Fans shall be the definition for fans for a Redfish implementation.
	Fans []Fan
	// FansCount is the number of Fans.
	FansCount int `json:"[email protected]"`
	// Redundancy is used to show redundancy for fans and other elements in
	// this resource. The use of IDs within these arrays shall reference the
	// members of the redundancy groups.
	Redundancy []Redundancy
	// RedundancyCount is the number of Redundancy objects.
	RedundancyCount int `json:"[email protected]"`
	// Status shall contain any status or health properties of the resource.
	Status common.Status
	// Temperatures shall be the definition for temperature sensors for a
	// Redfish implementation.
	Temperatures []Temperature
	// TemperaturesCount is the number of Temperature objects
	TemperaturesCount int `json:"[email protected]"`
	// contains filtered or unexported fields
}

Thermal is used to represent a thermal metrics resource for a Redfish implementation.

func GetThermal

func GetThermal(c common.Client, uri string) (*Thermal, error)

GetThermal will get a Thermal instance from the service.

func ListReferencedThermals

func ListReferencedThermals(c common.Client, link string) ([]*Thermal, error)

ListReferencedThermals gets the collection of Thermal from a provided reference.

func (*Thermal) UnmarshalJSON

func (thermal *Thermal) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals an object from the raw JSON.

type Voltage

type Voltage struct {
	common.Entity

	// LowerThresholdCritical shall indicate
	// the present reading is below the normal range but is not yet fatal.
	// Units shall use the same units as the related ReadingVolts property.
	LowerThresholdCritical float32
	// LowerThresholdFatal shall indicate the
	// present reading is below the normal range and is fatal. Units shall
	// use the same units as the related ReadingVolts property.
	LowerThresholdFatal float32
	// LowerThresholdNonCritical shall indicate
	// the present reading is below the normal range but is not critical.
	// Units shall use the same units as the related ReadingVolts property.
	LowerThresholdNonCritical float32
	// MaxReadingRange shall indicate the
	// highest possible value for ReadingVolts. Units shall use the same
	// units as the related ReadingVolts property.
	MaxReadingRange float32
	// MemberID shall uniquely identify the member within the collection. For
	// services supporting Redfish v1.6 or higher, this value shall be the
	// zero-based array index.
	MemberID string `json:"MemberId"`
	// MinReadingRange shall indicate the lowest possible value for ReadingVolts.
	// Units shall use the same units as the related ReadingVolts property.
	MinReadingRange float32
	// PhysicalContext shall be a description
	// of the affected device or region within the chassis to which this
	// voltage measurement applies.
	PhysicalContext string
	// ReadingVolts shall be the present
	// reading of the voltage sensor's reading.
	ReadingVolts float32
	// SensorNumber shall be a numerical
	// identifier for this voltage sensor that is unique within this
	// resource.
	SensorNumber int
	// Status shall contain any status or health properties
	// of the resource.
	Status common.Status
	// UpperThresholdCritical shall indicate
	// the present reading is above the normal range but is not yet fatal.
	// Units shall use the same units as the related ReadingVolts property.
	UpperThresholdCritical float32
	// UpperThresholdFatal shall indicate the
	// present reading is above the normal range and is fatal. Units shall
	// use the same units as the related ReadingVolts property.
	UpperThresholdFatal float32
	// UpperThresholdNonCritical shall indicate
	// the present reading is above the normal range but is not critical.
	// Units shall use the same units as the related ReadingVolts property.
	UpperThresholdNonCritical float32
}

Voltage is a voltage representation.

func (*Voltage) UnmarshalJSON

func (voltage *Voltage) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals a Voltage object from the raw JSON.

Jump to

Keyboard shortcuts

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