Add DMTF mockup fixtures and test helpers

Unmodified files from DMTF Redfish-Publications (public-rackmount1, public-localstorage, public-telemetry), only those the tests use, each set with DMTF's BSD-3-Clause license and a COMMANDS.txt naming the source commit and request paths.

conftest.py loads them by request path and serves a mockup over mocked HTTP, with a SessionService that hands out a token, for the transport tests.
This commit is contained in:
Christian Manivong committed 2026-10-12 23:42:14 +00:00
1 parent 17d515d035
commit c8bcd5ace1
77 files changed
+4051

No files matched your search

@@ -0,0 +1,83 @@
{
"@odata.type": "#Sensor.v1_14_0.Sensor",
"Id": "CPU1Temp",
"Name": "CPU #1 Temperature",
"PhysicalContext": "CPU",
"Status": {
"State": "Enabled",
"Health": "Warning",
"Conditions": [
{
"MessageId": "Sensor.1.0.ReadingAboveUpperCautionThreshold",
"Timestamp": "2024-08-12T12:25:00-05:00",
"Message": "Sensor 'CPU1 Temp' reading of 44 (Cel) is above the 42 upper caution threshold.",
"Severity": "Warning",
"MessageArgs": [
"CPU1 Temp",
"44",
"Cel",
"42"
]
}
]
},
"Reading": 44,
"ReadingUnits": "Cel",
"Thresholds": {
"UpperCaution": {
"Reading": 42,
"DwellTime": "PT5M",
"Activation": "Increasing",
"HysteresisReading": -2,
"HysteresisDuration": "PT1M",
"@Redfish.WriteableProperties": []
},
"UpperCautionUser": {
"Reading": 40,
"DwellTime": "PT5M",
"HysteresisReading": 0,
"HysteresisDuration": "PT10M",
"@Redfish.WriteableProperties": [
"Reading",
"DwellTime",
"HysteresisReading",
"HysteresisDuration"
]
},
"UpperCritical": {
"Reading": 45,
"DwellTime": "PT1M",
"Activation": "Increasing",
"HysteresisReading": -2,
"HysteresisDuration": "PT1M",
"@Redfish.WriteableProperties": []
},
"UpperCriticalUser": {
"Reading": 45,
"DwellTime": "PT10S",
"HysteresisReading": -1,
"HysteresisDuration": "PT5M",
"@Redfish.WriteableProperties": [
"Reading",
"DwellTime",
"HysteresisReading",
"HysteresisDuration"
]
},
"UpperFatal": {
"Reading": 50,
"DwellTime": "PT30S",
"Activation": "Increasing",
"@Redfish.WriteableProperties": []
}
},
"ReadingRangeMin": 0,
"ReadingRangeMax": 75,
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1"
}
],
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPU1Temp",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,36 @@
{
"@odata.type": "#Sensor.v1_14_0.Sensor",
"Id": "CPUFan1",
"Name": "CPU #1 Fan Speed",
"PhysicalContext": "CPU",
"Reading": 45,
"SpeedRPM": 1490,
"ReadingRangeMax": 100,
"ReadingRangeMin": 0,
"ReadingType": "Percent",
"ReadingUnits": "%",
"Status": {
"Health": "OK",
"State": "Enabled"
},
"Thresholds": {
"LowerCaution": {
"Reading": 5,
"DwellTime": "PT30S",
"Activation": "Decreasing",
"HysteresisReading": 2,
"HysteresisDuration": "PT1M",
"@Redfish.WriteableProperties": []
},
"LowerCritical": {
"Reading": 0,
"DwellTime": "PT10S",
"Activation": "Decreasing",
"HysteresisReading": 2,
"HysteresisDuration": "PT1M",
"@Redfish.WriteableProperties": []
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPUFan1",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,16 @@
{
"@odata.type": "#Sensor.v1_14_0.Sensor",
"Id": "IntakeTemp",
"Name": "Front Panel Intake Temperature",
"PhysicalContext": "Intake",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"Reading": 24.8,
"ReadingUnits": "Cel",
"ReadingRangeMin": 0,
"ReadingRangeMax": 75,
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/IntakeTemp",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,41 @@
{
"@odata.type": "#Sensor.v1_14_0.Sensor",
"Id": "PS1InputVoltage",
"Name": "Power Supply #1 Input Voltage",
"ReadingType": "Voltage",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ElectricalContext": "Total",
"Reading": 119.27,
"ReadingUnits": "V",
"ReadingRangeMin": 0,
"ReadingRangeMax": 260,
"Accuracy": 0.02,
"Precision": 2,
"SensingInterval": "PT0.125S",
"PhysicalContext": "PowerSupply",
"PhysicalSubContext": "Input",
"Thresholds": {
"UpperCritical": {
"Reading": 125,
"Activation": "Increasing",
"DwellTime": "PT1M"
},
"UpperCaution": {
"Reading": 122,
"DwellTime": "PT10M"
},
"LowerCaution": {
"Reading": 118,
"DwellTime": "PT5M"
},
"LowerCritical": {
"Reading": 115,
"DwellTime": "PT1M"
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1InputVoltage",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,53 @@
{
"@odata.type": "#Sensor.v1_14_0.Sensor",
"Id": "TotalPower",
"Name": "Power reading for the Chassis",
"ReadingType": "Power",
"ElectricalContext": "Total",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"Reading": 374,
"ReadingUnits": "W",
"Implementation": "Synthesized",
"ReadingTime": "2019-08-13T04:14:33+06:00",
"ReadingRangeMin": 0,
"ReadingRangeMax": 600,
"ApparentVA": 2749.2,
"ReactiveVAR": 281.4,
"PowerFactor": 0.99,
"Accuracy": 0.2,
"Precision": 1,
"SensingInterval": "PT0.25S",
"PhysicalContext": "Chassis",
"Thresholds": {
"UpperCritical": {
"Reading": 600,
"Activation": "Increasing",
"DwellTime": "PT1M",
"HysteresisReading": -10,
"HysteresisDuration": "PT1M",
"@Redfish.WriteableProperties": [
"Reading",
"DwellTime",
"HysteresisReading",
"HysteresisDuration"
]
},
"UpperCaution": {
"Reading": 580,
"DwellTime": "PT10M",
"HysteresisReading": -10,
"HysteresisDuration": "PT10M",
"@Redfish.WriteableProperties": [
"Reading",
"DwellTime",
"HysteresisReading",
"HysteresisDuration"
]
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/TotalPower",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,132 @@
{
"@odata.type": "#SensorCollection.SensorCollection",
"Name": "Chassis sensors",
"Members@odata.count": 41,
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/AmbientTemp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPUFan1"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPUFan2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPU1Temp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/DIMM1Temp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/DIMM2Temp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/DIMM3Temp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/ExhaustTemp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/FanBay1"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/FanBay2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/IntakeTemp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Energy"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Frequency"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1InputCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1InputPower"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1InputVoltage"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out12V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out12VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out3V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out3VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out5V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS1Out5VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Energy"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Frequency"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2InputCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2InputPower"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2InputVoltage"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out12V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out12VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out3V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out3VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out5V"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/PS2Out5VCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/TotalEnergy"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/TotalPower"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1Temp"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1InputVoltage"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1InputCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1OutputVoltage"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1OutputCurrent"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Sensors/Battery1StateOfHealth"
}
],
"@odata.id": "/redfish/v1/Chassis/1U/Sensors",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}