summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
5 daysdocs: sort the switch PortMetrics PCIeErrors listHEADmasterEnder Hsieh1-3/+3
Tested: No code change. bmcweb unit-test CI passes. Change-Id: I2bf7962241f6a3c5ddc4a6d12ce6fc6e513cf33c Signed-off-by: Ender Hsieh <andhsieh@nvidia.com>
5 daysFix system dump task completion LocationShivraj Toravi1-22/+28
Dump creation tasks always report a completion Location under the Manager dump collection, including for system dumps. Pass the dump type through task creation and use getDumpEntriesUrl() to select the correct collection for the completion Location. Tested: Cross-built bmcweb for Romulus. Verified BMC dump creation, task completion Location, and entry GET on QEMU. Verified BMC and System completion Locations with an isolated on-target callback test. Change-Id: I6ef5a20767d5d9f8e1ed0558e11faf6eee5d5e2f Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
5 daysfix(session): return 204 on SessionService PATCHKenny Liu1-2/+1
A successful PATCH of SessionTimeout on /redfish/v1/SessionService returned HTTP 200 with a body that holds only an "error" object, with the PropertyValueModified message. The update succeeded, but the "error" tag tells the client that the request failed. This confuses users and tools that read any "error" property as a failure. DSP0266 1.25.0 clause 7.5.2 "Modification success responses" [1] says that after a successful PATCH the service should return one of: - HTTP 200 OK with the JSON representation of the modified resource - HTTP 202 Accepted with a Location header for a task monitor - HTTP 204 No Content with no response body Tested: Verified PATCH to /redfish/v1/SessionService succeeded and returned HTTP 204 No Content with no response body. Change-Id: I7697bc54047312eac277c248b30a44d7d3b70038 Signed-off-by: Kenny Liu <kenny_liu@jabil.com>
5 daysutils: Fix function name in getResourceState logBill Chan1-1/+1
The debug log in getResourceState prints "getResourceStatus", a function that does not exist, so the log points at the wrong symbol. Log the actual function name. Tested: Log message change only; no functional change. Change-Id: If0e2963b817d9c538b83765f47b67c94d192457f Signed-off-by: Bill Chan <bill_chan@jabil.com>
5 dayspcie: Validate PCIeFunction enum propertiesShivraj Toravi2-7/+64
FunctionType and DeviceClass are Redfish enums, but the D-Bus properties are free-form strings that were copied into the response as-is. A value that is not a valid enum member produced a non-compliant PCIeFunction resource. Convert the D-Bus strings to the generated pcie_function enums and only publish them when they match a known value. Unknown values are omitted and logged. Producers such as peci-pcie already use the Redfish enum names, so their output is unchanged. Tested: Unit tests added for valid, unknown, empty and "Invalid" values; all pcie_test cases pass. On romulus QEMU, created a PCIeDevice inventory object with three functions and checked GET /redfish/v1/Systems/system/PCIeDevices/pcie_card0/PCIeFunctions/N Function 0 (Physical, MassStorageController): Before and after: both properties published. Function 1 (Logical, "Mass Storage Controller"): Before: both invalid values published. After: both properties omitted, HTTP 200. Function 2 (empty strings): Before and after: both properties omitted. Redfish Service Validator passes on the PCIeDevices tree; without this change it reports invalid enum values for PCIeFunction 1. Change-Id: I368c16f6143cb38b68f67a76620a0e062c901e94 Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
5 dayslocation_utils: return the LocationType enumEnder Hsieh3-6/+9
getLocationType() handed the Redfish LocationType back as a bare string, so a caller writing it into a response got no checking against the schema and a wrong value would only show up at runtime. Return the generated resource::LocationType enum instead. It serializes to the same strings, so the compiler now rejects anything the schema does not define. Tested: Unit tests pass. The helper has no caller on master yet, so no Redfish response changes, and the enum serializes to the same "Slot" and "Embedded" values the function returned before. Change-Id: I4e8e5f2bf6a8c4feebe4d25f627c25c6acc39cd1 Signed-off-by: Ender Hsieh <andhsieh@nvidia.com>
6 daysEventService: Fix subscription link formattingJoel Pullokaran Jesin1-1/+1
Pass the subscription ID as an argument to boost::urls::format instead of appending it to the format string. Tested: Redfish Service Validator: PASSED POST /redfish/v1/EventService/Subscriptions/ returned HTTP 201 with Base.1.19.Created before and after. GET /redfish/v1/EventService/Subscriptions/ returned HTTP 200 for empty and populated numeric-ID collections before and after, with correct member links and counts. GET /redfish/v1/EventService/Subscriptions/{NumericId} returned HTTP 200 with matching resource identity before and after. Change-Id: I79688705b0a7a94f8f946b676f8ce2d2127f8801 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
6 daystest: check InternalError response bodyEric Liu11-2/+63
Most *InternalError tests check the 500 status but not the response body. Add the expected InternalError body to error_messages_test_utils.hpp so it is written in one place, and compare the whole body in the *InternalError tests where the response holds only that error. Tested: unit-test CI passes. Change-Id: I449b9dbbd352470a21b2ba2250d9be970c8dc2c2 Signed-off-by: Eric Liu <liuer@nvidia.com>
7 dayssensors: add unit tests for inventory item dataEric Liu2-0/+401
Cover storeInventoryItemData(): the Item, Item.PowerSupply, Decorator.Asset and OperationalStatus interfaces, each supported property, unknown interfaces and properties, and properties with the wrong type. Tested with: meson test -C build sensors_test --print-errorlogs 18/18 cases pass. Change-Id: Iec63ba144fcac91e730cefb12350303b0e8fecd4 Signed-off-by: Eric Liu <liuer@nvidia.com>
10 daystest: add unit tests for NetworkAdapter LocationJY Voon2-0/+125
The NetworkAdapter Location handler in network_adapter.hpp has no unit tests. Add tests to improve unit test coverage of this feature. Tested: Unit tests pass. Change-Id: I35c5d50a5cae2c130e66549ade57edf1d5088d36 Signed-off-by: JY Voon <jvoon@nvidia.com>
10 daysbmcweb: add NetworkAdapter Location propertiesJY Voon2-1/+67
Extend handleNetworkAdapterPathNetworkAdapterGet in redfish-core/lib/network_adapter.hpp to surface the Location block (ServiceLabel, LocationType) on the NetworkAdapter URI. Tested: Build an image for nvl32-obmc machine. $ curl -sk https://{BMC_IP}/redfish/v1/Chassis/\ Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/\ Nvidia_ConnectX_0_NIC { "@odata.id": ".../NetworkAdapters/Nvidia_ConnectX_0_NIC", "@odata.type": "#NetworkAdapter.v1_11_0.NetworkAdapter", "Id": "Nvidia_ConnectX_0_NIC", "Location": { "PartLocation": { "LocationType": "Embedded", "ServiceLabel": "Nvidia_ConnectX_0" } }, "Name": "Nvidia_ConnectX_0_NIC Network Adapter", "Ports": { "@odata.id": ".../Nvidia_ConnectX_0_NIC/Ports" }, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } } Change-Id: I8841c40e6029fb52c07d8ecf3a84b1f1785aaa8c Signed-off-by: JY Voon <jvoon@nvidia.com>
11 daysRedfish: Extract PowerSupply callbacksJoel Pullokaran Jesin1-46/+53
Move the PowerSupply collection HEAD, firmware-version, and location callbacks from inline lambdas into named functions using `std::bind_front`. Tested: GET /redfish/v1/Chassis/{ChassisId}/PowerSubsystem/PowerSupplies/ {PowerSupplyId}/ returned HTTP 200 with the expected firmware version and service label. When either optional D-Bus property was absent, GET returned HTTP 200 and omitted the corresponding Redfish field. D-Bus errors returned HTTP 500 with `Base.1.19.InternalError`. GET for an unknown PowerSupply returned HTTP 404 with `Base.1.19.ResourceNotFound`. Collection GET and HEAD returned HTTP 200; HEAD for an unknown chassis returned HTTP 404. Redfish Service Validator - PASSED Change-Id: Ica09507a871c08d34ec2d3fc50f2307964e1f41e Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
11 daysquery_param: propagate session in processOnlyChandramohan Harkude1-4/+6
The $only sub-request was created without the originating session. On routes with D-Bus privilege checks, the null session caused a null pointer dereference in dbus_privileges.hpp, returned as HTTP 500. The fix is to copy the session onto the sub-request, similarly how startQuery already does it. Tested: Before: ``` curl -k -u root:<Password> -X GET -H 'Content-Type: application/json' https://<IP>/redfish/v1/AccountService/Accounts?only { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.18.1.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.18.1.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } } After: curl -k -u root:<Password> -X GET -H 'Content-Type: application/json' https://<IP>/redfish/v1/AccountService/Accounts?only { "@odata.id": "/redfish/v1/AccountService/Accounts/root", "@odata.type": "#ManagerAccount.v1_7_0.ManagerAccount", "AccountTypes": [ "HostConsole", "IPMI", "Redfish", "WebUI", "ManagerConsole" ], "Description": "User Account", "Enabled": true, "Id": "root", "Links": { "Role": { "@odata.id": "/redfish/v1/AccountService/Roles/Administrator" } }, "Locked": false, "Locked@Redfish.AllowableValues": [ "false" ], "Name": "User Account", "Password": null, "PasswordChangeRequired": false, "RoleId": "Administrator", "StrictAccountTypes": true, "UserName": "root" } ``` Change-Id: I4dbb9e2f0c45d8b9d605e096b49db3c963fb280e Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
11 daysstorage: Improve drive diagnosticsJoel Pullokaran Jesin1-7/+7
Clarify unknown drive type and protocol warnings, and include error details in mapper and chassis drive association logs. Raise the buildDrive mapper failure log to ERROR to match its HTTP 500 response. No changes to HTTP responses or control flow Tested: Inspection only. Change-Id: I39fe16f3dc3bd305b88b1c4bc60ebfd76569e91a Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
11 daystest: cover ReadingTime on a sensor responseEnder Hsieh1-0/+71
ReadingTime is published from a property a service may leave unset, and only on a full sensor resource, so the cases worth holding still are the ones where it must not appear at all: a zero time, an absent property, and an excerpt. Tested: Ran the unit tests. Change-Id: I45cbac8b94945f7e5a422ef867f776f071cfe6d8 Signed-off-by: Ender Hsieh <andhsieh@nvidia.com>
12 daysopenssl: add OpenSSL 4.1 supportPatrick Williams2-4/+35
OpenSSL 4.1 deprecated ASN1_STRING_set() and ASN1_STRING_length(), which fails the build with -Werror=deprecated-declarations. Use ASN1_STRING_set1_data() and ASN1_STRING_get_length() when building against 4.1+, keeping the old calls for 4.0 and earlier. Tested: Built with OpenSSL 4.1 in latest openembedded-core refresh. Assisted-by: OpenCode:muse-spark-1.3 Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I8038f369fcfd68e47b8c5d302074fc0bf261dc96
13 daysFix collection schema linkJoel Pullokaran Jesin1-1/+1
Use the collection schema in the GET response's `rel=describedby` Link header. It currently references the individual resource schema. Tested: Redfish Service Validator: PASS 5, WARN 0, FAIL 0, NOT TESTED 5. GET /redfish/v1/TelemetryService/MetricReportDefinitions: HTTP 200 before and after; Link changed to the collection schema. Change-Id: Ic20c9ada81e3849bd80f1358c0465380d3488a0b Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
13 daysaccount_service: Refactor AccountPolicy lambdaVijaysankar Ravi1-46/+50
handleAccountServiceGet() registered its AccountPolicy GetAll response handler as an inline lambda, requiring an ast-grep-ignore suppression for the long-lambda rule. This commit extracts the body into a named function (afterGetAccountPolicy) registered via std::bind_front(), matching the handler style already used in this file (e.g. afterVerifyUserExists). The ast-grep-ignore comment is removed since the code is no longer flagged by the rule. While moving the code, the unpackPropertiesNoThrow() arguments are split one per line and sorted alphabetically, matching how the readJsonPatch() calls in this file are ordered, so that new properties can be added with a one-line diff. The pointer declarations and JSON assignments follow the same order. No functional change. Tested: - GET /redfish/v1/AccountService returns AccountLockoutDuration, AccountLockoutThreshold and MinPasswordLength matching the xyz.openbmc_project.User.AccountPolicy D-Bus values (busctl). - PATCH AccountLockoutDuration=300 and AccountLockoutThreshold=5, GET reflects the new values. - Redfish Service Validator: 5873 Pass, 356 Warn, 0 Fail. Change-Id: I00367c9845737cf36404930d654ca0436fb36988 Signed-off-by: Vijaysankar Ravi <vijaysankarr@ami.com>
13 daystest: add unit tests for OperatingConfig handlersJY Voon3-7/+277
The OperatingConfigs resources in processor_operating_config.hpp have no unit tests. Add tests to improve unit test coverage of this implemented feature, and move the OperatingConfig resource fields into fillOperatingConfigResponse() so they can be tested without D-Bus. Tested: Unit tests pass. Change-Id: I0fdb953bdce136fdf66e27cdb7ccbf44e24d3d52 Signed-off-by: JY Voon <jvoon@nvidia.com>
13 daysReturn 404 for OperatingConfigs of unknown CPUJY Voon1-16/+16
A GET on the OperatingConfigs collection of a processor that has no CurrentOperatingConfig object returns 200 with a collection that has no Members, which is a required property. Return ResourceNotFound for the processor instead, matching the Processor and OperatingConfig handlers. The CPU and config lookups matched object paths by suffix, so cpu0 also matched notcpu0 and an unknown processor could still return a collection or a config. Compare the object path filenames instead, as the Processor handler does. Tested: Build an image for nvl32-obmc with this patch on master. ``` $ curl -sk https://{BMC_IP}/redfish/v1/Systems/system/\ Processors/bad-processor-id/OperatingConfigs { "error": { "@Message.ExtendedInfo": [ { "MessageArgs": [ "Processor", "bad-processor-id" ], "MessageId": "Base.1.19.ResourceNotFound", ... } ], ... } } ``` Redfish Service Validator: Summary - PASS: 9726, WARN: 363, FAIL: 0, NOT TESTED: 12988 Change-Id: I6a1430d0374cc27a044ac67ba595c0e1a42d4327 Signed-off-by: JY Voon <jvoon@nvidia.com>
14 daysparse_registries: add additional registriesPatrick Williams2-0/+6
Phosphor-dbus-interfaces has added support for events that map to additional Redfish message registries not currently exposed. ``` $ rg redfish-mapping | sed "s#.*redfish-mapping: ##" | sed "s#\..*##" | sort | uniq Base Environmental SensorEvent Telemetry Update ``` Add these to the exported list. Tested: ``` $ curl -s -k https://localhost:18080/redfish/v1/Registries/ | jq '.Members | map(."@odata.id")' [ "/redfish/v1/Registries/Base", "/redfish/v1/Registries/Environmental", "/redfish/v1/Registries/HeartbeatEvent", "/redfish/v1/Registries/OpenBMC", "/redfish/v1/Registries/ResourceEvent", "/redfish/v1/Registries/SensorEvent", "/redfish/v1/Registries/TaskEvent", "/redfish/v1/Registries/Telemetry", "/redfish/v1/Registries/Update" ] ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7dc0947f35128b214bac0d8b19c0ff16a3cbc630
14 daysMatch D-Bus errors by errName instead of string literalsPatrick Williams3-6/+15
The async handlers compare sd_bus_error names against hardcoded org.freedesktop.DBus.Error strings. Use the errName constants from the generated sdbusplus event types so the names have a single source of truth and typos fail at compile time. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib1edd84226cb967282b4f954b0950c6c4a90f85c
2026-11-15test: add unit tests for SubProcessor handlersJY Voon2-0/+270
The SubProcessors resources in processor_core.hpp have no unit tests. Add tests to improve unit test coverage of this implemented feature. Tested: Unit tests pass. Change-Id: I04a4e43135cee4b4aae0d3431e179a37eeb9b107 Signed-off-by: JY Voon <jvoon@nvidia.com>
2026-11-14Fix typos using typos toolGeorge Liu7-10/+10
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: I554efb55a5ce4f11f231e41ad1dabb3169880f40
2026-11-10Extract PowerSupply HEAD callbackJoel Pullokaran Jesin1-14/+18
Move the long inline PowerSupply HEAD callback into `doPowerSupplyHead` and bind it with `std::bind_front`. Tested: Redfish Service Validator: PASS 16, WARN 0, FAIL 0, NOT TESTED 29 HEAD /redfish/v1/Chassis/{ChassisId}/PowerSubsystem/PowerSupplies/ {PowerSupplyId}/ returned HTTP 200 with the PowerSupply schema Link on both baseline and candidate. HEAD /redfish/v1/Chassis/{ChassisId}/PowerSubsystem/PowerSupplies/ {MissingPowerSupplyId}/ returned HTTP 404; GET returned HTTP 404 with `Base.1.19.ResourceNotFound` on both. HEAD /redfish/v1/Chassis/{MissingChassisId}/PowerSubsystem/ PowerSupplies/{PowerSupplyId}/ returned HTTP 404; GET returned HTTP 404 with `Base.1.19.ResourceNotFound` on both. Change-Id: I683bc05fc19314fd05380310c2faf2dcaaf402d6 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-11-09test: add unit tests for PCIeSlots handlersJY Voon2-0/+264
The PCIeSlots resources in pcie_slots.hpp have no unit tests. Add tests to improve unit test coverage of this implemented feature. Tested: Unit tests pass. Change-Id: Ia7275b333eab424775ffd7004fabc70021825107 Signed-off-by: JY Voon <jvoon@nvidia.com>
2026-11-06OWNERS: add myself as a reviewerOliver Brewka1-0/+1
Add myself to the bmcweb OWNERS file as a reviewer. Contributions [1] [1] https://gerrit.openbmc.org/q/repo:openbmc/bmcweb+author:oliver.brewka@9elements.com Change-Id: I4448b6de4d4025d6cf75e9bec5c314967486ae68 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-11-05test: add unit tests for Cable handlersJY Voon2-0/+151
The Cable resources in cable.hpp have no unit tests. Add tests to improve unit test coverage of this implemented feature. Tested: Unit tests pass. Change-Id: I116db549c45723e875df2087b2e3646e0036d7b7 Signed-off-by: JY Voon <jvoon@nvidia.com>
2026-11-04Redfish: Include Details in VirtualMedia 404sJoel Pullokaran Jesin1-2/+1
When a VirtualMedia member has no matching D-Bus object, the helper currently returns a bare HTTP 404. Use `ResourceNotFound` so clients receive the standard Redfish error with the `VirtualMedia` resource type and requested member ID. Tested: Missing VirtualMedia member response: HTTP 404, `Base.1.19.ResourceNotFound`, with MessageArgs containing the resource type and requested member ID. Redfish Service Validator Passed. Change-Id: Icd613c5410e4e547c50e6c343494fef85bd8bd5b Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-11-02Uniform unit test file namingOliver Brewka8-13/+9
Some unit test file names were not following the naming convention ending with the suffix 'test'. Rename all files to follow that convention. In addition, fix bad formatting that does not pass CI any longer. Tested: Code compiles. Unit tests pass. Change-Id: Ic55eb45f03f0650ceecc9f54cf340677e80d64da Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-10-30registries: generate registries_selector.hppPatrick Williams2-10/+35
Enhance parse_registries.py to generate the registries_selector.hpp so that it does not need to be generated by hand. Note that as part of this, additional registries are now emitted for Redfish. These registries were already being generated but they were missing the header hook that allowed them to be exposed. Tested: ``` $ 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" ] ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia243a7bfbb8873384b6679b462914ba8380bf5b3
2026-10-30bmcweb: add support for rotational_position sensorWill Tsai3-2/+44
Currently, bmcweb does not recognize the rotational_position sensor type under /xyz/openbmc_project/sensors/rotational_position, which is already defined and documented in phosphor-dbus-interfaces (PDI). Consequently, sensors such as ABSOLUTE_ROTATIONALPOS_RAD exposed by valves (e.g. Belimo valves) are filtered out from the Chassis Sensors collection (/redfish/v1/Chassis/<ChassisId>/Sensors). This commit adds support for rotational_position sensors: 1. Add /xyz/openbmc_project/sensors/rotational_position to getSensorPaths() in sensors.hpp. 2. Map rotational_position to ReadingType::RotationalPosition and ReadingUnits "rad" in sensor_utils.hpp. 3. Use "rotation" prefix for rotational_position in getSensorId() and handle decoding back to "rotational_position" in splitSensorNameAndType(). 4. Add unit test coverage in sensor_utils_test.cpp. Tested: 1. Verified on Ventura2 BMC with Belimo valve: GET /redfish/v1/Chassis/SupplyValve2_1/Sensors - Observed rotation_SupplyValve2_1_ABSOLUTE_ROTATIONALPOS_RAD in Members. 2. Queried the specific sensor URI: GET /redfish/v1/Chassis/SupplyValve2_1/Sensors/ rotation_SupplyValve2_1_ABSOLUTE_ROTATIONALPOS_RAD - Verified the response contains: "ReadingType": "RotationalPosition", "ReadingUnits": "rad", "Reading": <reading_in_radians> 3. Unit tests in sensor_utils_test pass. 4. Redfish Service Validator passes on /redfish/v1/Chassis/SupplyValve2_1/Sensors: - 246 Pass / 0 Warn / 0 Fail Change-Id: I080305ef72dff484d1c70083a14f728e504f718f Signed-off-by: Will Tsai <will.tsai@quantatw.com>
2026-10-30storage: Support SMR media type and eMMC protocolJoel Pullokaran Jesin1-0/+8
Map the SMR drive type and eMMC drive protocol to their existing Redfish enums instead of treating these valid D-Bus values as invalid. Tested: - GET /redfish/v1/Chassis/<chassis>/Drives returned HTTP 200, with drives listed. - GET /redfish/v1/Chassis/<chassis>/Drives/<drive> verified HTTP 200 with MediaType set to SMR for an SMR drive and Protocol set to eMMC for an eMMC device. Change-Id: I1546bbc7b96f2923b8f9447801f09b909cb4a030 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-10-30account-service: add timezone parameter to passwordExpirationToJsonPatrick Williams2-3/+17
`passwordExpirationToJson` previously had no way to select a timezone, so its unit test hardcoded a UTC string and failed on machines with a non-UTC local timezone. The time utils already support an explicit timezone string, with an empty string meaning "local zone". Add an optional timezone parameter to `passwordExpirationToJson` (defaulting to empty, preserving existing local-zone behavior in production) and pass it through. Update the corresponding unit test to check exact strings with explicit "UTC" and "America/New_York" zones, plus verify the default still matches results from `getDateTimeUint` directly. Tested: Unit tests passes, including on a system with local timezone America/New_York. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie4bdb8a2b88447ee0db5f5758acc12ba021db0d2
2026-10-29Skip ProductionDate if BuildDate is emptyGunnar Mills2-0/+14
An empty BuildDate string from the Asset interface now causes a 500 due to the fix at "Add tests for production date report handling".[1] This is causing bmcweb bumps to fail with[2]: ``` /redfish/v1/Systems/system/Memory/dimm0 ... Resource Error: Received HTTP 500 when accessing the URI. FAIL /redfish/v1/Systems/system/Memory/dimm1 ... Resource Error: Received HTTP 500 when accessing the URI. FAIL ``` [1]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/92867 [2]: https://gerrit.openbmc.org/c/openbmc/openbmc/+/96362 The Asset interface has properties such as PartNumber, SerialNumber, Manufacturer, Model, etc., so it is reasonable to assume you might have some of those properties filled out but not all. The default BuildDate is "" and with 92867 that now causes a 500. This fix, to just leave off if BuildDate is empty is what we do for SparePartNumber and matches the behavior we had prior to 92867 for an empty string. Thought about just ignoring all errors like we did prior to 92867 but figure if you fill out BuildDate and the format isn't correct, reasonable to throw an error. Even if IBM populated these BuildDates for the Dimms, expect other companies to hit so let's do check and not throw an error when it is the default state. On a P10bmc: ``` busctl get-property xyz.openbmc_project.Inventory.Manager /xyz/openbmc_project/inventory/system/chassis/motherboard/dimm0 xyz.openbmc_project.Inventory.Decorator.Asset BuildDate s "" ``` Tested: After recreating the error without this fix, the Redfish Validator on a p10bmc system with Dimms with a BuildDate="" passes and those endpoints no longer return a 500. Change-Id: I120334bdfb7f3a81192212d33136b0a61d4ceb50 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2026-10-29Extract PowerSupply Asset callbackJoel Pullokaran Jesin1-33/+36
Move Asset property response handling into the named `afterGetPowerSupplyAsset` callback and bind it with `std::bind_front`. This preserves the existing property mapping and error handling while separating them from the D-Bus request. An absent Asset interface continues to omit Asset-derived properties. A present `BuildDate` continues to populate `ProductionDate`. No functional changes. Tested: - DMTF Redfish Service Validator: PASSED. - GET /redfish/v1/Chassis/{ChassisId}/PowerSubsystem/PowerSupplies/ {PowerSupplyId}/ with populated Asset and BuildDate returns HTTP 200 and ProductionDate. - GET the same resource with Asset absent returns HTTP 200 and omits Asset-derived properties. With BuildDate absent, it returns HTTP 200 and omits ProductionDate. - GET the same collection with an unknown PowerSupply ID returns HTTP 404 and `Base.1.19.ResourceNotFound`. - GET the same resource when Asset property retrieval fails returns HTTP 500 and `Base.1.19.InternalError`. Change-Id: I37901fc7ba42f148015f821dd70a421025ee5582 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-10-29led: Report D-Bus errors for system LED readsEric Liu1-15/+21
The hard-coded Systems LocationIndicatorActive read only treats a property type mismatch as an error, so a D-Bus timeout from the LED group manager returns 200 with the property silently missing. Return internalError for any error other than a missing object or service. A missing enclosure_identify_blink falls back to enclosure_identify, and a missing enclosure_identify leaves the property out, as other optional Systems properties do. Tested: Build an image for nvl32-obmc. ``` $ curl -sk -u <credentials> -o /dev/null -w "%{http_code}\n" https://${bmc}/redfish/v1/Systems/system 200 Summary - PASS: 63, WARN: 0, FAIL: 0, NOT TESTED: 79 ``` 1. This machine has no LED group manager, so both LED reads get a missing service (host_unreachable). Systems/system still returns 200 without LocationIndicatorActive, and bmcweb logs no D-Bus error. 2. Redfish Service Validator over Systems/system reports no failures. 3. The led unit tests in the next change cover a timeout on both LED reads, and a missing LED group or service on enclosure_identify. Change-Id: I533ce8eb95adddcef47562647de2e762de34d6b3 Signed-off-by: Eric Liu <liuer@nvidia.com>
2026-10-29IndicatorLED: Remove deprecated propertyEric Liu9-568/+36
The redfish-allow-deprecated-indicatorled option was disabled by default in 2025 [1] and scheduled for removal by March 2026. Remove the option and the IndicatorLED code under it: Chassis and ComputerSystem GET and PATCH, and the Thermal Fans and Power PowerSupplies entries. Redfish deprecated IndicatorLED in favor of LocationIndicatorActive, which is unchanged. Sensor inventory lookups no longer read inventory LEDs, which only fed that property. A PATCH of IndicatorLED still returns PropertyUnknown, as it did with the option disabled. [1]: https://github.com/openbmc/bmcweb/commit/f664fd8abeba11c7aa06d5119423a27b9d40d045 Tested: Build an image for nvl32-obmc. ``` $ curl -sk -u <credentials> https://${bmc}/redfish/v1/Systems/system | grep -cE "IndicatorLED|LocationIndicatorActive" 0 $ curl -sk -u <credentials> https://${bmc}/redfish/v1/Chassis/Nvidia_Alon8_HPM | grep -cE "IndicatorLED|LocationIndicatorActive" 0 $ curl -sk -u <credentials> -w '\n%{http_code}\n' -X PATCH -H 'Content-Type: application/json' -d '{"IndicatorLED":"Lit"}' https://${bmc}/redfish/v1/Systems/system | grep -E '"code"|^[0-9]{3}$' "code": "Base.1.19.PropertyUnknown", 400 $ curl -sk -u <credentials> -w '\n%{http_code}\n' -X PATCH -H 'Content-Type: application/json' -d '{"IndicatorLED":"Lit"}' https://${bmc}/redfish/v1/Chassis/Nvidia_Alon8_HPM | grep -E '"code"|^[0-9]{3}$' "code": "Base.1.19.PropertyUnknown", 400 $ curl -sk -u <credentials> -o /dev/null -w '%{http_code}\n' -X PATCH -H 'Content-Type: application/json' -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Systems/system 200 $ curl -sk -u <credentials> https://${bmc}/redfish/v1/Systems/system | jq .LocationIndicatorActive true $ curl -sk -u <credentials> -o /dev/null -w '%{http_code}\n' -X PATCH -H 'Content-Type: application/json' -d '{"LocationIndicatorActive":true}' https://${bmc}/redfish/v1/Chassis/MockLedChassis 204 $ curl -sk -u <credentials> https://${bmc}/redfish/v1/Chassis/MockLedChassis | jq .LocationIndicatorActive true $ curl -sk -u <credentials> "https://${bmc}/redfish/v1/Chassis/Nvidia_RTX_PRO_6000_Blackwell_0/Sensors?\$expand=." | jq -c '.Members[] | {Id, ReadingType}' {"Id":"voltage_GPU_0_Voltage_0","ReadingType":"Voltage"} {"Id":"energy_GPU_0_Energy_0","ReadingType":"EnergyJoules"} {"Id":"power_GPU_0_Power_0","ReadingType":"Power"} {"Id":"temperature_GPU_0_TEMP_1","ReadingType":"Temperature"} {"Id":"temperature_GPU_0_DRAM_0_TEMP_0","ReadingType":"Temperature"} {"Id":"temperature_GPU_0_TEMP_0","ReadingType":"Temperature"} Summary - PASS: 63, WARN: 0, FAIL: 0, NOT TESTED: 79 Summary - PASS: 27, WARN: 0, FAIL: 0, NOT TESTED: 55 ``` 1. Systems/system and Chassis/Nvidia_Alon8_HPM return no IndicatorLED. 2. A PATCH of IndicatorLED returns PropertyUnknown on both resources. 3. This machine has no LED groups, so a test D-Bus service stood in for phosphor-led-manager. A PATCH of LocationIndicatorActive sets the LED group on Systems/system and on a chassis with an identifying LED group, a GET reads it back, and every response matches the build before the change. 4. Redfish Service Validator over both resources reports no failures. 5. bmcweb unit tests pass, including FillPowerThermalIdentity. 6. Sensors $expand, which runs the sensor inventory lookup, returns the same members and fields as before the change. Change-Id: Id744b1d2092cf24faa4ee7ab25d8747c397e982d Signed-off-by: Eric Liu <liuer@nvidia.com>
2026-10-27Handle all dump progress statuses explicitlyOliver Brewka2-8/+40
Prior to this patch the logic treated both InProgress and NotStarted status as InProgress. Same for Failed and Aborted, which both are treated as Failed. To align with the pdi definition of xyz.openbmc_project.Common.Progress Status property [1], add the NotStarted and Aborted status to the DumpCreationProgress enum and adapt progress logic to account for these statuses explicitly. Tested: Manually tested on romulus running in qemu with ibm dump extension enabled, to get access to /xyz/openbmc_project/dump/system. Put machine state into Quiesced: ``` busctl set-property xyz.openbmc_project.State.Host0 \ /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host \ CurrentHostState \ s "xyz.openbmc_project.State.Host.HostState.Quiesced" ``` POST request ``` curl -v -k POST 'https://localhost:44443/redfish/v1/Systems/system/ LogServices/Dump/Actions/LogService.CollectDiagnosticData' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN_ROML"'' \ -H "Content-Type: application/json" -d \ '{"DiagnosticDataType":"OEM", "OEMDiagnosticDataType":"System"}' ``` Dump manager tree ``` busctl tree xyz.openbmc_project.Dump.Manager `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/dump |- /xyz/openbmc_project/dump/bmc | `- /xyz/openbmc_project/dump/bmc/entry | `- /xyz/openbmc_project/dump/bmc/entry/1 |- /xyz/openbmc_project/dump/faultlog |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system `- /xyz/openbmc_project/dump/system/entry |- /xyz/openbmc_project/dump/system/entry/1 `- /xyz/openbmc_project/dump/system/entry/2 ``` Set progress to NotStarted ``` busctl set-property xyz.openbmc_project.Dump.Manager \ /xyz/openbmc_project/dump/system/entry/2 \ xyz.openbmc_project.Common.Progress Status \ s "xyz.openbmc_project.Common.Progress.OperationStatus.NotStarted" journalctl -u bmcweb ... Sep 07 14:55:21 romulus bmcweb[200]: [dump_utils.hpp:655] /xyz/openbmc_project/dump/system/entry/2: Dump creation task is in progress ``` Set progress to Aborted ``` busctl set-property xyz.openbmc_project.Dump.Manager \ /xyz/openbmc_project/dump/system/entry/2 \ xyz.openbmc_project.Common.Progress Status \ s "xyz.openbmc_project.Common.Progress.OperationStatus.Aborted" journalctl -u bmcweb ... Sep 07 14:55:42 romulus bmcweb[200]: [dump_utils.hpp:646] /xyz/openbmc_project/dump/system/entry/2: Aborted creating dump ``` Verified successful dump creation flow works the same as before, following same testing as in previous patch. [1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/0be76aeee7e5c7d8235ea830049aa99fd9bf731c/yaml/xyz/openbmc_project/Common/Progress.interface.yaml#L32 Change-Id: I4911de4476156e043ef5e5eddaa950e40535754e Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-10-24test: add unit tests for ThermalMetrics handlersJY Voon3-9/+228
The ThermalMetrics resources in thermal_metrics.hpp have no unit tests. Add tests to improve unit test coverage of this implemented feature. Tested: Unit tests pass. Change-Id: I21a24470e704e7c0652b70df4ac5d19e5c1ba502 Signed-off-by: JY Voon <jvoon@nvidia.com>
2026-10-23redfish: Test start update error handlingShivraj Toravi1-0/+14
Add a unit test verifying that handleStartUpdate returns HTTP 500 Internal Server Error when the D-Bus start update call fails with an I/O error. Tested: Ran meson test -C builddir update_service_test --verbose. All 7 tests passed, including StartUpdateErrorReturnsInternalError. Change-Id: I3921d4ece62c910097053fbee1d9fe62dc381167 Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-10-23test(redfish): add boot progress parameter testsShivraj Toravi1-0/+46
Add test coverage for assignBootParameters() to verify correct boot source and boot mode assignments for supported boot override values and invalid input handling. Tested: meson test -C build system_test --print-errorlogs passed. Change-Id: I80f09aa94490e61898fa24d09649d03f561239d6 Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-10-23redfish: return BootSource enum from dbusToRfBootSourceShivraj Toravi2-10/+39
Return computer_system::BootSource enum values instead of strings, and update the caller to check for BootSource::Invalid. Add unit tests covering all supported mappings and an unknown source. Tested: ninja -C build test; 77/77 pass. Tested: Cross-built and deployed on Romulus QEMU. All 15 functional checks passed, covering GET mappings, boot-mode precedence, PATCH/GET round trips, and invalid PATCH rejection. Change-Id: I7c5efd138377eab37c80093d6a2286ee8dbba2fb Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-10-22Add tests for production date report handlingShivraj Toravi2-1/+21
Add positive and negative unit tests for production-date handling in time_utils. - Validate normalization of valid build-date strings. - Verify invalid build-date values are rejected. - Guard against regressions in date parsing and output formatting behavior. Change-Id: I2d9f6b0746a6a0abd4a8759c487739ed0744c40c Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-10-22Reject Malformed Update ParametersJoel Pullokaran Jesin2-0/+12
Malformed UpdateParameters content previously returned HTTP 200 with an empty response body, making invalid multipart input appear accepted. Return HTTP 400 with a structured Redfish error instead. The response contains `Base.1.19.MalformedJSON` as the top-level code and `MessageId`, with an empty `MessageArgs` array. Return UnrecognizedRequestBody when a multipart part is missing Content-Disposition, so the handler does not fail silently. Tested: POST /redfish/v1/UpdateService/update-multipart/ with malformed JSON now returns HTTP 400, `Content-Type: application/json`, and `Base.1.19.MalformedJSON` Change-Id: I6ba2d8ca58d202aad0f73302f512feda59b94ecf Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-10-22parsing: increase maxValues to 5000 for telemetryJagpal Singh Gill2-10/+10
The BmcwebSaxParse JSON parser caps the total number of values in a request body at 2000. This can be limiting for telemetry report creation requests, which can contain hundreds of sensor metric properties and may exceed this limit, causing MalformedJSON errors. Increase maxValues from 2000 to 5000. The HTTP body size limit (30 MiB by default) still guards against truly abusive payloads. Change-Id: Id0c26b9a878c39dfa9e9f9b5546da0c53fbd3a83 Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
2026-10-22Move to Redfish 2026.2Gunnar Mills200-527/+8251
Like we do, one line change and rerun the script. 2026.2 includes new properties and schemas. The overview is at [1]. [1]: https://www.dmtf.org/sites/default/files/Redfish_Release_2026.2_Overview.pdf Tested: Inspection only. Change-Id: I860c142a3685b5aa98dfe27b2c718f16b04bece7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2026-10-22generate_schema_enums: handle digit-leading identifiersGunnar Mills1-10/+10
Redfish 2026.2 (Port.v1_20_0) introduces TypeDefinition member strings such as "100G", "104G", "112G", etc. as part of this new UALink128GExtendedSpeedMode property. [1] After stripping non-identifier characters these values still start with a digit, which is not a valid C++ identifier. The existing check .isdigit() only caught purely-numeric strings. Extend the logic to also prefix with the enum name when the sanitized string starts with a digit. Tested: Ran generate_schema_enums.py against the 2026.1 and nothing changes. 2026.2 now passes on top. In 2026.2 can see LinkSpeed200G. Change-Id: Ic55c9feae24ad9fb62e3a932b8a0aa1dcc2b3459 Signed-off-by: Gunnar Mills <gunnar@gmills.xyz>
2026-10-22Report Invalid Update HeadersJoel Pullokaran Jesin2-4/+111
Return Redfish HeaderMissing when the UpdateService HTTP push endpoint receives no Content-Type header, and HeaderInvalid when the header value is unsupported. Previously, these requests returned only HTTP 400 without a Redfish extended error. Both responses now include HTTP 400 with the appropriate Base.1.19 header error and identify Content-Type. Add unit tests for the same. Tested: POST /redfish/v1/UpdateService/update with Content-Type: application/json returns HTTP 400 and Base.1.19.HeaderInvalid. GET /redfish/v1/UpdateService returns HTTP 200. Change-Id: I09300fc78a8a8002ea159621b84a1fa81e139230 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-10-20telemetry: add unit tests for path/enum helpersEric Liu2-0/+217
Cover D-Bus path building, trigger id parsing including escaping and empty ids, and conversion between D-Bus operation types and the Redfish calculation algorithm enum. Tested: unit-test CI passes. 18 tests run. Change-Id: Ie6d840f27c1fc4a3185c89439ed40bfa8cacb43a Signed-off-by: Eric Liu <liuer@nvidia.com>