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:
77 files changed
+4051
No files matched your search
+85
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"@odata.type": "#PowerSupplyMetrics.v1_3_0.PowerSupplyMetrics",
|
||||
"Id": "Metrics",
|
||||
"Name": "Metrics for Power Supply 1",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "Warning"
|
||||
},
|
||||
"InputVoltage": {
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1InputVoltage",
|
||||
"Reading": 230.2
|
||||
},
|
||||
"InputCurrentAmps": {
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1InputCurrent",
|
||||
"Reading": 5.19
|
||||
},
|
||||
"InputPowerWatts": {
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1InputPower",
|
||||
"Reading": 937.4
|
||||
},
|
||||
"RailVoltage": [
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out3V",
|
||||
"Reading": 3.31
|
||||
},
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out5V",
|
||||
"Reading": 5.03
|
||||
},
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out12V",
|
||||
"Reading": 12.06
|
||||
}
|
||||
],
|
||||
"RailCurrentAmps": [
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out3VCurrent",
|
||||
"Reading": 9.84
|
||||
},
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out5VCurrent",
|
||||
"Reading": 1.25
|
||||
},
|
||||
{
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Out12VCurrent",
|
||||
"Reading": 2.58
|
||||
}
|
||||
],
|
||||
"OutputPowerWatts": {
|
||||
"Reading": 937.4
|
||||
},
|
||||
"RailPowerWatts": [
|
||||
{
|
||||
"Reading": 79.84
|
||||
},
|
||||
{
|
||||
"Reading": 26.25
|
||||
},
|
||||
{
|
||||
"Reading": 91.58
|
||||
}
|
||||
],
|
||||
"EnergykWh": {
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Energy",
|
||||
"Reading": 325675
|
||||
},
|
||||
"FrequencyHz": {
|
||||
"DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/PS1Frequency",
|
||||
"Reading": 60
|
||||
},
|
||||
"TemperatureCelsius": {
|
||||
"Reading": 43.9
|
||||
},
|
||||
"FanSpeedPercent": {
|
||||
"Reading": 68,
|
||||
"SpeedRPM": 3290
|
||||
},
|
||||
"Actions": {
|
||||
"#PowerSupplyMetrics.ResetMetrics": {
|
||||
"target": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics/Actions/PowerSupplyMetrics.ResetMetrics"
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
Vendored
+99
@@ -0,0 +1,99 @@
|
||||
{
|
||||
"@odata.type": "#PowerSupply.v1_8_0.PowerSupply",
|
||||
"Id": "Bay1",
|
||||
"Name": "Power Supply Bay 1",
|
||||
"Status": {
|
||||
"State": "Enabled",
|
||||
"Health": "Warning",
|
||||
"Conditions": [
|
||||
{
|
||||
"MessageId": "Power.1.0.PowerSupplyPredictiveFailure",
|
||||
"Timestamp": "2023-06-08T12:25:00-05:00",
|
||||
"Message": "Power supply 'PSU 1' has a predicted failure condition.",
|
||||
"Severity": "Warning",
|
||||
"MessageArgs": [
|
||||
"PSU 1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"LineInputStatus": "Normal",
|
||||
"Model": "RKS-440DC",
|
||||
"Manufacturer": "Contoso Power",
|
||||
"FirmwareVersion": "1.00",
|
||||
"SerialNumber": "3488247",
|
||||
"PartNumber": "23456-133",
|
||||
"SparePartNumber": "93284-133",
|
||||
"LocationIndicatorActive": false,
|
||||
"HotPluggable": false,
|
||||
"PowerCapacityWatts": 400,
|
||||
"PhaseWiringType": "OnePhase3Wire",
|
||||
"PlugType": "IEC_60320_C14",
|
||||
"InputRanges": [
|
||||
{
|
||||
"NominalVoltageType": "AC200To240V",
|
||||
"CapacityWatts": 400
|
||||
},
|
||||
{
|
||||
"NominalVoltageType": "AC120V",
|
||||
"CapacityWatts": 350
|
||||
},
|
||||
{
|
||||
"NominalVoltageType": "DC380V",
|
||||
"CapacityWatts": 400
|
||||
}
|
||||
],
|
||||
"EfficiencyRatings": [
|
||||
{
|
||||
"LoadPercent": 25,
|
||||
"EfficiencyPercent": 75
|
||||
},
|
||||
{
|
||||
"LoadPercent": 50,
|
||||
"EfficiencyPercent": 85
|
||||
},
|
||||
{
|
||||
"LoadPercent": 90,
|
||||
"EfficiencyPercent": 80
|
||||
}
|
||||
],
|
||||
"OutputRails": [
|
||||
{
|
||||
"NominalVoltage": 3.3,
|
||||
"PhysicalContext": "SystemBoard"
|
||||
},
|
||||
{
|
||||
"NominalVoltage": 5,
|
||||
"PhysicalContext": "SystemBoard"
|
||||
},
|
||||
{
|
||||
"NominalVoltage": 12,
|
||||
"PhysicalContext": "StorageDevice"
|
||||
}
|
||||
],
|
||||
"Location": {
|
||||
"PartLocation": {
|
||||
"ServiceLabel": "PSU 1",
|
||||
"LocationType": "Bay",
|
||||
"LocationOrdinalValue": 0
|
||||
}
|
||||
},
|
||||
"Links": {
|
||||
"Outlet": {
|
||||
"@odata.id": "https://redfishpdu.contoso.com/redfish/v1/PowerEquipment/RackPDUs/1/Outlets/A4"
|
||||
}
|
||||
},
|
||||
"Assembly": {
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Assembly"
|
||||
},
|
||||
"Metrics": {
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics"
|
||||
},
|
||||
"Actions": {
|
||||
"#PowerSupply.Reset": {
|
||||
"target": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Actions/PowerSupply.Reset"
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
Vendored
+19
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"@odata.type": "#PowerSupply.v1_8_0.PowerSupply",
|
||||
"Id": "Bay2",
|
||||
"Name": "Power Supply Bay 2",
|
||||
"Status": {
|
||||
"State": "Absent"
|
||||
},
|
||||
"PowerSupplyType": "PSU",
|
||||
"HotPluggable": false,
|
||||
"Location": {
|
||||
"PartLocation": {
|
||||
"ServiceLabel": "PSU 2",
|
||||
"LocationType": "Bay",
|
||||
"LocationOrdinalValue": 1
|
||||
}
|
||||
},
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"@odata.type": "#PowerSupplyCollection.PowerSupplyCollection",
|
||||
"Name": "Power Supply Collection",
|
||||
"Members@odata.count": 2,
|
||||
"Members": [
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1"
|
||||
},
|
||||
{
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2"
|
||||
}
|
||||
],
|
||||
"@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies",
|
||||
"@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright."
|
||||
}
|
||||
Reference in new issue
Block a user