| 1aa94df4 | 31-Jul-2025 |
Harshit Aghera <haghera@nvidia.com> |
sensor_utils: Add PeakReading property
Add support for PeakReading and PeakReadingTime for sensors. This enhancement allows sensor readings to include max observed value information in the Redfish A
sensor_utils: Add PeakReading property
Add support for PeakReading and PeakReadingTime for sensors. This enhancement allows sensor readings to include max observed value information in the Redfish API, along with timestamp. It uses PDI xyz.openbmc_project.Telemetry.Report. Property PeakReading is added if OperationType in PDI property ReadingParameters is set to Maximum.
Current Limitation - The ResetMetrics action is currently not supported for sensor URIs. As a result, the ability to clear PeakReading values for GPU Power Sensors has not been implemented.
Future Consideration - If ResetMetrics action support is added in the future, the corresponding functionality will also need to be implemented in the dbus-sensor application to ensure full compatibility.
Schema: https://redfish.dmtf.org/schemas/v1/Sensor.v1_2_0.yaml (PeakReading)
Backend implementation for reference: https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/82479
Tested: Build an image for nvl32-obmc machine with the following patches cherry picked.
https://gerrit.openbmc.org/c/openbmc/openbmc/+/85490 https://gerrit.openbmc.org/c/openbmc/bmcweb/+/82449.
The patch cherry-picks the following patches that are currently under review.
``` 1. device tree https://lore.kernel.org/all/aRbLqH8pLWCQryhu@molberding.nvidia.com/ 2. mctpd patches https://github.com/CodeConstruct/mctp/pull/85 3. u-boot changes https://lore.kernel.org/openbmc/20251121-msx4-v1-0-fc0118b666c1@nvidia.com/T/#t 4. kernel changes as specified in the openbmc patch (for espi) 5. entity-manager changes https://gerrit.openbmc.org/c/openbmc/entity-manager/+/85455 6. platform-init changes https://gerrit.openbmc.org/c/openbmc/platform-init/+/85456 7. spi changes https://lore.kernel.org/all/20251121-w25q01jv_fixup-v1-1-3d175050db73@nvidia.com/ ```
``` > curl -s -k -u 'root:0penBmc' https://10.137.203.137/redfish/v1/Chassis/NVIDIA_GB200_1/Sensors/power_NVIDIA_GB200_GPU_0_Power_0 { "@odata.id": "/redfish/v1/Chassis/NVIDIA_GB200_1/Sensors/power_NVIDIA_GB200_GPU_0_Power_0", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "power_NVIDIA_GB200_GPU_0_Power_0", "Name": "NVIDIA GB200 GPU 0 Power 0", "PeakReading": 52.671, "PeakReadingTime": 0, "Reading": 27.214, "ReadingRangeMax": 5000.0, "ReadingRangeMin": 0.0, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" } }% ````
Change-Id: I8c1ab6ce85f31419db4a1d931bf99722d24afbd7 Signed-off-by: Harshit Aghera <haghera@nvidia.com>
show more ...
|
| c2f428f5 | 17-Oct-2025 |
Oliver Brewka <oliver.brewka@9elements.com> |
Add remaining functions to systems_utils namespace
Initially, systems_utils.hpp has not defined its own namespace, all functions were under the redfish namespace. Patch 82078 [1] introduced systems_
Add remaining functions to systems_utils namespace
Initially, systems_utils.hpp has not defined its own namespace, all functions were under the redfish namespace. Patch 82078 [1] introduced systems_utils namespace to the header for new functionality.
This patch adds all functions, that haven't been part of the new namespace to systems_utils namespace and updates all call sites accordingly.
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/82078
Tested: Code compiles.
Change-Id: Ia6ac3edd36aacc22cbf1a6adae4e2b264932b43c Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
show more ...
|
| d9495964 | 16-Oct-2025 |
Thang Tran <thuutran@amperecomputing.com> |
Correct the version of Message Id
Applications are logging Redfish Message ID to journal, but the version of some message ID are different with the definition of bmcweb. E.g: - psusensor is defining
Correct the version of Message Id
Applications are logging Redfish Message ID to journal, but the version of some message ID are different with the definition of bmcweb. E.g: - psusensor is defining version of OpenBMC registry is "0.1" as [1]. - The bmcweb defines the version of OpenBMC registry is "0.5" as [2].
It makes the "MessageId" property of Event log's enties has different version with definition in the /redfish/v1/Registries.
This commit corrects the version of Message ID.
[1]: https://github.com/openbmc/dbus-sensors/blob/6b7123225fc4a5180faf89190e9f64a7e248e697/src/psu/PSUEvent.cpp#L121 [2]: https://github.com/openbmc/bmcweb/blob/master/redfish-core/include/registries/openbmc.json#L1678
Tested: Verify the version of Events are the same the version of Registries that are defined in the bmcweb.
Change-Id: Ib862c8d0a62cae63082436cb4646a9ca45207872 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
| 0ddb8edf | 15-Jul-2024 |
Ed Tanous <etanous@nvidia.com> |
Use std::format for hex conversions
Deprecate intoToHex handler now that we can do everything using std::format.
Tested: RSV passes Redfish protocol validator passes
Change-Id: I71000506573314d6c9
Use std::format for hex conversions
Deprecate intoToHex handler now that we can do everything using std::format.
Tested: RSV passes Redfish protocol validator passes
Change-Id: I71000506573314d6c9326c4677f5fbca1ca02b46 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 2ca56194 | 16-Sep-2025 |
Ed Tanous <etanous@nvidia.com> |
Add back include cleaner
Include cleaner helps the code review process. Add it back, by ignoring some of the more recent boost headers.
Change-Id: I6eddd0e67cd9f469c93fbb344cc1ab46231e450f Signed-
Add back include cleaner
Include cleaner helps the code review process. Add it back, by ignoring some of the more recent boost headers.
Change-Id: I6eddd0e67cd9f469c93fbb344cc1ab46231e450f Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 378f1d61 | 06-Oct-2022 |
George Liu <liuxiwei@inspur.com> |
Add PowerWatts for EnvironmentMetrics
The EnvironmentMetrics schema[1] provides for efficient retrieval of environmental metrics by separating them from performance metrics. EnvironmentMetrics is a
Add PowerWatts for EnvironmentMetrics
The EnvironmentMetrics schema[1] provides for efficient retrieval of environmental metrics by separating them from performance metrics. EnvironmentMetrics is a property of the Chassis schema since v1_15_0[2]. EnvironmentMetrics was added to Redfish release 2021.2 [3] to be used instead of the deprecated Power schema.[4]
This commit adds PowerWatts property of the EnvironmentMetrics schema. PowerWatts has been part of the EnvironmentMetrics schema since v1_1_0. PowerWatts is a SensorPowerExcerpt[5].
Implementation notes: The new D-Bus interface "xyz.openbmc_project.Sensor.Purpose" is used to find the sensor with the "TotalPower" purpose.[6][7] The new utility function sensor_utils::getSensorsByPurpose() returns a subset of an incoming list of sensors which implement a specified purpose.
Multiple D-Bus calls are needed to find the sensor providing the totalPower: 1. Retrieve list of power sensors associated with specified chassis which implement the Sensor.Purpose interface using existing getAllSensorObjects() function. 2. For each of those power sensors retrieve the actual purpose of the sensor to find the sensor implementing totalPower purpose. Expect no more than one sensor to implement this purpose. New utility function getSensorsByPurpose() is used. 3. If a totalPower sensor is found then retrieve its properties to fill in PowerWatts in the response using existing sensor_utils::objectExcerptToJson() utility function.
If no sensor has the "TotalPower" purpose then PowerWatts is not added to EnvironmentMetrics and no error is returned.
[1] https://redfish.dmtf.org/schemas/v1/EnvironmentMetrics.v1_3_2.json [2] https://redfish.dmtf.org/schemas/v1/Chassis.v1_25_2.json [3] http://redfish.dmtf.org/schemas/Redfish_Release_History.pdf [4] https://redfish.dmtf.org/schemas/v1/Power.v1_7_3.json [5] http://redfish.dmtf.org/schemas/v1/Sensor.v1_9_1.json#/definitions/SensorPowerExcerpt [6] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/75943 [7] https://gerrit.openbmc.org/c/openbmc/openpower-occ-control/+/77408
Tested: - Updated unit tests for new environmentMetricsNode enum - Redfish Service Validator passes (confirmed PowerWatts tested) ``` VERBOSE1 - ServiceRoot -> Chassis -> Members#4 -> EnvironmentMetrics, EnvironmentMetrics.v1_3_0, EnvironmentMetrics VERBOSE1 - @odata.id PASS VERBOSE1 - @odata.type PASS VERBOSE1 - Id PASS VERBOSE1 - Name PASS VERBOSE1 - PowerWatts PASS ``` - No "TotalPower" sensor exists (system never powered on). PowerWatts is not shown and no error is returned. ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/EnvironmentMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/EnvironmentMetrics", "@odata.type": "#EnvironmentMetrics.v1_3_0.EnvironmentMetrics", "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics" } ```
- "TotalPower" sensor exists (system powered on) ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system | grep PowerState "PowerState": "On",
curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/EnvironmentMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/EnvironmentMetrics", "@odata.type": "#EnvironmentMetrics.v1_3_0.EnvironmentMetrics", "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics", "PowerWatts": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/power_total_power", "Reading": 191.0 } } ``` DataSourceUri is a valid sensor: ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/power_total_power { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/power_total_power", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "power_total_power", "Name": "total power", "Reading": 191.0, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" } } ```
- "TotalPower" sensor exists but null value (system powered off) ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Systems/system | grep PowerState "PowerState": "Off",
curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/EnvironmentMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/EnvironmentMetrics", "@odata.type": "#EnvironmentMetrics.v1_3_0.EnvironmentMetrics", "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics", "PowerWatts": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/power_total_power", "Reading": null } } ```
And again the DataSourceUri points to a valid sensor: ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/power_total_power { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/power_total_power", "@odata.type": "#Sensor.v1_2_0.Sensor", "Id": "power_total_power", "Name": "total power", "Reading": null, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" } } ```
- Invalid chassis id ("TotalPower" sensor exists) ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassisBAD/EnvironmentMetrics { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassisBAD' was not found.", "MessageArgs": [ "Chassis", "chassisBAD" ], "MessageId": "Base.1.19.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.19.ResourceNotFound", "message": "The requested resource of type Chassis named 'chassisBAD' was not found." } } ```
Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Janet Adkins <janeta@us.ibm.com> Change-Id: Ibe84a5e7fe0d2b232f925e457a094c021ca85d36
show more ...
|
| 740fea16 | 12-Sep-2025 |
Ed Tanous <ed@tanous.net> |
Remove deprecated json decodes
These decodes haven't been standard practice for a while. While they will likely break some downstream builds, we need to clean things up.
If you are seeing this com
Remove deprecated json decodes
These decodes haven't been standard practice for a while. While they will likely break some downstream builds, we need to clean things up.
If you are seeing this commit message because your downstream build is broken, please migrate your code to using nlohmann::json::object_t instead of nlohmann::json when it does the unpack.
Tested: Code compiles.
Change-Id: Id892ee381b2d6b40a6366ee0622cde04d2cacd7b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 08fad5d9 | 31-Jul-2025 |
Corey Ethington <cethington@coreweave.com> |
Add check to omit `DateTime` from etag calculation
Ignores any json property named `DateTime` when calculating the etag value of an HTTP response as per the updated Redfish Spec (section 6.5: ETags)
Add check to omit `DateTime` from etag calculation
Ignores any json property named `DateTime` when calculating the etag value of an HTTP response as per the updated Redfish Spec (section 6.5: ETags)
Tested: - Redfish Service Validator passes - Tested on romulus: 1. GET resource with a "DateTime" field ``` curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \ --etag-save ./etag.txt -v ... < etag: "6A4CE897" ... { "@odata.id": "/redfish/v1/TaskService", "@odata.type": "#TaskService.v1_1_4.TaskService", "CompletedTaskOverWritePolicy": "Oldest", "DateTime": "2025-07-23T17:08:20+00:00", "Id": "TaskService", "LifeCycleEventOnTaskStateChange": true, "Name": "Task Service", "ServiceEnabled": true, "Status": { "State": "Enabled" }, "Tasks": { "@odata.id": "/redfish/v1/TaskService/Tasks" } ```
2. GET same resource again later, etag is same as before ``` curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \ --etag-save ./etag.txt -v ... < etag: "6A4CE897" ... { "@odata.id": "/redfish/v1/TaskService", "@odata.type": "#TaskService.v1_1_4.TaskService", "CompletedTaskOverWritePolicy": "Oldest", "DateTime": "2025-07-23T17:10:48+00:00", "Id": "TaskService", "LifeCycleEventOnTaskStateChange": true, "Name": "Task Service", "ServiceEnabled": true, "Status": { "State": "Enabled" }, "Tasks": { "@odata.id": "/redfish/v1/TaskService/Tasks" } ``` "DateTime" is the only value to have changed, but since it is ignored the etag did not change
3. GET with if-none-match returns 304 ``` curl -k -H "X-Auth-Token: $XAUTH_TOKEN" "https://$BMC/redfish/v1/TaskService" \ --etag-save ./etag.txt --etag-compare ./etag.txt -v ... > if-none-match: "6A4CE897" ... < HTTP/2 304 < allow: GET < odata-version: 4.0 < strict-transport-security: max-age=31536000; includeSubdomains < pragma: no-cache < cache-control: no-store, max-age=0 < x-content-type-options: nosniff < etag: "6A4CE897" < date: Wed, 23 Jul 2025 17:14:39 GMT < content-length: 0 < ... ```
Change-Id: I51f7668e75719c69c55535e4a1e48c8bae7c9488 Signed-off-by: Corey Ethington <cethington@coreweave.com>
show more ...
|
| 5e7c1f31 | 23-Jul-2025 |
Oliver Brewka <oliver.brewka@9elements.com> |
Multi-host support for GET routes in systems.hpp
Add support for multi-host GET request-handling under the /redfish/v1/Systems/{computerSystemId}/ redfish resource.
All multi-host supported redfish
Multi-host support for GET routes in systems.hpp
Add support for multi-host GET request-handling under the /redfish/v1/Systems/{computerSystemId}/ redfish resource.
All multi-host supported redfish URIs can be found in this listing [1].
Multi-host meson options needed: -Dexperimental-redfish-multi-computer-system=enabled
Tested: Validator passes on single-host machine and yv4 qemu emulation.
[1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/76118
Change-Id: I67c17c3dd7a354fa9a2ebbc56d4def7a7e788909 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
show more ...
|
| 82b286fb | 06-May-2025 |
Ed Tanous <ed@tanous.net> |
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexp
Remove implicit conversions
Since 2020, nlohmann has recognized that implicit conversions to and from json are an issue. Many bugs have been caused at both development time and runtime due to unexpected implicit conversions from json to std::string/int/bool. This commit disables implicit conversions using JSON_USE_IMPLICIT_CONVERSIONS [1]. This option will become the default in the future. That comment was written 3 years ago at this point, so we should prepare.
Tested: Redfish service validator passes.
[1] https://json.nlohmann.me/api/macros/json_use_implicit_conversions/ Change-Id: Id6cc47b9bbf8889e4777fd6d77ec992f3139962c Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 4a102cd4 | 27-Feb-2025 |
Patrick Williams <patrick@stwcx.xyz> |
registries: make registration dynamic
Rather than having to manually hook code for registries, add a small registration function to the registry header and use this registration results throughout t
registries: make registration dynamic
Rather than having to manually hook code for registries, add a small registration function to the registry header and use this registration results throughout the registry interactions.
Tested:
Confirmed registries have same behavior.
``` $ curl -s -k https://localhost:18080/redfish/v1/Registries/ | jq '.Members | map(."@odata.id")' [ "/redfish/v1/Registries/Base", "/redfish/v1/Registries/HeartbeatEvent", "/redfish/v1/Registries/OpenBMC", "/redfish/v1/Registries/ResourceEvent", "/redfish/v1/Registries/TaskEvent", "/redfish/v1/Registries/Telemetry" ] ```
``` $ curl -s -k https://localhost:18080/redfish/v1/Registries/TaskEvent/TaskEvent | jq ".Messages | keys" [ "TaskAborted", "TaskCancelled", "TaskCompletedOK", "TaskCompletedWarning", "TaskPaused", "TaskProgressChanged", "TaskRemoved", "TaskResumed", "TaskStarted" ] ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Iaa355420736a2587d9da4e995208d579443ca9b8
show more ...
|
| 84aad24d | 27-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
Redfish OEM Patch Route Handling
Extension of OEM route infra to support registration of handlers for OEM patch requests. When patch request is made on a redfish resource, first the main route handl
Redfish OEM Patch Route Handling
Extension of OEM route infra to support registration of handlers for OEM patch requests. When patch request is made on a redfish resource, first the main route handler will be called and if request patch payload contains any OEM fragments then, registered OEM patch handler will be called.
Tested 1. UT passes with new test cases added for OEM patch handling 2. Patch on FAN OEM property works as expected
``` Step 1: Creating new fan controller... Create PATCH data: { "Oem": { "OpenBmc": { "Fan": { "FanControllers": { "Fan_TEST_391715": { "FFGainCoefficient": 2.0, "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone_1" } ] } } } } } }
HTTP Response Code (PATCH /redfish/v1/Managers/bmc): 200
HTTP Response Code (GET /redfish/v1/Managers/bmc): 200 ✓ Fan controller created successfully
Step 2: Updating the fan controller... Update PATCH data: { "Oem": { "OpenBmc": { "Fan": { "FanControllers": { "Fan_TEST_391715": { "FFGainCoefficient": 3.0 } } } } } }
HTTP Response Code (PATCH /redfish/v1/Managers/bmc): 200
HTTP Response Code (GET /redfish/v1/Managers/bmc): 200
Final Configuration: { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanControllers/Fan_TEST_391715", "@odata.type": "#OpenBMCManager.v1_0_0.Manager.FanController", "FFGainCoefficient": 3.0, "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone_1" } ] } ✓ Fan controller updated successfully ```
Test Summary ``` [+] Tests DateTime update after NTP disable. Payload: {DateTime: <date-string>}. Expects: 204 success, validates date matches update.: PASSED [-] Tests invalid property in request. Payload: {InvalidProperty: 'value', DateTime: <date-string>}. Expects: 400 PropertyUnknown error, validates DateTime unchanged.: PASSED [-] Tests fan controller with invalid property. Payload: Oem/OpenBmc/Fan/FanControllers with InvalidProperty. Expects: 400 PropertyUnknown error, fan not created.: PASSED [-] Tests empty PATCH request. Payload: {}. Expects: 400 MalformedJSON error.: PASSED [-] Tests malformed fan controller JSON. Payload: Fan property as string instead of object. Expects: 400 PropertyValueTypeError error.: PASSED [-] Tests DateTime with wrong type. Payload: {DateTime: 12345}. Expects: 400 PropertyValueTypeError error, DateTime unchanged.: PASSED [-] Tests PATCH to invalid manager path. Payload: Valid DateTime and fan update to /invalid_bmc. Expects: 404 ResourceNotFound error.: PASSED [+] Tests fan controller creation. Payload: Oem/OpenBmc/Fan/FanControllers with FFGainCoefficient and Zones. Expects: 200 success with success message.: PASSED [-] Tests fan controller without required Zones. Payload: Oem/OpenBmc/Fan/FanControllers with only FFGainCoefficient. Expects: 500 InternalError, fan not created.: PASSED [+] Tests combined DateTime and fan update. Payload: DateTime and Oem/OpenBmc/Fan/FanControllers. Expects: 200 success with success message.: PASSED [-] Tests PATCH with wrong Content-Type header. Payload: Valid DateTime update with text/plain content-type. Expects: 400 UnrecognizedRequestBody error.: PASSED [+] Tests fan controller creation and update. Payload: Create with FFGainCoefficient=2.0, then update to 3.0. Expects: 200 success for both operations, verifies all properties.: PASSED ```
Change-Id: Ib2498b6a4db0343d5d4a405a5a8e4d78f615bed8 Signed-off-by: Rohit PAI <rohitpai77@gmail.com>
show more ...
|
| fdf51f5c | 04-Apr-2025 |
Rohit PAI <ropai@nvidia.com> |
Avoid http request copy in OEM handler
Initial copy was done to avoid request object going out of scope before OEM handler are invoked. The MR avoids the whole copy of the request object and create
Avoid http request copy in OEM handler
Initial copy was done to avoid request object going out of scope before OEM handler are invoked. The MR avoids the whole copy of the request object and create a sub route object which contains elements required for OEM route handling.
Tested - Service Validator Passes - OpenBMC OEM properties and rendered well.
Change-Id: I3ef80a130afe6ab764a13704a8b672f5b0635126 Signed-off-by: Rohit PAI <ropai@nvidia.com>
show more ...
|
| c1a75ebc | 03-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
OEM Route Handling Infrastructure
Goal of the MR is to provide infrastructure support in bmcweb to manage the OEM fragment handling separately. OEM schema are vendor defined and per DMTF resource we
OEM Route Handling Infrastructure
Goal of the MR is to provide infrastructure support in bmcweb to manage the OEM fragment handling separately. OEM schema are vendor defined and per DMTF resource we could have multiple vendor defined OEM schema to be enabled.
The feature allows registration of route handler per schema per OEM namespace. Example ``` REDFISH_SUB_ROUTE<"/redfish/v1/Managers/<str>/#/Oem/OpenBmc">(service, HttpVerb::Get)(oemOpenBmcCallback); REDFISH_SUB_ROUTE<"/redfish/v1/Managers/<str>/#/Oem/Nvidia">(service, HttpVerb::Get)(oemNidiaCallback); ```
We can have separate vendor defined route handlers per resource. Each of these route handlers can populate their own vendor specific OEM data. The OEM code can be better organized and enabled/disabled as per the platform needs. The current MR has the code changes related to handling GET requests alone. The feature only supports requests where the response payload is JSON.
Tests - All UT cases passes - New UT added for RF OEM router passes - Service Validator passes on qemu - GET Response on Manager/bmc resource contains the OEM fragment
``` curl -c cjar -b cjar -k -X GET https://127.0.0.1:2443/redfish/v1/Managers/bmc { "@odata.id": "/redfish/v1/Managers/bmc", "@odata.type": "#Manager.v1_14_0.Manager",
"Oem": { "OpenBmc": { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc", "@odata.type": "#OpenBMCManager.v1_0_0.Manager", "Certificates": { "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates" } } },
"UUID": "40575e98-90d7-4c10-9eb5-8d8a7156c9b9" } ```
Change-Id: Ic82aa5fe760eda31e2792fbdfb6884ac3ea613dc Signed-off-by: Rohit PAI <rohitpai77@gmail.com>
show more ...
|
| 4a19a7b5 | 27-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Deduplicate event ids
Redfish specification states: ``` The value of the id field shall be the same as the Id property in the event payload. The value of the Id property in the event payload should
Deduplicate event ids
Redfish specification states: ``` The value of the id field shall be the same as the Id property in the event payload. The value of the Id property in the event payload should be the same as the EventId property of the last event record in the Events array. The value of the EventId property for an event record should be a positive integer value and should be generated in a sequential manner. ```
The event service code did not implement that correctly. So: 1. Add ID fields for all events. 2. Remove the per-sse connection id field and rely solely on EventServiceManager. 3. Make sure all paths, (including metric report) are generating an event id that's based on the eventservice event id
Tested: Redfish event listener now sees events populated. LastEventId when sent to the SSE socket now sees a contiguous id.
``` uri=$(curl -s --user "root:0penBmc" -k "https://192.168.7.2/redfish/v1/EventService" | jq -r .ServerSentEventUri) curl -u root:0penBmc -vvv -k -N -H "Accept: text/event-stream" -H "Last-Event-Id: 0" "https://192.168.7.2$uri" ```
Change-Id: Ic32e036f40a53a9b2715639ae384d7891c768260 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 8b078385 | 31-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
Fix Message arg error in JSON Patch
When array/vector object is expected in JSON patch the error info does not contain the actual wrong property instead shows "null". Fix is to correct the value in
Fix Message arg error in JSON Patch
When array/vector object is expected in JSON patch the error info does not contain the actual wrong property instead shows "null". Fix is to correct the value in the error info.
Tested - add new test case to verify this - unit tests are passing.
Change-Id: Ica26ac9e501b5a34a5b118769cc1917eeab30524 Signed-off-by: rohitpai <rohitpai77@gmail.com>
show more ...
|
| 5d92fffc | 28-Jan-2025 |
rohitpai <rohitpai77@gmail.com> |
Move error code utils into new file
Error code utils can be used for aggregating error responses from multiples responses including use case for managing separate route handlers for OEM namespace
T
Move error code utils into new file
Error code utils can be used for aggregating error responses from multiples responses including use case for managing separate route handlers for OEM namespace
Tests Units tests are passing.
Change-Id: I2223d41fb318c0276de1ca64dd3e841bb988d902 Signed-off-by: rohitpai <rohitpai77@gmail.com>
show more ...
|
| 9838eb20 | 29-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can
Move io context to singleton
The way we pass around io contexts is somewhat odd. Boost maintainers in slack recommended that we just have a method that returns an io context, and from there we can control this (context link lost years ago).
The new version of clang claims the singleton pattern of passing in an io_context pattern is a potential nullptr dereference. It's technically correct, as calling the singleton without immediately initializing the io context will lead to a crash.
This commit implements what the boost maintainers suggested, having a single method that returns "the context" that should be used. This also helps to maintain isolation, as some pieces are no longer tied directly to dbus to get their reactor.
Tested: WIP
Change-Id: Ifaa11335ae00a3d092ecfdfb26a38380227e8576 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 3c9e6b1c | 11-Jan-2025 |
Chandramohan Harkude <chandramohan.harkude@gmail.com> |
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path
$filter Query parameter support for nested keys added
Implemented the code to identify the '/' character in the key and perform the level by level search
Testing :
Tested query parameter with path separated by / example
curl -k -u root:0penBmc https://<IP>/redfish/v1/Systems/ Baseboard/LogServices/FaultLog/Entries?$filter=CPER/Oem/ OEM/IpSignature eq 'DRAM-CHANNELS'
Results having 'DRAM-CHANNELS' in nested path "CPER/Oem/ OEM/IpSignature" are listed.
Change-Id: Ie6cf796026a29ec7a3e8a0366bbfd0c658d0ac7e Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
show more ...
|
| 6c038f26 | 14-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's
Roll out error message utils
This code should really be in a cpp/hpp file, not in a generated python script. The python script housed this temporarily to allow us to generate the registries. It's time to roll it out.
Tested: Message registries generate successfully on GET. Redfish service validator passes.
Change-Id: I7aca2d0a7fac6d530511421b667ff732617df61e Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 40e9b92e | 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 56431b29 | 03-Dec-2024 |
Alexander Hansen <alexander.hansen@9elements.com> |
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObj
dbus event subscriptions: test dbus_log_watcher
Currently that code is still unfinished, but we can already define some trivial testcases.
The main result of this function is populating EventLogObjectsType.
Tested: Unit tests pass.
Change-Id: I2e23147190be33192d41176413c16cd98c7bfd81 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
show more ...
|
| 81ee0e74 | 20-Dec-2024 |
Chandramohan Harkude <Chandramohan.harkude@gmail.com> |
Update Submit Test event feature to send custom data
Changes Added : Updated the submit test event feature to send test data as per spec
https://www.dmtf.org/sites/default/files/standards/documents
Update Submit Test event feature to send custom data
Changes Added : Updated the submit test event feature to send test data as per spec
https://www.dmtf.org/sites/default/files/standards/documents/ DSP2046_2019.1.pdf
Testing :
Tested sending custom test data and same data received at the event listener Change-Id: I2c2363a676aafd39c121c9fe4e16402c0f5961e2 Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
show more ...
|
| 67b2e53b | 11-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Fix clang-tidy for gcc-14
We use these pragmas, that we must've been getting transitively through chrono in the past. Now we need to include them explicitly.
Change-Id: Iee4c0a8866981b91adaa17bee0
Fix clang-tidy for gcc-14
We use these pragmas, that we must've been getting transitively through chrono in the past. Now we need to include them explicitly.
Change-Id: Iee4c0a8866981b91adaa17bee0678b2c10e65ea9 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
| 56b81992 | 02-Dec-2024 |
Ed Tanous <etanous@nvidia.com> |
Make message registries use 2 digit versions
Redfish specification, section 9.5.11.2 says:
The MessageId property value shall be in the format: <MessageRegistryPrefix>.<MajorVersion>.<MinorVersion>
Make message registries use 2 digit versions
Redfish specification, section 9.5.11.2 says:
The MessageId property value shall be in the format: <MessageRegistryPrefix>.<MajorVersion>.<MinorVersion>.<MessageKey>
bmcweb in certain places has incorrectly used the 3 digit version instead of the 2 digit version. This commit fixes that by modifying the parse_registries script to generate 3 separate struct entries to represent the registry version, and parse them where appropriate.
MessageRegistryFileCollection uses the 3 digit version. No behavior changes. Message/event log entries use the 2 digit version. This will cause a MessageId change from: Base.1.19.0.InternalError to Base.1.19.InternalError
This is a breaking change, so a new option to allow the old behavior is provided.
Tested: Redfish Service validator passes. Heartbeat events on EventService show 2 digit versions.
Change-Id: I4165e994f73e200f13bed8ea76cb58bee2b69faa Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|