testhelper

package
v0.0.0-...-49db957 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CPUInfo

type CPUInfo struct {
	Index           uint32
	MaxAverageUsage uint8
}

CPUInfo contains CPU-related information.

type FPGAInfo

type FPGAInfo struct {
	Name                 string
	Manufacturer         string
	Description          string
	FirmwareVersionRegex string
	ResetCauseNum        int
}

FPGAInfo consists of FPGA related information.

type FanInfo

type FanInfo struct {
	Name        string
	IsRemovable bool
	Parent      string
	Location    string
	MaxSpeed    uint32
}

FanInfo consists of fan related information.

type FanTrayInfo

type FanTrayInfo struct {
	Name        string
	IsRemovable bool
	Parent      string
	Location    string
}

FanTrayInfo consists of fan tray related information.

type HardwareInfo

type HardwareInfo struct {
	Fans     []FanInfo
	Fantrays []FanTrayInfo
	FPGAs    []FPGAInfo
	ICs      []IntegratedCircuitInfo
	PCIe     []PCIeInfo
	Security []SecurityComponentInfo
	Storage  []StorageDeviceInfo
	CPU      []TemperatureSensorInfo
	Heatsink []TemperatureSensorInfo
	Exhaust  []TemperatureSensorInfo
	Inlet    []TemperatureSensorInfo
	Dimm     []TemperatureSensorInfo
}

HardwareInfo contains hardware components related information.

type IntegratedCircuitInfo

type IntegratedCircuitInfo struct {
	Name                           string
	CorrectedParityErrorsThreshold uint64
}

IntegratedCircuitInfo consists of integrated-circuit related information.

type Lanes

type Lanes int

Lanes represents number of lanes.

type LoggingInfo

type LoggingInfo struct {
	IPv4RemoteAddresses []string
	IPv6RemoteAddresses []string
}

LoggingInfo contains a remote server addresses to be used for logging.

type MemoryInfo

type MemoryInfo struct {
	Physical                     uint64
	FreeThreshold                uint64
	UsedThreshold                uint64
	CorrectableEccErrorThreshold uint64
}

MemoryInfo contains memory related information.

type MountPointInfo

type MountPointInfo struct {
	Name string
}

MountPointInfo returns mount points related information.

type NTPServerInfo

type NTPServerInfo struct {
	IPv4Address      []string
	IPv6Address      []string
	StratumThreshold uint8
}

NTPServerInfo returns NTP server related information.

type PCIeInfo

type PCIeInfo struct {
	Name string
}

PcieInfo consists of PCIe device related information.

type PMDProperty

type PMDProperty struct {
	SupportedSpeeds        map[Lanes][]oc.E_IfEthernet_ETHERNET_SPEED
	SupportedBreakoutModes []string
	CollateralFlap         bool
}

PMDProperty contain PMD information.

type PMDType

type PMDType string

type PlatformInfo

type PlatformInfo struct {
	SystemInfo   SystemInfo
	HardwareInfo HardwareInfo
	// contains filtered or unexported fields
}

PlatformInfo contains platform specific information.

func NewPlatformInfo

func NewPlatformInfo(t *testing.T, dut *ondatra.DUTDevice, platformName string) (*PlatformInfo, error)

NewPlatformInfo creates a new PlatformInfo.

type PortInfo

type PortInfo struct {
	MaxLanes       int
	PortProperties map[string]*PortProperty
	PMD            map[PMDType]bool
	// contains filtered or unexported fields
}

PortInfo contains port related information.

func NewPortInfo

func NewPortInfo(t *testing.T, dut *ondatra.DUTDevice, platformName string) (*PortInfo, error)

NewPortInfo creates a new PortInfo.

func (*PortInfo) PMDProperty

func (p *PortInfo) PMDProperty(pmdType PMDType) (*PMDProperty, error)

type PortProperty

type PortProperty struct {
	Index               int
	DefaultBreakoutMode string
	MediaType           string
}

PortProperties contains front panel port information.

type SecurityComponentInfo

type SecurityComponentInfo struct {
	Name string
}

SecurityComponentInfo consists of security component related information.

type SmartDataInfo

type SmartDataInfo struct {
	WriteAmplificationFactorThresholds Thresholds[float64]
	RawReadErrorRateThresholds         Thresholds[float64]
	ThroughputPerformanceThresholds    Thresholds[float64]
	ReallocatedSectorCountThresholds   Thresholds[uint64]
	PowerOnSecondsThresholds           Thresholds[uint64]
	SSDLifeLeftThresholds              Thresholds[uint64]
	AvgEraseCountThresholds            Thresholds[uint32]
	MaxEraseCountThresholds            Thresholds[uint32]
}

SmartDataInfo consists of storage device SMART data related information.

type StorageDeviceInfo

type StorageDeviceInfo struct {
	Name              string
	IsRemovable       bool
	IOErrorsThreshold uint64
	SmartDataInfo     SmartDataInfo
}

StorageDeviceInfo consists of storage device related information.

type SystemInfo

type SystemInfo struct {
	RebootTime     time.Duration
	CPUInfo        []CPUInfo
	LoggingInfo    LoggingInfo
	MemInfo        MemoryInfo
	MountPointInfo []MountPointInfo
	NTPServerInfo  []NTPServerInfo
}

SystemInfo consists of system related information.

type TemperatureSensorInfo

type TemperatureSensorInfo struct {
	Name           string
	Location       string
	MaxTemperature float64
}

TemperatureSensorInfo consists of temperature sensor related information.

type Threshold

type Threshold interface {
	float64 | uint64 | uint32
}

Threshold is any numeric type that is used as a lower or upper threshold.

type Threshold32

type Threshold32 struct {
	Min float32
	Max float32
}

Threshold32 consists of the minimum and maximum thresholds as a float32.

type Threshold64

type Threshold64 struct {
	Min float64
	Max float64
}

Threshold64 consists of the minimum and maximum thresholds as a float64.

type Thresholds

type Thresholds[T Threshold] struct {
	HasLo bool
	Lo    T
	HasHi bool
	Hi    T
}

Thresholds encapsulates a set of inclusive lower and upper thresholds.

Jump to

Keyboard shortcuts

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