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,40 @@
{
"@odata.type": "#Drive.v1_22_0.Drive",
"Id": "32ADF365C6C1B7BD",
"Name": "Drive Sample",
"IndicatorLED": "Lit",
"Model": "C123",
"Revision": "100A",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"CapacityBytes": 899527000064,
"FailurePredicted": false,
"Protocol": "SAS",
"MediaType": "HDD",
"Manufacturer": "Contoso",
"SerialNumber": "1234570",
"PartNumber": "C123-1111",
"Identifiers": [
{
"DurableNameFormat": "NAA",
"DurableName": "32ADF365C6C1B7BD"
}
],
"HotspareType": "Global",
"HotspareReplacementMode": "Revertible",
"EncryptionAbility": "SelfEncryptingDrive",
"EncryptionStatus": "Unlocked",
"RotationSpeedRPM": 15000,
"BlockSizeBytes": 512,
"CapableSpeedGbs": 12,
"NegotiatedSpeedGbs": 12,
"Actions": {
"#Drive.SecureErase": {
"target": "/redfish/v1/Chassis/1U/Drives/32ADF365C6C1B7BD/Actions/Drive.SecureErase"
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Drives/32ADF365C6C1B7BD",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,46 @@
{
"@odata.type": "#Drive.v1_22_0.Drive",
"Id": "35D38F11ACEF7BD3",
"Name": "Drive Sample",
"IndicatorLED": "Lit",
"Model": "C123",
"Revision": "100A",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"CapacityBytes": 899527000064,
"FailurePredicted": false,
"Protocol": "SAS",
"MediaType": "HDD",
"Manufacturer": "Contoso",
"SerialNumber": "1234567",
"PartNumber": "C123-1111",
"Identifiers": [
{
"DurableNameFormat": "NAA",
"DurableName": "35D38F11ACEF7BD3"
}
],
"HotspareType": "None",
"EncryptionAbility": "SelfEncryptingDrive",
"EncryptionStatus": "Unlocked",
"RotationSpeedRPM": 15000,
"BlockSizeBytes": 512,
"CapableSpeedGbs": 12,
"NegotiatedSpeedGbs": 12,
"Links": {
"Volumes": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1"
}
]
},
"Actions": {
"#Drive.SecureErase": {
"target": "/redfish/v1/Chassis/1U/Drives/35D38F11ACEF7BD3/Actions/Drive.SecureErase"
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Drives/35D38F11ACEF7BD3",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,49 @@
{
"@odata.type": "#Drive.v1_22_0.Drive",
"Id": "3D58ECBC375FD9F2",
"Name": "Drive Sample",
"IndicatorLED": "Lit",
"Model": "C123",
"Revision": "100A",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"CapacityBytes": 899527000064,
"FailurePredicted": false,
"Protocol": "SAS",
"MediaType": "HDD",
"Manufacturer": "Contoso",
"SerialNumber": "1234568",
"PartNumber": "C123-1111",
"Identifiers": [
{
"DurableNameFormat": "NAA",
"DurableName": "32ADF365C6C1B7BD"
}
],
"HotspareType": "None",
"EncryptionAbility": "SelfEncryptingDrive",
"EncryptionStatus": "Unlocked",
"RotationSpeedRPM": 15000,
"BlockSizeBytes": 512,
"CapableSpeedGbs": 12,
"NegotiatedSpeedGbs": 12,
"Links": {
"Volumes": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/2"
},
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/3"
}
]
},
"Actions": {
"#Drive.SecureErase": {
"target": "/redfish/v1/Chassis/1U/Drives/3D58ECBC375FD9F2/Actions/Drive.SecureErase"
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Drives/3D58ECBC375FD9F2",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,46 @@
{
"@odata.type": "#Drive.v1_22_0.Drive",
"Id": "3F5A8C54207B7233",
"Name": "Drive Sample",
"IndicatorLED": "Lit",
"Model": "C123",
"Revision": "100A",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"CapacityBytes": 899527000064,
"FailurePredicted": false,
"Protocol": "SAS",
"MediaType": "HDD",
"Manufacturer": "Contoso",
"SerialNumber": "1234569",
"PartNumber": "C123-1111",
"Identifiers": [
{
"DurableNameFormat": "NAA",
"DurableName": "3F5A8C54207B7233"
}
],
"HotspareType": "None",
"EncryptionAbility": "SelfEncryptingDrive",
"EncryptionStatus": "Unlocked",
"RotationSpeedRPM": 15000,
"BlockSizeBytes": 512,
"CapableSpeedGbs": 12,
"NegotiatedSpeedGbs": 12,
"Links": {
"Volumes": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes/1"
}
]
},
"Actions": {
"#Drive.SecureErase": {
"target": "/redfish/v1/Chassis/1U/Drives/3F5A8C54207B7233/Actions/Drive.SecureErase"
}
},
"@odata.id": "/redfish/v1/Chassis/1U/Drives/3F5A8C54207B7233",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,139 @@
{
"@odata.type": "#Power.v1_7_3.Power",
"Id": "Power",
"Name": "Power",
"PowerControl": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Power#/PowerControl/0",
"MemberId": "0",
"Name": "Server Power Control",
"PowerConsumedWatts": 344,
"PowerRequestedWatts": 800,
"PowerAvailableWatts": 0,
"PowerCapacityWatts": 800,
"PowerAllocatedWatts": 800,
"PowerMetrics": {
"IntervalInMin": 30,
"MinConsumedWatts": 271,
"MaxConsumedWatts": 489,
"AverageConsumedWatts": 319
},
"PowerLimit": {
"LimitInWatts": 500,
"LimitException": "LogEventOnly",
"CorrectionInMs": 50
},
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
],
"Status": {
"State": "Enabled",
"Health": "OK"
}
}
],
"Voltages": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Power#/Voltages/0",
"MemberId": "0",
"Name": "VRM1 Voltage",
"SensorNumber": 11,
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ReadingVolts": 12,
"UpperThresholdNonCritical": 12.5,
"UpperThresholdCritical": 13,
"UpperThresholdFatal": 15,
"LowerThresholdNonCritical": 11.5,
"LowerThresholdCritical": 11,
"LowerThresholdFatal": 10,
"MinReadingRange": 0,
"MaxReadingRange": 20,
"PhysicalContext": "VoltageRegulator",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
]
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Power#/Voltages/1",
"MemberId": "1",
"Name": "VRM2 Voltage",
"SensorNumber": 12,
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ReadingVolts": 5,
"UpperThresholdNonCritical": 5.5,
"UpperThresholdCritical": 7,
"LowerThresholdNonCritical": 4.75,
"LowerThresholdCritical": 4.5,
"MinReadingRange": 0,
"MaxReadingRange": 20,
"PhysicalContext": "VoltageRegulator",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
]
}
],
"PowerSupplies": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Power#/PowerSupplies/0",
"MemberId": "0",
"Name": "Power Supply Bay",
"Status": {
"State": "Enabled",
"Health": "Warning"
},
"PowerSupplyType": "AC",
"LineInputVoltageType": "ACWideRange",
"LineInputVoltage": 120,
"PowerCapacityWatts": 800,
"LastPowerOutputWatts": 325,
"Model": "499253-B21",
"Manufacturer": "ManufacturerName",
"FirmwareVersion": "1.00",
"SerialNumber": "1Z0000001",
"PartNumber": "0000001A3A",
"SparePartNumber": "0000001A3A",
"InputRanges": [
{
"InputType": "AC",
"MinimumVoltage": 100,
"MaximumVoltage": 120,
"OutputWattage": 800
},
{
"InputType": "AC",
"MinimumVoltage": 200,
"MaximumVoltage": 240,
"OutputWattage": 1300
}
],
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
]
}
],
"@odata.id": "/redfish/v1/Chassis/1U/Power",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,159 @@
{
"@odata.type": "#Thermal.v1_7_3.Thermal",
"Id": "Thermal",
"Name": "Thermal",
"Temperatures": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Temperatures/0",
"MemberId": "0",
"Name": "CPU1 Temp",
"SensorNumber": 5,
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ReadingCelsius": 41,
"UpperThresholdNonCritical": 42,
"UpperThresholdCritical": 45,
"UpperThresholdFatal": 48,
"MinReadingRangeTemp": 0,
"MaxReadingRangeTemp": 60,
"PhysicalContext": "CPU",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1"
}
]
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Temperatures/1",
"MemberId": "1",
"Name": "CPU2 Temp",
"SensorNumber": 6,
"Status": {
"State": "Disabled"
},
"UpperThresholdNonCritical": 42,
"UpperThresholdCritical": 45,
"UpperThresholdFatal": 48,
"MinReadingRangeTemp": 0,
"MaxReadingRangeTemp": 60,
"PhysicalContext": "CPU",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU2"
}
]
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Temperatures/2",
"MemberId": "2",
"Name": "Chassis Intake Temp",
"SensorNumber": 9,
"Status": {
"State": "Enabled",
"Health": "OK"
},
"ReadingCelsius": 25,
"UpperThresholdNonCritical": 30,
"UpperThresholdCritical": 40,
"UpperThresholdFatal": 50,
"LowerThresholdNonCritical": 10,
"LowerThresholdCritical": 5,
"LowerThresholdFatal": 0,
"MinReadingRangeTemp": 0,
"MaxReadingRangeTemp": 60,
"PhysicalContext": "Intake",
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Chassis/1U"
},
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
}
]
}
],
"Fans": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Fans/0",
"MemberId": "0",
"Name": "BaseBoard System Fan",
"PhysicalContext": "Backplane",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"Reading": 2100,
"ReadingUnits": "RPM",
"LowerThresholdFatal": 0,
"MinReadingRange": 0,
"MaxReadingRange": 5000,
"Redundancy": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Redundancy/0"
}
],
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
]
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Fans/1",
"MemberId": "1",
"Name": "BaseBoard System Fan Backup",
"PhysicalContext": "Backplane",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"Reading": 2050,
"ReadingUnits": "RPM",
"LowerThresholdFatal": 0,
"MinReadingRange": 0,
"MaxReadingRange": 5000,
"Redundancy": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Redundancy/0"
}
],
"RelatedItem": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
},
{
"@odata.id": "/redfish/v1/Chassis/1U"
}
]
}
],
"Redundancy": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Redundancy/0",
"MemberId": "0",
"Name": "BaseBoard System Fans",
"RedundancySet": [
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Fans/0"
},
{
"@odata.id": "/redfish/v1/Chassis/1U/Thermal#/Fans/1"
}
],
"Mode": "N+m",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"MinNumNeeded": 1,
"MaxNumSupported": 2
}
],
"@odata.id": "/redfish/v1/Chassis/1U/Thermal",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}
@@ -0,0 +1,46 @@
{
"@odata.type": "#Chassis.v1_29_0.Chassis",
"Id": "1U",
"Name": "Computer System Chassis",
"ChassisType": "RackMount",
"AssetTag": "Chicago-45Z-2381",
"Manufacturer": "Contoso",
"Model": "3500RX",
"SKU": "8675309",
"SerialNumber": "437XR1138R2",
"PartNumber": "224071-J23",
"PowerState": "On",
"IndicatorLED": "Lit",
"Status": {
"State": "Enabled",
"Health": "OK"
},
"Thermal": {
"@odata.id": "/redfish/v1/Chassis/1U/Thermal"
},
"Power": {
"@odata.id": "/redfish/v1/Chassis/1U/Power"
},
"Drives": {
"@odata.id": "/redfish/v1/Chassis/1U/Drives"
},
"Links": {
"ComputerSystems": [
{
"@odata.id": "/redfish/v1/Systems/437XR1138R2"
}
],
"ManagedBy": [
{
"@odata.id": "/redfish/v1/Managers/BMC"
}
],
"ManagersInChassis": [
{
"@odata.id": "/redfish/v1/Managers/BMC"
}
]
},
"@odata.id": "/redfish/v1/Chassis/1U",
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
}