From c8bcd5ace129bbd0e98011fc3fa85c4871d8c1b2 Mon Sep 17 00:00:00 2001 From: Christian Manivong Date: Mon, 12 Oct 2026 23:42:14 +0000 Subject: [PATCH] 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. --- tests/conftest.py | 112 +++++++++ .../dmtf-public-localstorage/COMMANDS.txt | 17 ++ .../1U/Drives/32ADF365C6C1B7BD/index.json | 40 +++ .../1U/Drives/35D38F11ACEF7BD3/index.json | 46 ++++ .../1U/Drives/3D58ECBC375FD9F2/index.json | 49 ++++ .../1U/Drives/3F5A8C54207B7233/index.json | 46 ++++ .../Chassis/1U/Power/index.json | 139 +++++++++++ .../Chassis/1U/Thermal/index.json | 159 ++++++++++++ .../Chassis/1U/index.json | 46 ++++ .../dmtf-public-localstorage/LICENSE.md | 29 +++ .../Systems/437XR1138R2/Storage/1/index.json | 73 ++++++ .../Systems/437XR1138R2/Storage/index.json | 12 + .../AccountService/Accounts/1/index.json | 33 +++ .../AccountService/Accounts/2/index.json | 38 +++ .../AccountService/Accounts/index.json | 12 + .../AccountService/index.json | 160 ++++++++++++ .../dmtf-public-rackmount1/COMMANDS.txt | 66 +++++ .../Chassis/1U/Power/index.json | 139 +++++++++++ .../PowerSupplies/Bay1/Metrics/index.json | 85 +++++++ .../PowerSupplies/Bay1/index.json | 99 ++++++++ .../PowerSupplies/Bay2/index.json | 19 ++ .../PowerSubsystem/PowerSupplies/index.json | 15 ++ .../Chassis/1U/PowerSubsystem/index.json | 47 ++++ .../Chassis/1U/Sensors/CPU1Temp/index.json | 83 +++++++ .../Chassis/1U/Sensors/CPUFan1/index.json | 36 +++ .../Chassis/1U/Sensors/IntakeTemp/index.json | 16 ++ .../1U/Sensors/PS1InputVoltage/index.json | 41 +++ .../Chassis/1U/Sensors/TotalPower/index.json | 53 ++++ .../Chassis/1U/Sensors/index.json | 132 ++++++++++ .../Chassis/1U/Thermal/index.json | 159 ++++++++++++ .../1U/ThermalSubsystem/Fans/Bay1/index.json | 31 +++ .../1U/ThermalSubsystem/Fans/Bay2/index.json | 31 +++ .../1U/ThermalSubsystem/Fans/CPU1/index.json | 31 +++ .../1U/ThermalSubsystem/Fans/CPU2/index.json | 31 +++ .../1U/ThermalSubsystem/Fans/index.json | 21 ++ .../ThermalMetrics/index.json | 37 +++ .../Chassis/1U/ThermalSubsystem/index.json | 57 +++++ .../Chassis/1U/index.json | 104 ++++++++ .../dmtf-public-rackmount1/Chassis/index.json | 12 + .../dmtf-public-rackmount1/LICENSE.md | 29 +++ .../BMC/EthernetInterfaces/ToHost/index.json | 57 +++++ .../BMC/EthernetInterfaces/eth0/index.json | 83 +++++++ .../BMC/EthernetInterfaces/index.json | 16 ++ .../BMC/LogServices/Log/Entries/index.json | 30 +++ .../Managers/BMC/LogServices/Log/index.json | 24 ++ .../Managers/BMC/LogServices/index.json | 13 + .../Managers/BMC/NetworkProtocol/index.json | 87 +++++++ .../Managers/BMC/index.json | 100 ++++++++ .../Managers/index.json | 12 + .../SessionService/Sessions/index.json | 15 ++ .../SessionService/index.json | 19 ++ .../LogServices/Log1/Entries/index.json | 49 ++++ .../437XR1138R2/LogServices/Log1/index.json | 24 ++ .../437XR1138R2/LogServices/index.json | 13 + .../437XR1138R2/Memory/DIMM1/index.json | 41 +++ .../437XR1138R2/Memory/DIMM2/index.json | 41 +++ .../437XR1138R2/Memory/DIMM3/index.json | 41 +++ .../437XR1138R2/Memory/DIMM4/index.json | 23 ++ .../Systems/437XR1138R2/Memory/index.json | 21 ++ .../437XR1138R2/Processors/CPU1/index.json | 68 +++++ .../437XR1138R2/Processors/CPU2/index.json | 19 ++ .../437XR1138R2/Processors/FPGA1/index.json | 88 +++++++ .../Systems/437XR1138R2/Processors/index.json | 18 ++ .../437XR1138R2/SimpleStorage/1/index.json | 48 ++++ .../437XR1138R2/SimpleStorage/index.json | 12 + .../Systems/437XR1138R2/index.json | 233 ++++++++++++++++++ .../dmtf-public-rackmount1/Systems/index.json | 12 + .../FirmwareInventory/BIOS/index.json | 35 +++ .../FirmwareInventory/BMC/index.json | 48 ++++ .../FirmwareInventory/SS/index.json | 34 +++ .../FirmwareInventory/index.json | 18 ++ .../dmtf-public-rackmount1/index.json | 66 +++++ .../dmtf-public-telemetry/COMMANDS.txt | 11 + .../fixtures/dmtf-public-telemetry/LICENSE.md | 29 +++ .../Managers/1/NetworkProtocol/index.json | 61 +++++ .../Systems/1/ResetActionInfo/index.json | 24 ++ .../Systems/1/index.json | 133 ++++++++++ 77 files changed, 4051 insertions(+) create mode 100644 tests/conftest.py create mode 100644 tests/fixtures/dmtf-public-localstorage/COMMANDS.txt create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/32ADF365C6C1B7BD/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/35D38F11ACEF7BD3/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3D58ECBC375FD9F2/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3F5A8C54207B7233/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Power/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/Thermal/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Chassis/1U/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/LICENSE.md create mode 100644 tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/1/index.json create mode 100644 tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/AccountService/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/COMMANDS.txt create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Power/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPU1Temp/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPUFan1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/IntakeTemp/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/PS1InputVoltage/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/TotalPower/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Thermal/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/ThermalMetrics/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/1U/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Chassis/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/LICENSE.md create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/ToHost/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/eth0/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/Entries/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/NetworkProtocol/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/BMC/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Managers/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/SessionService/Sessions/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/SessionService/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/Entries/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM3/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM4/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/FPGA1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/1/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/Systems/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BIOS/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BMC/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/SS/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/index.json create mode 100644 tests/fixtures/dmtf-public-rackmount1/index.json create mode 100644 tests/fixtures/dmtf-public-telemetry/COMMANDS.txt create mode 100644 tests/fixtures/dmtf-public-telemetry/LICENSE.md create mode 100644 tests/fixtures/dmtf-public-telemetry/Managers/1/NetworkProtocol/index.json create mode 100644 tests/fixtures/dmtf-public-telemetry/Systems/1/ResetActionInfo/index.json create mode 100644 tests/fixtures/dmtf-public-telemetry/Systems/1/index.json diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 0000000..1ebd55c --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,112 @@ +"""Shared helpers for loading the recorded Redfish responses under tests/fixtures/.""" + +import json +import re +from pathlib import Path +from urllib.parse import urlsplit + +import pytest +import responses + +FIXTURES = Path(__file__).parent / "fixtures" +PREFIX = "/redfish/v1" + + +def fixture_file(mockup: str, path: str) -> Path: + """Map a request path to its file: /redfish/v1/X/Y -> /X/Y/index.json.""" + path = path.split("#", 1)[0].split("?", 1)[0].rstrip("/") + if not path.startswith(PREFIX): + raise ValueError(f"not a Redfish path: {path}") + relative = path[len(PREFIX):].lstrip("/") + return FIXTURES / mockup / relative / "index.json" + + +def load(mockup: str, path: str) -> dict: + return json.loads(fixture_file(mockup, path).read_text()) + + +@pytest.fixture +def rackmount(): + """Loader for the DMTF public-rackmount1 mockup.""" + return lambda path: load("dmtf-public-rackmount1", path) + + +@pytest.fixture +def localstorage(): + """Loader for the DMTF public-localstorage mockup.""" + return lambda path: load("dmtf-public-localstorage", path) + + +@pytest.fixture +def telemetry(): + """Loader for the DMTF public-telemetry mockup.""" + return lambda path: load("dmtf-public-telemetry", path) + + +BASE_URL = "https://bmc.example.net" +SESSIONS = "/redfish/v1/SessionService/Sessions" +SESSION_PATH = SESSIONS + "/0123456789abcdef" +TOKEN = "secret-session-token" + + +class MockupServer: + """Serve a fixture mockup over mocked HTTP, plus a SessionService that hands out one token. + + Unknown paths return a Redfish error body with 404, like a real service. ``override`` + replaces the answer for one method and path (the path may include a query string). + """ + + def __init__(self, rsps, mockup: str): + self.rsps = rsps + self.mockup = mockup + self.overrides: dict[tuple[str, str], tuple[int, dict, dict]] = {} + anything = re.compile(re.escape(BASE_URL) + r"/.*") + for method in (responses.GET, responses.POST, responses.DELETE): + rsps.add_callback(method, anything, callback=self._handle) + + def override(self, method: str, path: str, status: int, body: dict | str | None = None, + headers: dict | None = None): + self.overrides[(method, path)] = (status, body if body is not None else {}, headers or {}) + + @staticmethod + def _reply(status, body, headers=None): + if isinstance(body, str): + text = body + else: + text = json.dumps(body) if body != {} or status != 204 else "" + return status, {"Content-Type": "application/json", **(headers or {})}, text + + def _handle(self, request): + parts = urlsplit(request.url) + for key in ((request.method, f"{parts.path}?{parts.query}"), (request.method, parts.path)): + if key in self.overrides: + return self._reply(*self.overrides[key]) + if request.method == "POST" and parts.path == SESSIONS: + return self._reply(201, {"@odata.id": SESSION_PATH, "Id": "0123456789abcdef"}, + {"X-Auth-Token": TOKEN, "Location": BASE_URL + SESSION_PATH}) + if request.method == "DELETE" and parts.path == SESSION_PATH: + return self._reply(204, {}) + if request.method == "GET": + try: + return self._reply(200, load(self.mockup, parts.path)) + except (FileNotFoundError, ValueError): + pass + return self._reply(404, {"error": {"code": "Base.1.0.ResourceMissingAtURI", + "message": f"{parts.path} not found"}}) + + def calls(self, method: str | None = None, path: str | None = None): + return [c for c in self.rsps.calls + if (method is None or c.request.method == method) + and (path is None or urlsplit(c.request.url).path == path)] + + +@pytest.fixture +def http(): + with responses.RequestsMock(assert_all_requests_are_fired=False) as rsps: + yield rsps + + +@pytest.fixture +def server(http): + """The public-rackmount1 mockup served on BASE_URL.""" + return MockupServer(http, "dmtf-public-rackmount1") diff --git a/tests/fixtures/dmtf-public-localstorage/COMMANDS.txt b/tests/fixtures/dmtf-public-localstorage/COMMANDS.txt new file mode 100644 index 0000000..2786cdf --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/COMMANDS.txt @@ -0,0 +1,17 @@ +Source: https://github.com/DMTF/Redfish-Publications +Commit: 4f81814e399213c9055863ddaff42791c6b3706a +Mockup: mockups/public-localstorage + +Files are unmodified copies. Each request path maps to /index.json +(the service root is ./index.json), as in the mockup and as served by Redfish-Mockup-Server. + +Request paths: +GET /redfish/v1/Chassis/1U +GET /redfish/v1/Chassis/1U/Thermal +GET /redfish/v1/Chassis/1U/Power +GET /redfish/v1/Systems/437XR1138R2/Storage +GET /redfish/v1/Systems/437XR1138R2/Storage/1 +GET /redfish/v1/Chassis/1U/Drives/35D38F11ACEF7BD3 +GET /redfish/v1/Chassis/1U/Drives/3F5A8C54207B7233 +GET /redfish/v1/Chassis/1U/Drives/32ADF365C6C1B7BD +GET /redfish/v1/Chassis/1U/Drives/3D58ECBC375FD9F2 diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/32ADF365C6C1B7BD/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/32ADF365C6C1B7BD/index.json new file mode 100644 index 0000000..25c6944 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/32ADF365C6C1B7BD/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/35D38F11ACEF7BD3/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/35D38F11ACEF7BD3/index.json new file mode 100644 index 0000000..aef2536 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/35D38F11ACEF7BD3/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3D58ECBC375FD9F2/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3D58ECBC375FD9F2/index.json new file mode 100644 index 0000000..02a626b --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3D58ECBC375FD9F2/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3F5A8C54207B7233/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3F5A8C54207B7233/index.json new file mode 100644 index 0000000..571eae4 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Drives/3F5A8C54207B7233/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Power/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Power/index.json new file mode 100644 index 0000000..c0862b3 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Power/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Thermal/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Thermal/index.json new file mode 100644 index 0000000..db748c5 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/Thermal/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Chassis/1U/index.json b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/index.json new file mode 100644 index 0000000..c621258 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Chassis/1U/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/LICENSE.md b/tests/fixtures/dmtf-public-localstorage/LICENSE.md new file mode 100644 index 0000000..231cf4a --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014-2025, Contributing Member(s) of Distributed Management Task +Force, Inc.. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/1/index.json b/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/1/index.json new file mode 100644 index 0000000..695a1e6 --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/1/index.json @@ -0,0 +1,73 @@ +{ + "@odata.type": "#Storage.v1_23_0.Storage", + "Id": "1", + "Name": "Local Storage Controller", + "Description": "Integrated RAID Controller", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + }, + "StorageControllers": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1#/StorageControllers/0", + "MemberId": "0", + "Name": "Contoso Integrated RAID", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Identifiers": [ + { + "DurableNameFormat": "NAA", + "DurableName": "345C59DBD970859C" + } + ], + "Manufacturer": "Contoso", + "Model": "12Gbs Integrated RAID", + "SerialNumber": "2M220100SL", + "PartNumber": "CT18754", + "SpeedGbps": 12, + "FirmwareVersion": "1.0.0.7", + "SupportedControllerProtocols": [ + "PCIe" + ], + "SupportedDeviceProtocols": [ + "SAS", + "SATA" + ], + "CacheSummary": { + "TotalCacheSizeMiB": 1024, + "PersistentCacheSizeMiB": 1024, + "Status": { + "State": "Enabled", + "Health": "OK" + } + } + } + ], + "Drives": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/Drives/35D38F11ACEF7BD3" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/Drives/3F5A8C54207B7233" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/Drives/32ADF365C6C1B7BD" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/Drives/3D58ECBC375FD9F2" + } + ], + "Volumes": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1/Volumes" + }, + "Actions": { + "#Storage.SetEncryptionKey": { + "target": "/redfish/v1/Systems/437XR1138R2/Storage/1/Actions/Storage.SetEncryptionKey" + } + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/index.json b/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/index.json new file mode 100644 index 0000000..096299f --- /dev/null +++ b/tests/fixtures/dmtf-public-localstorage/Systems/437XR1138R2/Storage/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#StorageCollection.StorageCollection", + "Name": "Storage Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage/1" + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Storage", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/1/index.json b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/1/index.json new file mode 100644 index 0000000..95f3b12 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/1/index.json @@ -0,0 +1,33 @@ +{ + "@odata.type": "#ManagerAccount.v1_14_2.ManagerAccount", + "Id": "1", + "Name": "User Account", + "Description": "User Account", + "Enabled": true, + "Password": null, + "PasswordChangeRequired": false, + "AccountTypes": [ + "Redfish" + ], + "UserName": "Administrator", + "EmailAddress": "Tiffany@contoso.com", + "PhoneNumber": "312-555-1212", + "OneTimePasscodeDeliveryAddress": "3125551212@smsrelay.contoso.com", + "RoleId": "Administrator", + "Locked": false, + "Certificates": { + "@odata.id": "/redfish/v1/AccountService/Accounts/1/Certificates" + }, + "Links": { + "Role": { + "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" + } + }, + "Actions": { + "#ManagerAccount.ChangePassword": { + "target": "/redfish/v1/AccountService/Accounts/1/Actions/ManagerAccount.ChangePassword" + } + }, + "@odata.id": "/redfish/v1/AccountService/Accounts/1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/2/index.json b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/2/index.json new file mode 100644 index 0000000..24252ff --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/2/index.json @@ -0,0 +1,38 @@ +{ + "@odata.type": "#ManagerAccount.v1_14_2.ManagerAccount", + "Id": "2", + "Name": "Employee #457", + "Description": "This user is both a Redfish administrator and a SNMPv3 user.", + "Enabled": true, + "Password": null, + "UserName": "contoso_employee457", + "MFABypass": { + "BypassTypes": [ + "All" + ] + }, + "RoleId": "Administrator", + "Locked": false, + "AccountTypes": [ + "Redfish", + "SNMP" + ], + "SNMP": { + "AuthenticationKey": null, + "AuthenticationProtocol": "None", + "EncryptionKey": null, + "EncryptionProtocol": "CFB128_AES128" + }, + "Links": { + "Role": { + "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" + } + }, + "Actions": { + "#ManagerAccount.ChangePassword": { + "target": "/redfish/v1/AccountService/Accounts/2/Actions/ManagerAccount.ChangePassword" + } + }, + "@odata.id": "/redfish/v1/AccountService/Accounts/2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/index.json b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/index.json new file mode 100644 index 0000000..f509d47 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/AccountService/Accounts/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#ManagerAccountCollection.ManagerAccountCollection", + "Name": "Accounts Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/AccountService/Accounts/1" + } + ], + "@odata.id": "/redfish/v1/AccountService/Accounts", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/AccountService/index.json b/tests/fixtures/dmtf-public-rackmount1/AccountService/index.json new file mode 100644 index 0000000..e21b775 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/AccountService/index.json @@ -0,0 +1,160 @@ +{ + "@odata.type": "#AccountService.v1_19_0.AccountService", + "Id": "AccountService", + "Name": "Account Service", + "Description": "Account Service", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "ServiceEnabled": true, + "AuthFailureLoggingThreshold": 3, + "MinPasswordLength": 8, + "AccountLockoutThreshold": 5, + "AccountLockoutDuration": 30, + "AccountLockoutCounterResetAfter": 30, + "AccountLockoutCounterResetEnabled": true, + "EnforcePasswordHistoryCount": 10, + "Accounts": { + "@odata.id": "/redfish/v1/AccountService/Accounts" + }, + "Roles": { + "@odata.id": "/redfish/v1/AccountService/Roles" + }, + "LocalAccountAuth": "Enabled", + "MultiFactorAuth": { + "OneTimePasscode": { + "Enabled": true + } + }, + "LDAP": { + "AccountProviderType": "LDAPService", + "ServiceEnabled": false, + "ServiceAddresses": [ + "ldaps://ldap.example.org:636" + ], + "Authentication": { + "AuthenticationType": "UsernameAndPassword", + "Username": "cn=Manager,dc=example,dc=org", + "Password": null + }, + "LDAPService": { + "SearchSettings": { + "BaseDistinguishedNames": [ + "dc=example,dc=org" + ], + "UsernameAttribute": "uid", + "GroupsAttribute": "memberof", + "EmailAttribute": "mail" + } + }, + "RemoteRoleMapping": [ + { + "RemoteUser": "cn=Manager,dc=example,dc=org", + "LocalRole": "Administrator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole", + "ManagerConsole" + ] + }, + { + "RemoteGroup": "cn=Admins,ou=Groups,dc=example,dc=org", + "LocalRole": "Administrator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole", + "ManagerConsole" + ] + }, + { + "RemoteGroup": "cn=PowerUsers,ou=Groups,dc=example,dc=org", + "LocalRole": "Operator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole" + ] + }, + { + "RemoteGroup": "(cn=*)", + "LocalRole": "ReadOnly", + "LocalAccountTypes": [ + "Redfish" + ] + } + ] + }, + "ActiveDirectory": { + "AccountProviderType": "ActiveDirectoryService", + "ServiceEnabled": true, + "ServiceAddresses": [ + "ad1.example.org", + "ad2.example.org", + null, + null + ], + "Authentication": { + "AuthenticationType": "KerberosKeytab", + "KerberosKeytab": null + }, + "RemoteRoleMapping": [ + { + "RemoteGroup": "Administrators", + "LocalRole": "Administrator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole", + "ManagerConsole" + ] + }, + { + "RemoteUser": "DOMAIN\\Bob", + "LocalRole": "Operator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole" + ] + }, + { + "RemoteGroup": "PowerUsers", + "LocalRole": "Operator", + "LocalAccountTypes": [ + "Redfish", + "HostConsole" + ] + }, + { + "RemoteGroup": "Everybody", + "LocalRole": "ReadOnly", + "LocalAccountTypes": [ + "Redfish" + ] + } + ] + }, + "OAuth2": { + "AccountProviderType": "OAuth2", + "ServiceEnabled": true, + "ServiceAddresses": [ + "https://contoso.org/.well-known/oauth-authorization-server" + ], + "OAuth2Service": { + "Mode": "Discovery", + "Issuer": "https://contoso.org/services/oauth2", + "Audience": [ + "23:11:8A:33:CF:EA", + "92384634-2938-2342-8820-489239905423" + ], + "OAuthServiceSigningKeys": "ewogICAgImtleXMiOiBbCiAgICAgICAgewogICAgICAgICAgICAiZSI6ICJBUUFCIiwKICAgICAgICAgICAgImtpZCI6ICJvV1F2Tl8tRUxnd25HMzFNTEl4Rm5hTVlfNTd0Wk9FSUVQYnpaYlBqS2FBIiwKICAgICAgICAgICAgImt0eSI6ICJSU0EiLAogICAgICAgICAgICAibiI6ICJvYS1Kb2pkSGw2VHQ3N2Vma2h6aW5MMU9XNmZjMGhjQjloOTN2WUZyRVlPakozRjhfTFh1c1ItMW95MUFKdExZcF9KeVI4Q1ZET28yVGNCaTBuSkhKczF1dkN4WWljX202WE5vMHptVm1VQ2hVMnBYSlBGelZKRGV5VVhIWWVONG5yQ1k4XzlTLXlzWnlKa2RRaWJmeHlBRndUMHdpNlZldF9MYTE4N3JNZUFCU0tXdEdIVmpkOWk1UmhELWNGU1JaNk05M0s2bXFPUUpaX0pMXzJKUU93aGk5dFl4Q2drVVpqc1gyWXowMEZpdUVTWDhHcXRGQlI1UzhIT2p0b2FhZUJrTk5hYWZFOFdSUVl6QlVmOHpiNkVobUFMemc0Z0YxTVhRb3dZV25GcGpzYXcwNVRONHk3SWZJUVhLODlqbGxnbWFkWVVjbndaUmRMc1o2VTdBS1EiCiAgICAgICAgfQogICAgXQp9" + } + }, + "AdditionalExternalAccountProviders": { + "@odata.id": "/redfish/v1/AccountService/ExternalAccountProviders" + }, + "OutboundConnections": { + "@odata.id": "/redfish/v1/AccountService/OutboundConnections" + }, + "RequireChangePasswordAction": false, + "@odata.id": "/redfish/v1/AccountService", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/COMMANDS.txt b/tests/fixtures/dmtf-public-rackmount1/COMMANDS.txt new file mode 100644 index 0000000..15a7aa7 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/COMMANDS.txt @@ -0,0 +1,66 @@ +Source: https://github.com/DMTF/Redfish-Publications +Commit: 4f81814e399213c9055863ddaff42791c6b3706a +Mockup: mockups/public-rackmount1 + +Files are unmodified copies. Each request path maps to /index.json +(the service root is ./index.json), as in the mockup and as served by Redfish-Mockup-Server. + +Request paths: +GET /redfish/v1/ +GET /redfish/v1/Systems +GET /redfish/v1/Systems/437XR1138R2 +GET /redfish/v1/Systems/437XR1138R2/Processors +GET /redfish/v1/Systems/437XR1138R2/Processors/CPU1 +GET /redfish/v1/Systems/437XR1138R2/Processors/CPU2 +GET /redfish/v1/Systems/437XR1138R2/Processors/FPGA1 +GET /redfish/v1/Systems/437XR1138R2/Memory +GET /redfish/v1/Systems/437XR1138R2/Memory/DIMM1 +GET /redfish/v1/Systems/437XR1138R2/Memory/DIMM2 +GET /redfish/v1/Systems/437XR1138R2/Memory/DIMM3 +GET /redfish/v1/Systems/437XR1138R2/Memory/DIMM4 +GET /redfish/v1/Systems/437XR1138R2/SimpleStorage +GET /redfish/v1/Systems/437XR1138R2/SimpleStorage/1 +GET /redfish/v1/Systems/437XR1138R2/LogServices +GET /redfish/v1/Systems/437XR1138R2/LogServices/Log1 +GET /redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries +GET /redfish/v1/Chassis +GET /redfish/v1/Chassis/1U +GET /redfish/v1/Chassis/1U/Thermal +GET /redfish/v1/Chassis/1U/Power +GET /redfish/v1/Chassis/1U/ThermalSubsystem +GET /redfish/v1/Chassis/1U/ThermalSubsystem/Fans +GET /redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay1 +GET /redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay2 +GET /redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU1 +GET /redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU2 +GET /redfish/v1/Chassis/1U/ThermalSubsystem/ThermalMetrics +GET /redfish/v1/Chassis/1U/PowerSubsystem +GET /redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies +GET /redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1 +GET /redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics +GET /redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2 +GET /redfish/v1/Chassis/1U/Sensors +GET /redfish/v1/Chassis/1U/Sensors/CPU1Temp +GET /redfish/v1/Chassis/1U/Sensors/IntakeTemp +GET /redfish/v1/Chassis/1U/Sensors/CPUFan1 +GET /redfish/v1/Chassis/1U/Sensors/TotalPower +GET /redfish/v1/Chassis/1U/Sensors/PS1InputVoltage +GET /redfish/v1/Managers +GET /redfish/v1/Managers/BMC +GET /redfish/v1/Managers/BMC/EthernetInterfaces +GET /redfish/v1/Managers/BMC/EthernetInterfaces/eth0 +GET /redfish/v1/Managers/BMC/EthernetInterfaces/ToHost +GET /redfish/v1/Managers/BMC/NetworkProtocol +GET /redfish/v1/Managers/BMC/LogServices +GET /redfish/v1/Managers/BMC/LogServices/Log +GET /redfish/v1/Managers/BMC/LogServices/Log/Entries +GET /redfish/v1/AccountService +GET /redfish/v1/AccountService/Accounts +GET /redfish/v1/AccountService/Accounts/1 +GET /redfish/v1/AccountService/Accounts/2 +GET /redfish/v1/UpdateService/FirmwareInventory +GET /redfish/v1/UpdateService/FirmwareInventory/BMC +GET /redfish/v1/UpdateService/FirmwareInventory/SS +GET /redfish/v1/UpdateService/FirmwareInventory/BIOS +GET /redfish/v1/SessionService +GET /redfish/v1/SessionService/Sessions diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Power/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Power/index.json new file mode 100644 index 0000000..a9af33c --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Power/index.json @@ -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": "System Input Power", + "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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics/index.json new file mode 100644 index 0000000..9b70c74 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/Metrics/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/index.json new file mode 100644 index 0000000..e63a0b4 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2/index.json new file mode 100644 index 0000000..b8b4f07 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/index.json new file mode 100644 index 0000000..9c87502 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/PowerSupplies/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/index.json new file mode 100644 index 0000000..e971aa0 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/PowerSubsystem/index.json @@ -0,0 +1,47 @@ +{ + "@odata.type": "#PowerSubsystem.v1_2_0.PowerSubsystem", + "Id": "PowerSubsystem", + "Name": "Power Subsystem for Chassis", + "CapacityWatts": 2000, + "Allocation": { + "RequestedWatts": 1500, + "AllocatedWatts": 1200 + }, + "PowerSupplyRedundancy": [ + { + "RedundancyType": "Failover", + "MaxSupportedInGroup": 2, + "MinNeededInGroup": 1, + "MinNeededForFaultTolerance": 2, + "RedundancyGroup": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay2" + } + ], + "ActiveRedundancyGroup": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies/Bay1" + } + ], + "Status": { + "State": "UnavailableOffline", + "Health": "OK" + } + } + ], + "PowerSupplies": { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/PowerSupplies" + }, + "Batteries": { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem/Batteries" + }, + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPU1Temp/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPU1Temp/index.json new file mode 100644 index 0000000..e77355e --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPU1Temp/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPUFan1/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPUFan1/index.json new file mode 100644 index 0000000..d49350f --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/CPUFan1/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/IntakeTemp/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/IntakeTemp/index.json new file mode 100644 index 0000000..123cb98 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/IntakeTemp/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/PS1InputVoltage/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/PS1InputVoltage/index.json new file mode 100644 index 0000000..49358c1 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/PS1InputVoltage/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/TotalPower/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/TotalPower/index.json new file mode 100644 index 0000000..010d1a2 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/TotalPower/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/index.json new file mode 100644 index 0000000..df437b8 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Sensors/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Thermal/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Thermal/index.json new file mode 100644 index 0000000..db748c5 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/Thermal/index.json @@ -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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay1/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay1/index.json new file mode 100644 index 0000000..330c1db --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay1/index.json @@ -0,0 +1,31 @@ +{ + "@odata.type": "#Fan.v1_6_0.Fan", + "Id": "Bay1", + "Name": "Fan Bay 1", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PhysicalContext": "Chassis", + "Model": "RKS-440DC", + "Manufacturer": "Contoso Fans", + "PartNumber": "23456-133", + "SparePartNumber": "93284-133", + "LocationIndicatorActive": true, + "HotPluggable": true, + "SpeedPercent": { + "Reading": 45, + "SpeedRPM": 2200, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/FanBay1" + }, + "RatedSpeedRPM": 4900, + "Location": { + "PartLocation": { + "ServiceLabel": "Chassis Fan Bay 1", + "LocationType": "Bay", + "LocationOrdinalValue": 0 + } + }, + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay2/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay2/index.json new file mode 100644 index 0000000..3860deb --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/Bay2/index.json @@ -0,0 +1,31 @@ +{ + "@odata.type": "#Fan.v1_6_0.Fan", + "Id": "Bay2", + "Name": "Fan Bay 2", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PhysicalContext": "Chassis", + "Model": "RKS-440DC", + "Manufacturer": "Contoso Fans", + "PartNumber": "23456-133", + "SparePartNumber": "93284-133", + "LocationIndicatorActive": false, + "HotPluggable": true, + "SpeedPercent": { + "Reading": 45, + "SpeedRPM": 2400, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/FanBay2" + }, + "RatedSpeedRPM": 4900, + "Location": { + "PartLocation": { + "ServiceLabel": "Chassis Fan Bay 2", + "LocationType": "Bay", + "LocationOrdinalValue": 1 + } + }, + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU1/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU1/index.json new file mode 100644 index 0000000..9c31445 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU1/index.json @@ -0,0 +1,31 @@ +{ + "@odata.type": "#Fan.v1_6_0.Fan", + "Id": "CPU1", + "Name": "Fan for CPU 1", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PhysicalContext": "CPU", + "Model": "RKS-440DC", + "Manufacturer": "Contoso Fans", + "PartNumber": "23456-133", + "SparePartNumber": "93284-133", + "LocationIndicatorActive": false, + "HotPluggable": false, + "SpeedPercent": { + "Reading": 45, + "SpeedRPM": 1490, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/CPUFan1" + }, + "RatedSpeedRPM": 3300, + "Location": { + "PartLocation": { + "ServiceLabel": "CPU #1 Fan", + "LocationType": "Bay", + "LocationOrdinalValue": 0 + } + }, + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU2/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU2/index.json new file mode 100644 index 0000000..06bdb40 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/CPU2/index.json @@ -0,0 +1,31 @@ +{ + "@odata.type": "#Fan.v1_6_0.Fan", + "Id": "CPU2", + "Name": "Fan for CPU 2", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PhysicalContext": "CPU", + "Model": "RKS-440DC", + "Manufacturer": "Contoso Fans", + "PartNumber": "23456-133", + "SparePartNumber": "93284-133", + "LocationIndicatorActive": false, + "HotPluggable": false, + "SpeedPercent": { + "Reading": 45, + "SpeedRPM": 1490, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/CPUFan2" + }, + "RatedSpeedRPM": 3300, + "Location": { + "PartLocation": { + "ServiceLabel": "CPU #2 Fan", + "LocationType": "Bay", + "LocationOrdinalValue": 1 + } + }, + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/index.json new file mode 100644 index 0000000..a8de534 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/Fans/index.json @@ -0,0 +1,21 @@ +{ + "@odata.type": "#FanCollection.FanCollection", + "Name": "Fan Club", + "Members@odata.count": 4, + "Members": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay1" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay2" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU1" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU2" + } + ], + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/ThermalMetrics/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/ThermalMetrics/index.json new file mode 100644 index 0000000..abac31b --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/ThermalMetrics/index.json @@ -0,0 +1,37 @@ +{ + "@odata.type": "#ThermalMetrics.v1_3_3.ThermalMetrics", + "Id": "ThermalMetrics", + "Name": "Chassis Thermal Metrics", + "TemperatureSummaryCelsius": { + "Internal": { + "Reading": 39, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/CPU1Temp" + }, + "Intake": { + "Reading": 24.8, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/IntakeTemp" + }, + "Ambient": { + "Reading": 22.5, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/AmbientTemp" + }, + "Exhaust": { + "Reading": 40.5, + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/ExhaustTemp" + } + }, + "TemperatureReadingsCelsius": [ + { + "Reading": 24.8, + "DeviceName": "Intake", + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/IntakeTemp" + }, + { + "Reading": 40.5, + "DeviceName": "Exhaust", + "DataSourceUri": "/redfish/v1/Chassis/1U/Sensors/ExhaustTemp" + } + ], + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/ThermalMetrics", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/index.json new file mode 100644 index 0000000..53bcf67 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/ThermalSubsystem/index.json @@ -0,0 +1,57 @@ +{ + "@odata.type": "#ThermalSubsystem.v1_5_0.ThermalSubsystem", + "Id": "ThermalSubsystem", + "Name": "Thermal Subsystem for Chassis", + "FanRedundancy": [ + { + "RedundancyType": "NPlusM", + "MaxSupportedInGroup": 2, + "MinNeededInGroup": 1, + "MinNeededForFaultTolerance": 2, + "RedundancyGroup": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay1" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/Bay2" + } + ], + "Status": { + "State": "Enabled", + "Health": "OK" + } + }, + { + "RedundancyType": "NPlusM", + "MaxSupportedInGroup": 2, + "MinNeededInGroup": 1, + "MinNeededForFaultTolerance": 2, + "RedundancyGroup": [ + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU1" + }, + { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans/CPU2" + } + ], + "Status": { + "State": "Disabled" + } + } + ], + "Fans": { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Fans" + }, + "ThermalMetrics": { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/ThermalMetrics" + }, + "Heaters": { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem/Heaters" + }, + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/index.json new file mode 100644 index 0000000..35dae85 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/1U/index.json @@ -0,0 +1,104 @@ +{ + "@odata.type": "#Chassis.v1_29_0.Chassis", + "Id": "1U", + "Name": "Computer System Chassis", + "ChassisType": "RackMount", + "AssetTag": "Portland-45Z-2381", + "Manufacturer": "Contoso", + "Model": "3500RX", + "SKU": "8675309", + "SerialNumber": "437XR1138R2", + "PartNumber": "224071-J23", + "PowerState": "On", + "LocationIndicatorActive": true, + "RackUnits": "EIA_310", + "HeightRackUnits": 1, + "HeightMm": 44.45, + "WidthMm": 431.8, + "DepthMm": 711, + "WeightKg": 15.31, + "Location": { + "PhysicalAddress": { + "Country": "US", + "StateOrProvince": "Oregon", + "City": "Portland", + "StreetAddress": "1001 SW 5th Avenue", + "PostalCode": "97204", + "ISOCountryCode": "USA", + "ISOSubdivisionCode": "OR" + }, + "Placement": { + "Row": "North", + "Rack": "WEB43", + "RackOffsetUnits": "EIA_310", + "RackOffset": 12, + "Room": "35", + "FacilityName": "Onsite-Main" + } + }, + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "ThermalSubsystem": { + "@odata.id": "/redfish/v1/Chassis/1U/ThermalSubsystem" + }, + "PowerSubsystem": { + "@odata.id": "/redfish/v1/Chassis/1U/PowerSubsystem" + }, + "EnvironmentMetrics": { + "@odata.id": "/redfish/v1/Chassis/1U/EnvironmentMetrics" + }, + "Sensors": { + "@odata.id": "/redfish/v1/Chassis/1U/Sensors" + }, + "Controls": { + "@odata.id": "/redfish/v1/Chassis/1U/Controls" + }, + "TrustedComponents": { + "@odata.id": "/redfish/v1/Chassis/1U/TrustedComponents" + }, + "Thermal@Redfish.Deprecated": "Please migrate to use /redfish/v1/Chassis/1U/ThermalSubsystem", + "Thermal": { + "@odata.id": "/redfish/v1/Chassis/1U/Thermal" + }, + "Power@Redfish.Deprecated": "Please migrate to use /redfish/v1/Chassis/1U/PowerSubsystem", + "Power": { + "@odata.id": "/redfish/v1/Chassis/1U/Power" + }, + "Links": { + "ComputerSystems": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ], + "ManagersInChassis": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ] + }, + "Actions": { + "#Chassis.Reset": { + "target": "/redfish/v1/Chassis/1U/Actions/Chassis.Reset", + "ResetType@Redfish.AllowableValues": [ + "On", + "ForceOff", + "GracefulShutdown", + "GracefulRestart", + "ForceRestart", + "Nmi", + "ForceOn", + "PushPowerButton", + "FullPowerCycle" + ] + } + }, + "@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." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Chassis/index.json b/tests/fixtures/dmtf-public-rackmount1/Chassis/index.json new file mode 100644 index 0000000..9066a5e --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Chassis/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#ChassisCollection.ChassisCollection", + "Name": "Chassis Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Chassis/1U" + } + ], + "@odata.id": "/redfish/v1/Chassis", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/LICENSE.md b/tests/fixtures/dmtf-public-rackmount1/LICENSE.md new file mode 100644 index 0000000..231cf4a --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014-2025, Contributing Member(s) of Distributed Management Task +Force, Inc.. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/ToHost/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/ToHost/index.json new file mode 100644 index 0000000..9b3cffd --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/ToHost/index.json @@ -0,0 +1,57 @@ +{ + "@odata.type": "#EthernetInterface.v1_12_6.EthernetInterface", + "Id": "ToHost", + "Name": "Manager Ethernet Interface", + "Description": "Management Network Interface", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "InterfaceEnabled": true, + "PermanentMACAddress": "AA:BB:CC:DD:EE:FF", + "MACAddress": "AA:BB:CC:DD:EE:FF", + "SpeedMbps": 100, + "AutoNeg": true, + "FullDuplex": true, + "MTUSize": 1500, + "HostName": "bmc-host-interface", + "FQDN": "bmc-host-interface.dmtf.org", + "MaxIPv6StaticAddresses": 1, + "IPv4Addresses": [ + { + "Address": "192.168.20.55", + "SubnetMask": "255.255.255.0", + "AddressOrigin": "Static", + "Gateway": "192.168.20.1" + } + ], + "IPv6AddressPolicyTable": [ + { + "Prefix": "::1/128", + "Precedence": 50, + "Label": 0 + } + ], + "IPv6StaticAddresses": [ + { + "Address": "fe80::1ec1:deff:fe6f:1e24", + "PrefixLength": 64 + } + ], + "IPv6DefaultGateway": "fe80::1ec1:deff:fe6f:1e24", + "IPv6Addresses": [ + { + "Address": "fe80::1ec1:deff:fe6f:1e24", + "PrefixLength": 64, + "AddressOrigin": "Static", + "AddressState": "Preferred" + } + ], + "Links": { + "HostInterface": { + "@odata.id": "/redfish/v1/Managers/BMC/HostInterfaces/1" + } + }, + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/ToHost", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/eth0/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/eth0/index.json new file mode 100644 index 0000000..e74eba6 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/eth0/index.json @@ -0,0 +1,83 @@ +{ + "@odata.type": "#EthernetInterface.v1_12_6.EthernetInterface", + "Id": "eth0", + "Name": "Manager Ethernet Interface", + "Description": "Management network interface on a dedicated port", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "LinkStatus": "LinkUp", + "InterfaceEnabled": true, + "PermanentMACAddress": "23:11:8A:33:CF:EA", + "MACAddress": "23:11:8A:33:CF:EA", + "SpeedMbps": 100, + "AutoNeg": true, + "FullDuplex": true, + "MTUSize": 1500, + "HostName": "web483-bmc", + "FQDN": "web483-bmc.dmtf.org", + "MaxIPv6StaticAddresses": 1, + "VLAN": { + "VLANEnable": true, + "VLANId": 101 + }, + "IPv4Addresses": [ + { + "Address": "192.168.0.10", + "SubnetMask": "255.255.252.0", + "AddressOrigin": "DHCP", + "Gateway": "192.168.0.1" + } + ], + "IPv6AddressPolicyTable": [ + { + "Prefix": "::1/128", + "Precedence": 50, + "Label": 0 + } + ], + "IPv6StaticAddresses": [ + { + "Address": "fe80::1ec1:deff:fe6f:1e24", + "PrefixLength": 16 + } + ], + "IPv6DefaultGateway": "fe80::1ec1:deff:fe6f:1e24", + "IPv6Addresses": [ + { + "Address": "fe80::1ec1:deff:fe6f:1e24", + "PrefixLength": 64, + "AddressOrigin": "SLAAC", + "AddressState": "Preferred" + } + ], + "NameServers": [ + "names.dmtf.org" + ], + "Links": { + "Ports": [ + { + "@odata.id": "/redfish/v1/Managers/BMC/DedicatedNetworkPorts/1" + } + ] + }, + "@Redfish.Settings": { + "@odata.type": "#Settings.v1_5_0.Settings", + "SettingsObject": { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0/SD" + }, + "Time": "2012-03-07T14:44.30-05:00", + "ETag": "84ffcbb050ddc7fa9cddb59014546e59", + "Messages": [ + { + "MessageId": "Base.1.0.SettingsFailed", + "RelatedProperties": [ + "/IPv6Addresses/PrefixLength" + ] + } + ] + }, + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/index.json new file mode 100644 index 0000000..bfd84db --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/EthernetInterfaces/index.json @@ -0,0 +1,16 @@ +{ + "@odata.type": "#EthernetInterfaceCollection.EthernetInterfaceCollection", + "Name": "Ethernet Network Interface Collection", + "Description": "Collection of EthernetInterfaces for this Manager", + "Members@odata.count": 2, + "Members": [ + { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/eth0" + }, + { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces/ToHost" + } + ], + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/Entries/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/Entries/index.json new file mode 100644 index 0000000..83b2e53 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/Entries/index.json @@ -0,0 +1,30 @@ +{ + "@odata.type": "#LogEntryCollection.LogEntryCollection", + "Name": "Log Service Collection", + "Description": "Collection of Logs for this System", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries/1", + "@odata.type": "#LogEntry.v1_22_0.LogEntry", + "Id": "1", + "Name": "Log Entry 1", + "EntryType": "Event", + "Severity": "Critical", + "Created": "2012-03-07T14:44:00Z", + "SensorNumber": 1, + "Message": "System May be Melting", + "MessageId": "Event.1.0.TempWayTooHot", + "MessageArgs": [ + "88" + ], + "Links": { + "OriginOfCondition": { + "@odata.id": "/redfish/v1/Chassis/1U/Thermal" + } + } + } + ], + "@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/index.json new file mode 100644 index 0000000..6d2dbdf --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/Log/index.json @@ -0,0 +1,24 @@ +{ + "@odata.type": "#LogService.v1_9_0.LogService", + "Id": "Log", + "Name": "System Log Service", + "MaxNumberOfRecords": 1000, + "OverWritePolicy": "WrapsWhenFull", + "DateTime": "2015-03-13T04:14:33+06:00", + "DateTimeLocalOffset": "+06:00", + "ServiceEnabled": true, + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Actions": { + "#LogService.ClearLog": { + "target": "/redfish/v1/Managers/BMC/LogServices/Log/Actions/LogService.ClearLog" + } + }, + "Entries": { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log/Entries" + }, + "@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/index.json new file mode 100644 index 0000000..0de6f42 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/LogServices/index.json @@ -0,0 +1,13 @@ +{ + "@odata.type": "#LogServiceCollection.LogServiceCollection", + "Name": "Log Service Collection", + "Description": "Collection of Log Services for this Manager", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices/Log" + } + ], + "@odata.id": "/redfish/v1/Managers/BMC/LogServices", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/NetworkProtocol/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/NetworkProtocol/index.json new file mode 100644 index 0000000..0444ca2 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/NetworkProtocol/index.json @@ -0,0 +1,87 @@ +{ + "@odata.type": "#ManagerNetworkProtocol.v1_14_0.ManagerNetworkProtocol", + "Id": "NetworkProtocol", + "Name": "Manager Network Protocol", + "Description": "Manager Network Service", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "HostName": "web483-bmc", + "FQDN": "web483-bmc.dmtf.org", + "HTTP": { + "ProtocolEnabled": true, + "Port": 80 + }, + "HTTPS": { + "ProtocolEnabled": true, + "Port": 443, + "Certificates": { + "@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol/HTTPS/Certificates" + } + }, + "Proxy": { + "Enabled": true, + "ProxyServerURI": "https://proxy.intranet.contoso.com:9900", + "Username": "proxy", + "Password": null, + "PasswordSet": true, + "ExcludeAddresses": [], + "ProxyAutoConfigURI": "proxy.intranet.contoso.com/proxy.pac" + }, + "IPMI": { + "ProtocolEnabled": true, + "Port": 623 + }, + "SSH": { + "ProtocolEnabled": true, + "Port": 22 + }, + "SNMP": { + "ProtocolEnabled": true, + "EnableSNMPv1": true, + "EnableSNMPv2c": false, + "EnableSNMPv3": true, + "Port": 161, + "CommunityStrings": [ + { + "Name": "Read-only community", + "CommunityString": null, + "AccessMode": "Limited" + }, + { + "Name": "Full access community", + "CommunityString": null, + "AccessMode": "Full" + } + ], + "EngineId": { + "PrivateEnterpriseId": "00 00 01 9C", + "EnterpriseSpecificMethod": "00 11 22 33 44 55 66 77" + }, + "HideCommunityStrings": true, + "AuthenticationProtocol": "HMAC_SHA96", + "EncryptionProtocol": "CFB128_AES128" + }, + "VirtualMedia": { + "ProtocolEnabled": true, + "Port": 17988 + }, + "SSDP": { + "ProtocolEnabled": true, + "Port": 1900, + "NotifyMulticastIntervalSeconds": 600, + "NotifyTTL": 5, + "NotifyIPv6Scope": "Site" + }, + "Telnet": { + "ProtocolEnabled": true, + "Port": 23 + }, + "KVMIP": { + "ProtocolEnabled": true, + "Port": 5288 + }, + "@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/index.json new file mode 100644 index 0000000..52003b4 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/BMC/index.json @@ -0,0 +1,100 @@ +{ + "@odata.type": "#Manager.v1_25_0.Manager", + "Id": "BMC", + "Name": "Manager", + "ManagerType": "BMC", + "Description": "Contoso BMC", + "ServiceEntryPointUUID": "92384634-2938-2342-8820-489239905423", + "UUID": "58893887-8974-2487-2389-841168418919", + "Model": "Joo Janta 200", + "DateTime": "2015-03-13T04:14:33+06:00", + "DateTimeLocalOffset": "+06:00", + "DateTimeSource": "NTP", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "PowerState": "On", + "GraphicalConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 2, + "ConnectTypesSupported": [ + "KVMIP" + ] + }, + "SerialConsole": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 1, + "ConnectTypesSupported": [ + "Telnet", + "SSH", + "IPMI" + ] + }, + "CommandShell": { + "ServiceEnabled": true, + "MaxConcurrentSessions": 4, + "ConnectTypesSupported": [ + "Telnet", + "SSH" + ] + }, + "FirmwareVersion": "1.45.455b66-rev4", + "AdditionalFirmwareVersions": { + "Bootloader": "v2022.01", + "Kernel": "Linux 5.13.0-30-generic arm71", + "Oem": { + "Contoso": { + "@odata.type": "#ContosoSoftwareInventory.v1_0_0.AdditionalVersions", + "ManagementApp": "1.30" + } + } + }, + "NetworkProtocol": { + "@odata.id": "/redfish/v1/Managers/BMC/NetworkProtocol" + }, + "EthernetInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/EthernetInterfaces" + }, + "HostInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/HostInterfaces" + }, + "SerialInterfaces": { + "@odata.id": "/redfish/v1/Managers/BMC/SerialInterfaces" + }, + "LogServices": { + "@odata.id": "/redfish/v1/Managers/BMC/LogServices" + }, + "DedicatedNetworkPorts": { + "@odata.id": "/redfish/v1/Managers/BMC/DedicatedNetworkPorts" + }, + "SecurityPolicy": { + "@odata.id": "/redfish/v1/Managers/BMC/SecurityPolicy" + }, + "Links": { + "ManagerForServers": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2" + } + ], + "ManagerForChassis": [ + { + "@odata.id": "/redfish/v1/Chassis/1U" + } + ], + "ManagerInChassis": { + "@odata.id": "/redfish/v1/Chassis/1U" + } + }, + "Actions": { + "#Manager.Reset": { + "target": "/redfish/v1/Managers/BMC/Actions/Manager.Reset", + "ResetType@Redfish.AllowableValues": [ + "ForceRestart", + "GracefulRestart" + ] + } + }, + "@odata.id": "/redfish/v1/Managers/BMC", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Managers/index.json b/tests/fixtures/dmtf-public-rackmount1/Managers/index.json new file mode 100644 index 0000000..2de8374 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Managers/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#ManagerCollection.ManagerCollection", + "Name": "Manager Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ], + "@odata.id": "/redfish/v1/Managers", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/SessionService/Sessions/index.json b/tests/fixtures/dmtf-public-rackmount1/SessionService/Sessions/index.json new file mode 100644 index 0000000..c89fdfa --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/SessionService/Sessions/index.json @@ -0,0 +1,15 @@ +{ + "@odata.type": "#SessionCollection.SessionCollection", + "Name": "Session Collection", + "Members@odata.count": 2, + "Members": [ + { + "@odata.id": "/redfish/v1/SessionService/Sessions/1234567890ABCDEF" + }, + { + "@odata.id": "/redfish/v1/SessionService/Sessions/1234567890ABCDEG" + } + ], + "@odata.id": "/redfish/v1/SessionService/Sessions", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/SessionService/index.json b/tests/fixtures/dmtf-public-rackmount1/SessionService/index.json new file mode 100644 index 0000000..27d658e --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/SessionService/index.json @@ -0,0 +1,19 @@ +{ + "@odata.type": "#SessionService.v1_2_0.SessionService", + "Id": "SessionService", + "Name": "Session Service", + "Description": "Session Service", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "ServiceEnabled": true, + "SessionTimeout": 30, + "AbsoluteSessionTimeout": 3600, + "AbsoluteSessionTimeoutEnabled": true, + "Sessions": { + "@odata.id": "/redfish/v1/SessionService/Sessions" + }, + "@odata.id": "/redfish/v1/SessionService", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/Entries/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/Entries/index.json new file mode 100644 index 0000000..50c62a5 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/Entries/index.json @@ -0,0 +1,49 @@ +{ + "@odata.type": "#LogEntryCollection.LogEntryCollection", + "Name": "Log Service Collection", + "Description": "Collection of Logs for this System", + "Members@odata.count": 2, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries/1", + "@odata.type": "#LogEntry.v1_22_0.LogEntry", + "Id": "1", + "Name": "Log Entry 1", + "EntryType": "SEL", + "Severity": "Critical", + "Created": "2012-03-07T14:44:00Z", + "EntryCode": "Upper Critical - going high", + "SensorType": "Temperature", + "SensorNumber": 1, + "Message": "Temperature threshold exceeded", + "MessageId": "0x592A28", + "Links": { + "OriginOfCondition": { + "@odata.id": "/redfish/v1/Chassis/1U/Thermal" + } + } + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries/2", + "@odata.type": "#LogEntry.v1_22_0.LogEntry", + "Id": "2", + "Name": "Log Entry 2", + "EntryType": "SEL", + "Severity": "Critical", + "Created": "2012-03-07T14:45:00Z", + "EntryCode": "Upper Critical - going high", + "SensorType": "Temperature", + "SensorNumber": 2, + "Message": "Temperature threshold exceeded", + "MessageId": "0x592E28", + "Links": { + "OriginOfCondition": { + "@odata.id": "/redfish/v1/Chassis/1U/Thermal" + } + } + } + ], + "@odata.nextLink": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries?$skiptoken=2", + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/index.json new file mode 100644 index 0000000..4a80e14 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/Log1/index.json @@ -0,0 +1,24 @@ +{ + "@odata.type": "#LogService.v1_9_0.LogService", + "Id": "Log1", + "Name": "System Log Service", + "MaxNumberOfRecords": 1000, + "OverWritePolicy": "WrapsWhenFull", + "DateTime": "2015-03-13T04:14:33+06:00", + "DateTimeLocalOffset": "+06:00", + "ServiceEnabled": true, + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Actions": { + "#LogService.ClearLog": { + "target": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Actions/LogService.ClearLog" + } + }, + "Entries": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1/Entries" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/index.json new file mode 100644 index 0000000..fb9f651 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/LogServices/index.json @@ -0,0 +1,13 @@ +{ + "@odata.type": "#LogServiceCollection.LogServiceCollection", + "Name": "Log Service Collection", + "Description": "Collection of Logs for this System", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices/Log1" + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM1/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM1/index.json new file mode 100644 index 0000000..051c553 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM1/index.json @@ -0,0 +1,41 @@ +{ + "@odata.type": "#Memory.v1_24_0.Memory", + "Id": "DIMM1", + "Name": "DIMM Slot 1", + "RankCount": 2, + "MaxTDPMilliWatts": [ + 12000 + ], + "CapacityMiB": 32768, + "DataWidthBits": 64, + "BusWidthBits": 72, + "ErrorCorrection": "MultiBitECC", + "MemoryLocation": { + "Socket": 1, + "MemoryController": 1, + "Channel": 1, + "Slot": 1 + }, + "Location": { + "PartLocation": { + "ServiceLabel": "DIMM 1", + "LocationType": "Slot", + "LocationOrdinalValue": 0 + } + }, + "MemoryType": "DRAM", + "MemoryDeviceType": "DDR4", + "BaseModuleType": "RDIMM", + "MemoryMedia": [ + "DRAM" + ], + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "EnvironmentMetrics": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM1/EnvironmentMetrics" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM2/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM2/index.json new file mode 100644 index 0000000..1a6a577 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM2/index.json @@ -0,0 +1,41 @@ +{ + "@odata.type": "#Memory.v1_24_0.Memory", + "Id": "DIMM2", + "Name": "DIMM Slot 2", + "RankCount": 2, + "MaxTDPMilliWatts": [ + 12000 + ], + "CapacityMiB": 32768, + "DataWidthBits": 64, + "BusWidthBits": 72, + "ErrorCorrection": "MultiBitECC", + "MemoryLocation": { + "Socket": 1, + "MemoryController": 1, + "Channel": 1, + "Slot": 2 + }, + "Location": { + "PartLocation": { + "ServiceLabel": "DIMM 2", + "LocationType": "Slot", + "LocationOrdinalValue": 1 + } + }, + "MemoryType": "DRAM", + "MemoryDeviceType": "DDR4", + "BaseModuleType": "RDIMM", + "MemoryMedia": [ + "DRAM" + ], + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "EnvironmentMetrics": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM2/EnvironmentMetrics" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM3/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM3/index.json new file mode 100644 index 0000000..be59d2a --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM3/index.json @@ -0,0 +1,41 @@ +{ + "@odata.type": "#Memory.v1_24_0.Memory", + "Id": "DIMM3", + "Name": "DIMM Slot 3", + "RankCount": 2, + "MaxTDPMilliWatts": [ + 12000 + ], + "CapacityMiB": 32768, + "DataWidthBits": 64, + "BusWidthBits": 72, + "ErrorCorrection": "MultiBitECC", + "MemoryLocation": { + "Socket": 2, + "MemoryController": 2, + "Channel": 1, + "Slot": 3 + }, + "Location": { + "PartLocation": { + "ServiceLabel": "DIMM 3", + "LocationType": "Slot", + "LocationOrdinalValue": 2 + } + }, + "MemoryType": "DRAM", + "MemoryDeviceType": "DDR4", + "BaseModuleType": "RDIMM", + "MemoryMedia": [ + "DRAM" + ], + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "EnvironmentMetrics": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM3/EnvironmentMetrics" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM3", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM4/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM4/index.json new file mode 100644 index 0000000..f9b71b1 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/DIMM4/index.json @@ -0,0 +1,23 @@ +{ + "@odata.type": "#Memory.v1_24_0.Memory", + "Id": "DIMM4", + "Name": "DIMM Slot 4", + "MemoryLocation": { + "Socket": 2, + "MemoryController": 2, + "Channel": 1, + "Slot": 4 + }, + "Location": { + "PartLocation": { + "ServiceLabel": "DIMM 4", + "LocationType": "Slot", + "LocationOrdinalValue": 3 + } + }, + "Status": { + "State": "Absent" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM4", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/index.json new file mode 100644 index 0000000..0abde07 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Memory/index.json @@ -0,0 +1,21 @@ +{ + "@odata.type": "#MemoryCollection.MemoryCollection", + "Name": "Memory Module Collection", + "Members@odata.count": 4, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM1" + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM2" + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM3" + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory/DIMM4" + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU1/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU1/index.json new file mode 100644 index 0000000..9e701e8 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU1/index.json @@ -0,0 +1,68 @@ +{ + "@odata.type": "#Processor.v1_24_0.Processor", + "Id": "CPU1", + "Name": "Processor", + "Socket": "CPU 1", + "ProcessorType": "CPU", + "ProcessorArchitecture": "x86", + "InstructionSet": "x86-64", + "Manufacturer": "Intel(R) Corporation", + "Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", + "ProcessorId": { + "VendorId": "GenuineIntel", + "IdentificationRegisters": "0x34AC34DC8901274A", + "EffectiveFamily": "0x42", + "EffectiveModel": "0x61", + "Step": "0x1", + "MicrocodeInfo": "0x429943" + }, + "Location": { + "PartLocation": { + "ServiceLabel": "CPU 1", + "LocationType": "Socket", + "LocationOrdinalValue": 0 + } + }, + "AdditionalFirmwareVersions": { + "Microcode": "0x46" + }, + "MaxSpeedMHz": 3700, + "OperatingSpeedMHz": 2333, + "OperatingSpeedRangeMHz": { + "DataSourceUri": "/redfish/v1/Chassis/1U/Controls/CPU1Freq", + "ControlMode": "Automatic", + "AllowableMin": 1200, + "SettingMin": 2000, + "SettingMax": 2400, + "AllowableMax": 3700 + }, + "TotalCores": 8, + "TotalThreads": 16, + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "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" + ], + "OriginOfCondition": { + "@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPU1Temp" + } + } + ] + }, + "EnvironmentMetrics": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1/EnvironmentMetrics" + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU2/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU2/index.json new file mode 100644 index 0000000..903a8d1 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/CPU2/index.json @@ -0,0 +1,19 @@ +{ + "@odata.type": "#Processor.v1_24_0.Processor", + "Id": "CPU2", + "Name": "Processor", + "Socket": "CPU 2", + "ProcessorType": "CPU", + "Status": { + "State": "Absent" + }, + "Location": { + "PartLocation": { + "ServiceLabel": "CPU 2", + "LocationType": "Socket", + "LocationOrdinalValue": 1 + } + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/FPGA1/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/FPGA1/index.json new file mode 100644 index 0000000..737da22 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/FPGA1/index.json @@ -0,0 +1,88 @@ +{ + "@odata.type": "#Processor.v1_24_0.Processor", + "Id": "FPGA1", + "Name": "FPGA", + "ProcessorType": "FPGA", + "ProcessorArchitecture": "OEM", + "InstructionSet": "OEM", + "Manufacturer": "Intel(R) Corporation", + "Model": "Stratix 10", + "UUID": "00000000-0000-0000-0000-000000000000", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Metrics": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1/ProcessorMetrics" + }, + "Location": { + "PartLocation": { + "ServiceLabel": "U168", + "LocationType": "Embedded", + "LocationOrdinalValue": 0 + } + }, + "TDPWatts": 120, + "MaxTDPWatts": 150, + "ProcessorMemory": [ + { + "IntegratedMemory": true, + "MemoryType": "HBM2", + "CapacityMiB": 512, + "SpeedMHz": 1066 + } + ], + "FPGA": { + "FpgaType": "Discrete", + "Model": "Stratix10", + "FirmwareId": "0x6400002fc614bb9", + "FirmwareManufacturer": "Intel(R) Corporation", + "FirmwareVersion": "Blue v.1.00.86", + "HostInterface": { + "InterfaceType": "PCIe", + "PCIe": { + "MaxPCIeType": "Gen4", + "MaxLanes": 8 + } + }, + "ExternalInterfaces": [ + { + "InterfaceType": "Ethernet", + "Ethernet": { + "MaxSpeedMbps": 10240, + "MaxLanes": 4 + } + } + ], + "PCIeVirtualFunctions": 1, + "ProgrammableFromHost": true, + "ReconfigurationSlots": [ + { + "SlotId": "AFU0", + "UUID": "00000000-0000-0000-0000-000000000000", + "ProgrammableFromHost": true, + "AccelerationFunction": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1/AccelerationFunctions/Compression" + } + } + ] + }, + "AccelerationFunctions": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1/AccelerationFunctions" + }, + "Links": { + "Endpoints": [], + "ConnectedProcessors": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1" + } + ] + }, + "Actions": { + "#Processor.Reset": { + "target": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1/Actions/Processor.Reset" + } + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/index.json new file mode 100644 index 0000000..56997dd --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/Processors/index.json @@ -0,0 +1,18 @@ +{ + "@odata.type": "#ProcessorCollection.ProcessorCollection", + "Name": "Processors Collection", + "Members@odata.count": 3, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU1" + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/CPU2" + }, + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors/FPGA1" + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/1/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/1/index.json new file mode 100644 index 0000000..b126769 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/1/index.json @@ -0,0 +1,48 @@ +{ + "@odata.type": "#SimpleStorage.v1_3_2.SimpleStorage", + "Id": "1", + "Name": "Simple Storage Controller", + "Description": "System SATA", + "UefiDevicePath": "Acpi(PNP0A03,0)/Pci(1F|1)/Ata(Primary,Master)/HD(Part3, Sig00110011)", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "Warning" + }, + "Devices": [ + { + "Name": "SATA Bay 1", + "Manufacturer": "Contoso", + "Model": "3000GT8", + "CapacityBytes": 8000000000000, + "Status": { + "State": "Enabled", + "Health": "OK" + } + }, + { + "Name": "SATA Bay 2", + "Manufacturer": "Contoso", + "Model": "3000GT7", + "CapacityBytes": 4000000000000, + "Status": { + "State": "Enabled", + "Health": "Warning" + } + }, + { + "Name": "SATA Bay 3", + "Status": { + "State": "Absent" + } + }, + { + "Name": "SATA Bay 4", + "Status": { + "State": "Absent" + } + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/index.json new file mode 100644 index 0000000..c876f42 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/SimpleStorage/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#SimpleStorageCollection.SimpleStorageCollection", + "Name": "Simple Storage Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1" + } + ], + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/index.json new file mode 100644 index 0000000..274e77d --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/437XR1138R2/index.json @@ -0,0 +1,233 @@ +{ + "@odata.type": "#ComputerSystem.v1_29_0.ComputerSystem", + "Id": "437XR1138R2", + "Name": "WebFrontEnd483", + "SystemType": "Physical", + "AssetTag": "Chicago-45Z-2381", + "Manufacturer": "Contoso", + "Model": "3500", + "SubModel": "RX", + "SKU": "8675309", + "SerialNumber": "437XR1138R2", + "PartNumber": "224071-J23", + "Description": "Web Front End node", + "UUID": "38947555-7742-3448-3784-823347823834", + "HostName": "web483", + "BootImagePushURI": "/redfish/v1/Systems/437XR1138R2/BootImagePushURI", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "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" + ], + "OriginOfCondition": { + "@odata.id": "/redfish/v1/Chassis/1U/Sensors/CPU1Temp" + } + } + ] + }, + "HostingRoles": [ + "ApplicationServer" + ], + "IndicatorLED": "Off", + "PowerState": "On", + "Boot": { + "BootSourceOverrideEnabled": "Once", + "BootSourceOverrideTarget": "Pxe", + "BootSourceOverrideTarget@Redfish.AllowableValues": [ + "None", + "Pxe", + "Cd", + "Usb", + "Hdd", + "BiosSetup", + "Utilities", + "Diags", + "SDCard", + "UefiTarget" + ], + "BootSourceOverrideMode": "UEFI", + "UefiTargetBootSourceOverride": "/0x31/0x33/0x01/0x01" + }, + "TrustedModules": [ + { + "FirmwareVersion": "1.13b", + "InterfaceType": "TPM1_2", + "Status": { + "State": "Enabled", + "Health": "OK" + } + } + ], + "Oem": { + "Contoso": { + "@odata.type": "#Contoso.ComputerSystem", + "ProductionLocation": { + "FacilityName": "PacWest Production Facility", + "Country": "USA" + } + }, + "Chipwise": { + "@odata.type": "#Chipwise.ComputerSystem", + "Style": "Executive" + } + }, + "BootProgress": { + "LastState": "OSRunning", + "LastStateTime": "2021-03-13T04:14:13+06:00", + "LastBootTimeSeconds": 676 + }, + "LastResetTime": "2021-03-13T04:02:57+06:00", + "BiosVersion": "P79 v1.45 (12/06/2017)", + "ProcessorSummary": { + "Count": 2, + "Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", + "LogicalProcessorCount": 16, + "CoreCount": 8, + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + } + }, + "MemorySummary": { + "TotalSystemMemoryGiB": 96, + "TotalSystemPersistentMemoryGiB": 0, + "MemoryMirroring": "None", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + } + }, + "GraphicalConsole": { + "MaxConcurrentSessions": 4, + "VNC": { + "ServiceEnabled": true, + "Port": 5900, + "HostName": "10.1.2.3", + "AuthenticationMethod": "ExplicitLogin", + "SupportedAccessModes": [ + "ReadWrite", + "ReadOnly" + ], + "AllowsSharedAccess": true, + "SupportedEncodings": [ + "Raw", + "Tight", + "ZRLE" + ], + "SupportsOneTimePassword": true, + "SupportsPersistentPassword": true + }, + "HTML5": { + "ServiceEnabled": true, + "Port": 443, + "HostName": "bmc.example.com", + "ConsoleURI": "https://bmc.example.com/console", + "AuthenticationMethod": "ExplicitLogin", + "SupportedAccessModes": [ + "ReadWrite" + ], + "AllowsSharedAccess": false, + "SupportsOneTimeURL": true + }, + "KVMIP": { + "ServiceEnabled": false, + "Port": 7000, + "HostName": "10.1.2.3", + "AuthenticationMethod": "ExplicitLogin", + "SupportedAccessModes": [ + "ReadWrite" + ], + "AllowsSharedAccess": false + } + }, + "Bios": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Bios" + }, + "SecureBoot": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SecureBoot" + }, + "Processors": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Processors" + }, + "Memory": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Memory" + }, + "EthernetInterfaces": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/EthernetInterfaces" + }, + "SimpleStorage": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage" + }, + "LogServices": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/LogServices" + }, + "GraphicsControllers": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/GraphicsControllers" + }, + "USBControllers": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/USBControllers" + }, + "Certificates": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Certificates" + }, + "VirtualMedia": { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/VirtualMedia" + }, + "Links": { + "Chassis": [ + { + "@odata.id": "/redfish/v1/Chassis/1U" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ] + }, + "Actions": { + "#ComputerSystem.Reset": { + "target": "/redfish/v1/Systems/437XR1138R2/Actions/ComputerSystem.Reset", + "ResetType@Redfish.AllowableValues": [ + "On", + "ForceOff", + "GracefulShutdown", + "GracefulRestart", + "ForceRestart", + "Nmi", + "ForceOn", + "PushPowerButton", + "FullPowerCycle" + ] + }, + "#ComputerSystem.GraphicalConsoleGetOneTimeURL": { + "target": "/redfish/v1/Systems/437XR1138R2/Actions/ComputerSystem.GraphicalConsoleGetOneTimeURL" + }, + "#ComputerSystem.GraphicalConsoleSetOneTimePassword": { + "target": "/redfish/v1/Systems/437XR1138R2/Actions/ComputerSystem.GraphicalConsoleSetOneTimePassword" + }, + "#ComputerSystem.GraphicalConsoleSetPassword": { + "target": "/redfish/v1/Systems/437XR1138R2/Actions/ComputerSystem.GraphicalConsoleSetPassword" + }, + "Oem": { + "#Contoso.Reset": { + "target": "/redfish/v1/Systems/437XR1138R2/Oem/Contoso/Actions/Contoso.Reset" + } + } + }, + "@odata.id": "/redfish/v1/Systems/437XR1138R2", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/Systems/index.json b/tests/fixtures/dmtf-public-rackmount1/Systems/index.json new file mode 100644 index 0000000..af7ef3f --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/Systems/index.json @@ -0,0 +1,12 @@ +{ + "@odata.type": "#ComputerSystemCollection.ComputerSystemCollection", + "Name": "Computer System Collection", + "Members@odata.count": 1, + "Members": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2" + } + ], + "@odata.id": "/redfish/v1/Systems", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BIOS/index.json b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BIOS/index.json new file mode 100644 index 0000000..17b5c03 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BIOS/index.json @@ -0,0 +1,35 @@ +{ + "@odata.type": "#SoftwareInventory.v1_15_0.SoftwareInventory", + "Id": "BIOS", + "Name": "Contoso BIOS Firmware", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Updateable": true, + "Manufacturer": "Contoso", + "ReleaseDate": "2017-12-06T12:00:00Z", + "Version": "P79 v1.45", + "SoftwareId": "FEE82A67-6CE2-4625-9F44-237AD2402C28", + "LowestSupportedVersion": "P79 v1.10", + "RelatedItem": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Bios" + } + ], + "ImageState": "Active", + "Active": true, + "Staged": false, + "Armed": false, + "Links": { + "ActiveTargets": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/Bios" + } + ], + "StagedTargets": [], + "ArmedTargets": [] + }, + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BIOS", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BMC/index.json b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BMC/index.json new file mode 100644 index 0000000..defb6d0 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/BMC/index.json @@ -0,0 +1,48 @@ +{ + "@odata.type": "#SoftwareInventory.v1_15_0.SoftwareInventory", + "Id": "BMC", + "Name": "Contoso BMC Firmware", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Updateable": true, + "Manufacturer": "Contoso", + "ReleaseDate": "2017-08-22T12:00:00Z", + "Version": "1.45.455b66-rev4", + "SoftwareId": "1624A9DF-5E13-47FC-874A-DF3AFF143089", + "LowestSupportedVersion": "1.30.367a12-rev1", + "UefiDevicePaths": [ + "BMC(0x1,0x0ABCDEF)" + ], + "AdditionalVersions": { + "Bootloader": "v2022.01", + "Kernel": "Linux 5.13.0-30-generic arm71", + "Oem": { + "Contoso": { + "@odata.type": "#ContosoSoftwareInventory.v1_0_0.AdditionalVersions", + "ManagementApp": "1.30" + } + } + }, + "RelatedItem": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ], + "ImageState": "Active", + "Active": true, + "Staged": false, + "Armed": false, + "Links": { + "ActiveTargets": [ + { + "@odata.id": "/redfish/v1/Managers/BMC" + } + ], + "StagedTargets": [], + "ArmedTargets": [] + }, + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BMC", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/SS/index.json b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/SS/index.json new file mode 100644 index 0000000..b91165a --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/SS/index.json @@ -0,0 +1,34 @@ +{ + "@odata.type": "#SoftwareInventory.v1_15_0.SoftwareInventory", + "Id": "SS", + "Name": "Contoso Simple Storage Firmware", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "Updateable": true, + "Manufacturer": "Contoso", + "ReleaseDate": "2021-10-18T12:00:00Z", + "Version": "2.50", + "LowestSupportedVersion": "2.30.rev1", + "RelatedItem": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1" + } + ], + "ImageState": "Active", + "Active": true, + "Staged": false, + "Armed": false, + "Links": { + "ActiveTargets": [ + { + "@odata.id": "/redfish/v1/Systems/437XR1138R2/SimpleStorage/1" + } + ], + "StagedTargets": [], + "ArmedTargets": [] + }, + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/SS", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/index.json b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/index.json new file mode 100644 index 0000000..c30be38 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/UpdateService/FirmwareInventory/index.json @@ -0,0 +1,18 @@ +{ + "@odata.type": "#SoftwareInventoryCollection.SoftwareInventoryCollection", + "Name": "Firmware Collection", + "Members@odata.count": 2, + "Members": [ + { + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BMC" + }, + { + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/SS" + }, + { + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory/BIOS" + } + ], + "@odata.id": "/redfish/v1/UpdateService/FirmwareInventory", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-rackmount1/index.json b/tests/fixtures/dmtf-public-rackmount1/index.json new file mode 100644 index 0000000..6177142 --- /dev/null +++ b/tests/fixtures/dmtf-public-rackmount1/index.json @@ -0,0 +1,66 @@ +{ + "@odata.type": "#ServiceRoot.v1_22_0.ServiceRoot", + "Id": "RootService", + "Name": "Root Service", + "RedfishVersion": "1.15.0", + "UUID": "92384634-2938-2342-8820-489239905423", + "ProtocolFeaturesSupported": { + "ExpandQuery": { + "ExpandAll": true, + "Levels": true, + "MaxLevels": 6, + "Links": true, + "NoLinks": true + }, + "SelectQuery": false, + "FilterQuery": false, + "OnlyMemberQuery": true, + "ExcerptQuery": true + }, + "Systems": { + "@odata.id": "/redfish/v1/Systems" + }, + "Chassis": { + "@odata.id": "/redfish/v1/Chassis" + }, + "Managers": { + "@odata.id": "/redfish/v1/Managers" + }, + "Tasks": { + "@odata.id": "/redfish/v1/TaskService" + }, + "SessionService": { + "@odata.id": "/redfish/v1/SessionService" + }, + "AccountService": { + "@odata.id": "/redfish/v1/AccountService" + }, + "EventService": { + "@odata.id": "/redfish/v1/EventService" + }, + "Registries": { + "@odata.id": "/redfish/v1/Registries" + }, + "UpdateService": { + "@odata.id": "/redfish/v1/UpdateService" + }, + "CertificateService": { + "@odata.id": "/redfish/v1/CertificateService" + }, + "KeyService": { + "@odata.id": "/redfish/v1/KeyService" + }, + "ServiceConditions": { + "@odata.id": "/redfish/v1/ServiceConditions" + }, + "Links": { + "Sessions": { + "@odata.id": "/redfish/v1/SessionService/Sessions" + } + }, + "ComponentIntegrity": { + "@odata.id": "/redfish/v1/ComponentIntegrity" + }, + "@odata.id": "/redfish/v1/", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-telemetry/COMMANDS.txt b/tests/fixtures/dmtf-public-telemetry/COMMANDS.txt new file mode 100644 index 0000000..1904ecb --- /dev/null +++ b/tests/fixtures/dmtf-public-telemetry/COMMANDS.txt @@ -0,0 +1,11 @@ +Source: https://github.com/DMTF/Redfish-Publications +Commit: 4f81814e399213c9055863ddaff42791c6b3706a +Mockup: mockups/public-telemetry + +Files are unmodified copies. Each request path maps to /index.json +(the service root is ./index.json), as in the mockup and as served by Redfish-Mockup-Server. + +Request paths: +GET /redfish/v1/Systems/1 +GET /redfish/v1/Systems/1/ResetActionInfo +GET /redfish/v1/Managers/1/NetworkProtocol diff --git a/tests/fixtures/dmtf-public-telemetry/LICENSE.md b/tests/fixtures/dmtf-public-telemetry/LICENSE.md new file mode 100644 index 0000000..231cf4a --- /dev/null +++ b/tests/fixtures/dmtf-public-telemetry/LICENSE.md @@ -0,0 +1,29 @@ +BSD 3-Clause License + +Copyright (c) 2014-2025, Contributing Member(s) of Distributed Management Task +Force, Inc.. All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/tests/fixtures/dmtf-public-telemetry/Managers/1/NetworkProtocol/index.json b/tests/fixtures/dmtf-public-telemetry/Managers/1/NetworkProtocol/index.json new file mode 100644 index 0000000..fc38581 --- /dev/null +++ b/tests/fixtures/dmtf-public-telemetry/Managers/1/NetworkProtocol/index.json @@ -0,0 +1,61 @@ +{ + "@odata.type": "#ManagerNetworkProtocol.v1_14_0.ManagerNetworkProtocol", + "Id": "NetworkProtocol", + "Name": "Manager Network Protocol", + "Description": "Manager Network Service Status", + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "HostName": "mymanager", + "FQDN": "mymanager.mydomain.com", + "HTTP": { + "ProtocolEnabled": true, + "Port": 80 + }, + "HTTPS": { + "ProtocolEnabled": true, + "Port": 443 + }, + "IPMI": { + "ProtocolEnabled": true, + "Port": 623 + }, + "SSH": { + "ProtocolEnabled": true, + "Port": 22 + }, + "SNMP": { + "ProtocolEnabled": true, + "Port": 161 + }, + "VirtualMedia": { + "ProtocolEnabled": true, + "Port": 17988 + }, + "SSDP": { + "ProtocolEnabled": true, + "Port": 1900, + "NotifyMulticastIntervalSeconds": 600, + "NotifyTTL": 5, + "NotifyIPv6Scope": "Site" + }, + "Telnet": { + "ProtocolEnabled": true, + "Port": 23 + }, + "KVMIP": { + "ProtocolEnabled": true, + "Port": 5288 + }, + "NTP": { + "ProtocolEnabled": true, + "NTPServers": [ + "0.pool.ntp.org", + "1.pool.ntp.org", + "time-a.nist.gov" + ] + }, + "@odata.id": "/redfish/v1/Managers/1/NetworkProtocol", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-telemetry/Systems/1/ResetActionInfo/index.json b/tests/fixtures/dmtf-public-telemetry/Systems/1/ResetActionInfo/index.json new file mode 100644 index 0000000..722b374 --- /dev/null +++ b/tests/fixtures/dmtf-public-telemetry/Systems/1/ResetActionInfo/index.json @@ -0,0 +1,24 @@ +{ + "@odata.type": "#ActionInfo.v1_6_0.ActionInfo", + "Id": "ResetActionInfo", + "Name": "Reset Action Info", + "Parameters": [ + { + "Name": "ResetType", + "Required": true, + "DataType": "String", + "AllowableValues": [ + "On", + "ForceOff", + "GracefulShutdown", + "GracefulRestart", + "ForceRestart", + "Nmi", + "ForceOn", + "PushPowerButton" + ] + } + ], + "@odata.id": "/redfish/v1/Systems/1/ResetActionInfo", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file diff --git a/tests/fixtures/dmtf-public-telemetry/Systems/1/index.json b/tests/fixtures/dmtf-public-telemetry/Systems/1/index.json new file mode 100644 index 0000000..ed62c16 --- /dev/null +++ b/tests/fixtures/dmtf-public-telemetry/Systems/1/index.json @@ -0,0 +1,133 @@ +{ + "@odata.type": "#ComputerSystem.v1_29_0.ComputerSystem", + "Id": "1", + "Name": "My Computer System", + "SystemType": "Physical", + "AssetTag": "free form asset tag", + "Manufacturer": "Manufacturer Name", + "Model": "Model Name", + "SKU": "", + "SerialNumber": "2M220100SL", + "PartNumber": "", + "Description": "Description of server", + "UUID": "00000000-0000-0000-0000-000000000000", + "HostName": "web-srv344", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + }, + "IndicatorLED": "Off", + "PowerState": "On", + "Boot": { + "BootSourceOverrideEnabled": "Once", + "BootSourceOverrideMode": "UEFI", + "BootSourceOverrideTarget": "Pxe", + "BootSourceOverrideTarget@Redfish.AllowableValues": [ + "None", + "Pxe", + "Floppy", + "Cd", + "Usb", + "Hdd", + "BiosSetup", + "Utilities", + "Diags", + "UefiTarget", + "SDCard", + "UefiHttp", + "UefiBootNext" + ], + "UefiTargetBootSourceOverride": "" + }, + "BiosVersion": "P79 v1.00 (09/20/2013)", + "ProcessorSummary": { + "Count": 8, + "LogicalProcessorCount": 256, + "Model": "Multi-Core Intel(R) Xeon(R) processor 7xxx Series", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + } + }, + "MemorySummary": { + "TotalSystemMemoryGiB": 16, + "MemoryMirroring": "System", + "Status": { + "State": "Enabled", + "Health": "OK", + "HealthRollup": "OK" + } + }, + "TrustedModules": [ + { + "Status": { + "State": "Enabled", + "Health": "OK" + }, + "InterfaceType": "TPM2_0", + "FirmwareVersion": "3.1", + "FirmwareVersion2": "1", + "InterfaceTypeSelection": "None" + } + ], + "HostWatchdogTimer": { + "FunctionEnabled": true, + "WarningAction": "DiagnosticInterrupt", + "WarningAction@Redfish.AllowableValues": [ + "DiagnosticInterrupt", + "SMI", + "None" + ], + "TimeoutAction": "ResetSystem", + "TimeoutAction@Redfish.AllowableValues": [ + "ResetSystem", + "PowerCycle", + "PowerDown", + "None" + ], + "Status": { + "State": "StandbyOffline" + } + }, + "Processors": { + "@odata.id": "/redfish/v1/Systems/1/Processors" + }, + "Memory": { + "@odata.id": "/redfish/v1/Systems/1/Memory" + }, + "Links": { + "Chassis": [ + { + "@odata.id": "/redfish/v1/Chassis/1" + } + ], + "ManagedBy": [ + { + "@odata.id": "/redfish/v1/Managers/1" + } + ] + }, + "Actions": { + "#ComputerSystem.Reset": { + "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset", + "@Redfish.ActionInfo": "/redfish/v1/Systems/1/ResetActionInfo" + } + }, + "Oem": { + "Contoso": { + "@odata.type": "#Contoso.ComputerSystem", + "ProductionLocation": { + "FacilityName": "PacWest Production Facility", + "Country": "USA" + } + }, + "Chipwise": { + "@odata.type": "#Chipwise.ComputerSystem", + "Style": "Executive" + } + }, + "@odata.id": "/redfish/v1/Systems/1", + "@Redfish.Copyright": "Copyright 2014-2026 DMTF. For the full DMTF copyright policy, see http://www.dmtf.org/about/policies/copyright." +} \ No newline at end of file