summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-04-13Software: Add D-Bus trace when internalErrorGunnar Mills1-0/+2
Hit an internalError in getSoftwareVersionCallback, having the ec would have been useful. Do that. Follow our Error Logging Levels.[1] Added a 2nd trace for another place in update_service.hpp. [1]: https://github.com/openbmc/bmcweb/blob/2bd69f6557d59391a236f9bdf61b7a6d4b77f295/DEVELOPING.md?plain=1#L224 Tested: Built bmcweb. Did not force down this error path. Change-Id: I9dcc998535a1fe5ff6d2d8c0d3191ab32dccf66b Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2026-04-13Remove now unused functionEd Tanous1-19/+0
After the prior patches, this is unused. Remove it Tested: Code builds Change-Id: I937984c9cb98f8f8f0f515394d9cf2960409512c Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-04-11Expose date/time in local timezoneIgor Kanyuka14-194/+254
BMC now exposes DateTime property under the Manager/<ID> in timezone configured on the BMC (local TZ) and not in UTC, but the other date time properties are still in UTC. Convert date time fields to local timezone. Tested: 1. Redfish service validator 2. Built Facebook's Catalina image with this change, ran in QEMU and checked manually varioius endpoints. 3. Ran automated tests [1] from openbmc-test-automation repo. 4. Unit tests [1] https://gerrit.openbmc.org/c/openbmc/openbmc-test-automation/+/88659 Change-Id: I8e587c7a1030deff8e6a550651c5e62719fe5299 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com> Signed-off-by: Ed Tanous <ed@tanous.net>
2026-04-10Add unit tests for GetDateTimeOffsetNowEd Tanous1-0/+15
Not a lot we can do here, but at least we can check the regex matches. Tested: Unit test passes Change-Id: Ib6058042c725169e90b971bd15851f16d621ac0e Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-04-10Remove old gcc-13 backportsEd Tanous1-131/+0
This block of code implemented pre-gcc-13 support for time parsing. gcc-13 is now required, so remove it. Change-Id: I266042db97ebe4cdf52c4c62d693efab021ae16f Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-04-09redfish-core:multi-host: no link to default systemAlexander Hansen1-7/+13
When meson option `experimental-redfish-multi-computer-system` is enabled, there is no 'default system' so we cannot form a link to that on a chassis resource. Fix the code to only add that link on systems not using the multi-host code path. Tested: on Tyan S8030 configure `-Dexperimental-redfish-multi-computer-system=enabled` Observe before this patch the response links to the default system. ``` curl --insecure --user root:root https://${bmc}/redfish/v1/Chassis/MBX_1_57_Chassis { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", "Actions": { "#Chassis.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Chassis/MBX_1_57_Chassis/ResetActionInfo", "target": "/redfish/v1/Chassis/MBX_1_57_Chassis/Actions/Chassis.Reset" } }, "Assembly": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/Assembly" }, "AssetTag": "", "ChassisType": "RackMount", "EnvironmentMetrics": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/EnvironmentMetrics" }, "Id": "MBX_1_57_Chassis", "Links": { "ComputerSystems": [ { "@odata.id": "/redfish/v1/Systems/system" } ], "Contains": [ { "@odata.id": "/redfish/v1/Chassis/Tyan_S8030_Baseboard" } ], "Contains@odata.count": 1, "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Manufacturer": "MBX", "Model": "1.57", "Name": "MBX_1_57_Chassis", "PartNumber": "MBX PART NUMBER", "PowerState": "Off", "PowerSubsystem": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/PowerSubsystem" }, "Sensors": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/Sensors" }, "SerialNumber": "700252071011", "Status": { "State": "StandbyOffline" }, "ThermalSubsystem": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/ThermalSubsystem" } } ``` After patching, the wrong link is no longer there: ``` curl --insecure --user root:root https://${bmc}/redfish/v1/Chassis/MBX_1_57_Chassis { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis", "@odata.type": "#Chassis.v1_22_0.Chassis", "Actions": { "#Chassis.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Chassis/MBX_1_57_Chassis/ResetActionInfo", "target": "/redfish/v1/Chassis/MBX_1_57_Chassis/Actions/Chassis.Reset" } }, "Assembly": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/Assembly" }, "AssetTag": "", "ChassisType": "RackMount", "EnvironmentMetrics": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/EnvironmentMetrics" }, "Id": "MBX_1_57_Chassis", "Links": { "Contains": [ { "@odata.id": "/redfish/v1/Chassis/Tyan_S8030_Baseboard" } ], "Contains@odata.count": 1, "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "Manufacturer": "MBX", "Model": "1.57", "Name": "MBX_1_57_Chassis", "PartNumber": "MBX PART NUMBER", "PowerState": "Off", "PowerSubsystem": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/PowerSubsystem" }, "Sensors": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/Sensors" }, "SerialNumber": "700252071011", "Status": { "State": "StandbyOffline" }, "ThermalSubsystem": { "@odata.id": "/redfish/v1/Chassis/MBX_1_57_Chassis/ThermalSubsystem" } } ``` Change-Id: I9c8d10a23111667a8b844e86394a02c1251c1684 Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2026-04-08Readme: Minor grammar fixes and accuracyJustin Nguyen1-7/+7
Some minor grammar fixes and updated `meson_options.txt` filename to `meson.options` in the Configuration section of the README Tested: Doc change only Change-Id: I11821d1383cfae8034c55522e0e8e8561321c6e1 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-04-06Correct a confusing debug message about AggregationAbiola Asojo1-1/+1
The previous message indicated that Aggregation is not enabled. It is a case where aggregation is enabled, but there are no satellite BMCs. The new debug message indicates that. Change-Id: I1aebfd6f771ae81ceb30a506c9bdd8fcc35c77d1 Signed-off-by: Abiola Asojo <abiola.asojo@ibm.com>
2026-04-04Fix nghttp2 + meson incompatibilityEd Tanous3-7/+37
Something with the newest meson is incompatible with the newest nghttp2 and results in meson errors about circular dependencies. This was not the case on nghttp2 before 1.67, but it's unclear what the linkage is. This is preventing oss-fuzz from building the project, so work around it for now by changing the name of the library to be unique. Change-Id: Ic12110a094e5a075910baa9df849010c786e58d1 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-04-02Implement depth parsing in filter parserEd Tanous3-4/+84
In certain debug scenarios, there were cases where we would hit recursion depth limits. These do not appear in conventional scenarios, but could pop up in debug builds while running fuzzing. To fix this, implement two checks. First, limit $filter expressions to 1000 characters or less. This is largely arbitrary. Second, implement a depth checker to ensure that stack depth doesn't exceed 10 frames. 10 is intended to be an order of magnitude more than anyone will ever use. Most examples use 1 or 2 parens. Tested: Unit tests pass. New unit tests added for this case. Change-Id: I2c95e2fc8c0a3b94ab2a7f882ac6e1805bb7ebd5 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-04-02Remove chatty log statementsEd Tanous1-6/+6
Very few people actually need to debug the connection classes, so having lots of logs clogs up debugging for most people. Comment out the log lines, but leave them in place such that if someone (possibly me) needs to they can be re-enabled easily. Tested: With logging enabled, running queries on the bmc doesn't result in logs printed per timer arm. Change-Id: Idcba1111091dab45e417a118c9eb093d84f8b2ec Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-31Port nlohmann::json::parse uses to saxEd Tanous7-46/+54
We should have a single entry point where we do json parsing. There are configurations for nlohmmann that we had previously documented, but were not well enforced. Move all uses to using the helper parse functions. Tested: Unit tests pass. Redfish service validator passes. Change-Id: I2a8aed9327b6b15219dc9b4d6db146b69bcd8eb3 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-31Encapsulate sd-journalEd Tanous8-116/+316
It would be better if the larger compile units didn't have to pull in the sd-journal header. At the same time, there's C handling of a number of resources that could be moved to an RAII class, and unit tests that we can add. This commit does all those things. Note, vacuum.journal is a file created with ``` journalctl --rotate && sleep 1 && journalctl --rotate ```` And contains a few log entries. Note, while this file is 8MB, the majority are zeros, so git should compress it just fine. Tested: Unit tests updated. Redfish service validator passes Change-Id: If578316bcd1d0162b7ecdcca27c1c7818ce2b6fa Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-31Update version of nghttp2Ed Tanous2-9/+5
Yocto currently uses 1.66.0, but will update in the subtree updates soon. Update the subproject to the newest nghttp2 version 1.68.1 This also cleans up some of our warnings so turn those back on. Change-Id: Ic1154aa107144f9f4b70ff433dfd0f531f4b41fa Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-31Modernize meson subprojectsEd Tanous1-29/+15
modern meson has added the include_type argument on dependency() calls, so we can rely on a single dependency call for finding dependencies. Tested: Code compiles as it did before when subprojects are used. Change-Id: If7c64ca4f3fee36a831d22fa3fc9c970c450bbb8 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-30redfish: Add safety check for empty D-Bus mapper responseArun R1-0/+6
handleProtocolEnabled was accessing entry.second.begin()->first without verifying entry.second is not empty. If D-Bus mapper returns an entry with empty service list, this causes undefined behavior/crash. Add check to skip entries with no service and log error condition. Change-Id: I299b9787cf058e7c5af01735985d0f6dd488d6a3 Signed-off-by: Arun R <rarun@ami.com>
2026-03-30Remove get_supported_argumentsEd Tanous1-30/+23
When these flags were first added to meson, they were added with a get_supported_arguments call. This results in a bunch of tests at configure time that largely do nothing. They run fairly quickly, but they clog the output with. ``` Compiler for C++ supports arguments -DBOOST_ALL_NO_LIB: YES Compiler for C++ supports arguments -DBOOST_ALLOW_DEPRECATED_HEADERS: YES Compiler for C++ supports arguments -DBOOST_ASIO_DISABLE_THREADS: YES Compiler for C++ supports arguments -DBOOST_ASIO_NO_DEPRECATED: YES Compiler for C++ supports arguments -DBOOST_ASIO_SEPARATE_COMPILATION: YES Compiler for C++ supports arguments -DBOOST_BEAST_SEPARATE_COMPILATION: YES Compiler for C++ supports arguments -DBOOST_EXCEPTION_DISABLE: YES Compiler for C++ supports arguments -DBOOST_NO_EXCEPTIONS: YES Compiler for C++ supports arguments -DBOOST_URL_NO_SOURCE_LOCATION: YES Compiler for C++ supports arguments -DBOOST_SPIRIT_X3_NO_RTTI: YES Compiler for C++ supports arguments -DJSON_NOEXCEPTION: YES Compiler for C++ supports arguments -DJSON_NO_IO: YES Compiler for C++ supports arguments -DJSON_USE_IMPLICIT_CONVERSIONS=0: YES Compiler for C++ supports arguments -DOPENSSL_NO_FILENAMES: YES Compiler for C++ supports arguments -DSDBUSPLUS_DISABLE_BOOST_COROUTINES: YES ``` Remove the get_supported_arguments call Tested: Observe that configure no longer prints the above. Change-Id: Ib797c801d08c8488da3d4bbe577b7cb8f433bb55 Signed-off-by: Ed Tanous <ed@tanous.net>
2026-03-27fix systemd unit descriptionAlexander Hansen1-1/+1
Observed following problem: ``` Mar 27 13:10:04 s5549-bmc-a0423f63b4a5 systemd[1]: Stopping Start bmcweb server... Mar 27 13:10:04 s5549-bmc-a0423f63b4a5 systemd[1]: bmcweb.service: Deactivated successfully. Mar 27 13:10:04 s5549-bmc-a0423f63b4a5 systemd[1]: Stopped Start bmcweb server. Mar 27 13:10:04 s5549-bmc-a0423f63b4a5 systemd[1]: bmcweb.service: Consumed 1.946s CPU time. Mar 27 13:10:04 s5549-bmc-a0423f63b4a5 systemd[1]: Started Start bmcweb server. ``` The description is wrong and logs do not form properly. Fix the unit description as per systemd docs [1] Tested: on Tyan S5549 ``` Mar 27 13:56:36 s5549-bmc-a0423f63b4a5 systemd[1]: Stopping bmcweb server... Mar 27 13:56:36 s5549-bmc-a0423f63b4a5 systemd[1]: bmcweb.service: Deactivated successfully. Mar 27 13:56:36 s5549-bmc-a0423f63b4a5 systemd[1]: Stopped bmcweb server. Mar 27 13:56:36 s5549-bmc-a0423f63b4a5 systemd[1]: bmcweb.service: Consumed 1.017s CPU time. Mar 27 13:56:36 s5549-bmc-a0423f63b4a5 systemd[1]: Started bmcweb server. ``` References: [1] https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#%5BUnit%5D%20Section%20Options Fixes: 5a7094b22c9b ("Add systemd unit files") Change-Id: Ia363b15a4e4de6b825473f8761adbdaedd5ca95c Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2026-03-26Add ast-grep rules for common errorsDavy Marrero10-0/+250
docs/COMMON_ERRORS.md documents patterns that are easy to introduce and hard to catch in review. This adds machine-enforceable ast-grep rules for those patterns so they get caught in CI instead of review. Rules cover unsafe integer parsing, throwing JSON APIs, throwing filesystem APIs, wildcard lambda captures, blocking calls, missing trailing slashes on routes, and route string concatenation. Tested: ast-grep scan --error exits 0. Change-Id: I7ae24b52ac5b120826d29bb3ac6fce8f30199c15 Signed-off-by: Davy Marrero <dmarrero@nvidia.com>
2026-03-25Upgrade to Boost 1.90Ed Tanous4-9/+7
Boost seems to have removed some of the enums that were previously in the enumeration[1]. We relied on two of these Http2-Settings and Content-Tranfer-Encoding. It's not clear why they were removed, but move those to using inline strings. [1] https://github.com/boostorg/beast/pull/3042/changes/db31a880525fe84b0e17b80015049363106c5b61 Change-Id: I233f103531de1361f903bae5c2981845143983d1 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-25Fix routes missing trailing slashDavy Marrero13-24/+24
bmcweb's route handler generates handlers for both /foo/ and /foo when a route is registered with a trailing slash. This change adds trailing slashes to 24 routes that were missing them. Existing clients are not affected: the router already accepted both forms. This change makes the route registrations consistent and lets the trailing-slash ast-grep rule pass without suppressions. Routes using <path> captures already match everything and do not need a trailing slash, so those are excluded in the ast-grep rule. Tested: ast-grep scan --error exits 0. Change-Id: I9de641bd8ffec773b313b7e4da9034be0fd7e8e8 Signed-off-by: Davy Marrero <dmarrero@nvidia.com>
2026-03-23bmcweb: Return HTTP 409 for resource conflict errorsChristian Walter2-2/+4
Change ResourceAlreadyExists from HTTP 400 Bad Request to HTTP 409 Conflict. While the Redfish specification (DSP0266 v1.23.1) does not explicitly mandate to return 409 it makes more sense because: - HTTP 400 implies a malformed request which this is clearly not - HTTP 409 is defined in Table 13 of DSP0266 as Creation or update request could not be completed because it causes a conflict in the current state of the resource which is what happens. Also mapping ResourceCreationConflict to 409 for the same reason even even though its currently not used in the codebase. Tested: POST to create a duplicate user account now returns HTTP 409 with ResourceAlreadyExists message instead of HTTP 400. The ResourceCreationConflict message is not used in the codebase and can not be tested. Change-Id: Id482e5e4f7b3d6ca56228f9d763c95aa50c9856f Signed-off-by: Christian Walter <christian.walter@9elements.com>
2026-03-20Allow to set Manager TZ and show its time in localIgor Kanyuka11-51/+282
Current code always return Date time in UTC, despite local timezone may differ. This change allows to set manager timezone via redfish and show manager's TZ and offset in manager's local timezone. When the DateTime is being patched, the provided date time gets converted from the provided TZ to the local timezone, but configured TZ does not get changed. A user must explicitly patch TimeZoneName to change Manager's TZ. Tested: 1. Built an image, ran in QEMU, changed TZ to PST8PDT (negative offset), UTC (0 offset), and Tokyo (positive offset). Made sure the patch works and all the touched fields have correct values. See [1]. 2. Unit tests 3. Redfish validator [1] ``` $ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName' "2026-03-19T11:03:16-07:00" "-07:00" "PST8PDT" $ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"TimeZoneName": "UTC"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc HTTP/1.1 204 No Content Allow: GET, PATCH 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 Date: Thu, 19 Mar 2026 18:03:28 GMT Content-Length: 0 $ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName' "2026-03-19T18:03:53+00:00" "+00:00" "UTC" $ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"TimeZoneName": "Asia/Tokyo"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc HTTP/1.1 204 No Content Allow: GET, PATCH 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 Date: Thu, 19 Mar 2026 18:04:20 GMT Content-Length: 0 $ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName' "2026-03-20T03:04:32+09:00" "+09:00" "Asia/Tokyo" $ curl -i -k -H 'Content-type: application/json' -u root:0penBmc -d '{"DateTime": "2026-01-02T11:03:16-07:00"}' -X PATCH https://localhost:8443/redfish/v1/Managers/bmc HTTP/1.1 204 No Content Allow: GET, PATCH 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 Date: Fri, 02 Jan 2026 18:03:16 GMT Content-Length: 0 $ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc | jq '.DateTime, .DateTimeLocalOffset, .TimeZoneName' "2026-01-03T03:03:21+09:00" "+09:00" "Asia/Tokyo" $ curl -s -k -H 'Content-type: application/json' -u root:0penBmc https://localhost:8443/redfish/v1/Managers/bmc/LogServices/Journal/Entries | jq '.Members[0]' { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/cz0zNTMzMTVkMTBjYWQ0ZTg5ODJiYjliZGVmOTc2NDE2MDtpPTE7Yj00YzU5NzY1NzQ0M2M0N2IzOWZjYTZiNzU1ZWVlY2NjOTttPTFlZjc1Yzg7dD02MzY0OGQxOTFhZTE0O3g9ZDU5MjYwNzJkZTgzMWYzYw==", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2025-05-29T16:30:41.794580+00:00", "EntryType": "Oem", "Id": "cz0zNTMzMTVkMTBjYWQ0ZTg5ODJiYjliZGVmOTc2NDE2MDtpPTE7Yj00YzU5NzY1NzQ0M2M0N2IzOWZjYTZiNzU1ZWVlY2NjOTttPTFlZjc1Yzg7dD02MzY0OGQxOTFhZTE0O3g9ZDU5MjYwNzJkZTgzMWYzYw==", "Message": "kernel: Booting Linux on physical CPU 0xf00", "Name": "BMC Journal Entry", "OemRecordFormat": "BMC Journal Entry", "Severity": "OK" } ``` Change-Id: I5a4567b9ca6a0f56dd9d1b971d418a19bf625a10 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
2026-03-20Use non-throwing json dump in logging pathsDavy Marrero3-4/+8
json::dump() throws on invalid UTF-8. Two debug log calls were using the default throwing form; switch them to the error_handler_t::replace overload that the rest of the codebase uses. The systems.hpp call passed modeValue.dump() into propertyValueNotInList, which accepts nlohmann::json directly. Removed the unnecessary dump call. Tested: ast-grep scan --error exits 0. Change-Id: I9f9dcb422f51cb1fa3484788c7791311aea95437 Signed-off-by: Davy Marrero <dmarrero@nvidia.com>
2026-03-19sensor_utils: Assume non-finite values as unpopulatedAmithash Prasad1-6/+21
Threshold property pairs such as LowerCritical, UpperCritical when not defined by the service will now be represented as null. ReadingRangeMax and ReadingRangeMin properties will be absent if they are undefined by the service. Depending on the configuration many sensors might not specify values and these properties on DBus would default to inf/-inf. Examples of these properties are MinValue, MaxValue along with Thresholds where only one of the tuple (upper/lower) is populated. This change will reflect this in output and interpret inf/-inf as "unpopulated" and set to null for thresholds which may be changed by the users and skipped for Min/Max values. This is done by keeping a list of allowed values and inferring it to determine what needs to be done. Tested: Tested changes on a Ventura BMC. Ensured that `journalctl -f -u bmcweb` no longer has a flood of entries with `Sensor value for MaxValue was unexpectedly inf`. Also ensure the output of curl matches new expectation Missing Min/Max Value results in missing ReadingRangeMin/Max values: ``` curl https://$BMC/redfish/v1/Chassis/Ventura_Fan_Board_0/Sensors/current_FCB_0_FAN_1_CURR_A { "@odata.id": "/redfish/v1/Chassis/Ventura_Fan_Board_0/Sensors/current_FCB_0_FAN_1_CURR_A", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "current_FCB_0_FAN_1_CURR_A", "Name": "FCB 0 FAN 1 CURR A", "Reading": 0.3793103448275862, "ReadingType": "Current", "ReadingUnits": "A", "Status": { "Health": "OK", "State": "Enabled" } } ``` Ensure that when one tuple of the range is missing we insert null ``` curl https://$BMC/redfish/v1/Chassis/Ventura_RMC/Sensors/power_RMC_HSC_PWR_W { "@odata.id": "/redfish/v1/Chassis/Ventura_RMC/Sensors/power_RMC_HSC_PWR_W", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "power_RMC_HSC_PWR_W", "Name": "RMC HSC PWR W", "Reading": 35.602771994768936, "ReadingRangeMax": 3000.0, "ReadingRangeMin": 0.0, "ReadingType": "Power", "ReadingUnits": "W", "Status": { "Health": "OK", "State": "Enabled" }, "Thresholds": { "LowerCritical": { "Reading": null }, "UpperCritical": { "Reading": 580.0 } } } ``` Executed redfish service validator on a QEMU instance with an external sensor with missing lower critical/warning sensors. ``` *** Validating /redfish/v1/Chassis/MyCoolBoard/Sensors/temperature_HostDevTemp Type (Sensor.v1_11_0.Sensor), GET SUCCESS (time: 0:00:00.000026) PASS ``` Change-Id: I78c0529cd52f7703af6346b239ecb7519479b70d Signed-off-by: Amithash Prasad <amithash@meta.com>
2026-03-19Add TLS session resumption support to mTLSIgor Kanyuka6-127/+275
TLS session resumption allows to bypass full TLS handshake in subsequent connections, it's enabled in OpenSSL, so clients that support it use it. One of the optimizations is, the client passes Session ID in subsequent request and does not pass certificates. Since client certificate is not passed, the callback that populates user session out of the certificate is not called, and as result, auth fails for requests sents in subsequent connections. This change enables session ID in memory cache, lookup of the certificate in the cache by the session ID received from the client and constructing user session out of it for subsequent connections. The cache is stored in RAM [1]. According to Nginx doc [2], size of one session is about 250 bytes. If sessions use mTLS, they will also contain a cert which is typically up 2kb. A client establishes connections as part of a session, so a session can be associated with multiple connections. In the worst case, when many clients establish a single connection at a time, or a client always uses a new session for every established connection, there will be number of session entries in the cache equals to the number of connections. While OpenSSL limits cache size to SSL_SESSION_CACHE_MAX_SIZE_DEFAULT which is 20480 [3], OpenBMC limits number of established connections to 200 [4], so in the worst case, memory usage will be ~50kb for non mTLS clients, and ~440kb for mTLS clients. Typically, when there are just 2-3 clients connected, even if them maintain multiple connections within their sessions, the cache size will be less than 10kb for mTLS. To prevent high memory usage by the cache, the change sets cache size to 100 entries. Expired sessions are automatically removed on every 255th session [5]. Tested: Deployed on one of our envs and ran client that quickly sends multiple requests to the BMC (so the client created several connections), and make sure the 401 auth problem had been observed before gone. Also, made sure BMCWeb logged debug messages about existing session detection. Ran tests from the openbmc-test-automation repository, esp related to certificate and user management. They do session auth and not mTLS/multi-connection, so they could not detect/confirm the problem is fixed, but they confirm the change does not break the primary use case. [1] https://docs.openssl.org/3.6/man3/SSL_CTX_set_session_cache_mode/#notes [2] https://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_session_cache [3] https://github.com/openssl/openssl/blob/5869303daaecf037f0d00dc33a00f9bdc1e71f2f/include/openssl/ssl.h.in#L670 [4] https://github.com/openbmc/bmcweb/blob/master/http/http_connection.hpp#L219C13-L219C28 [5] https://docs.openssl.org/3.6/man3/SSL_CTX_flush_sessions/#notes Change-Id: Ia94d1e323cd464cc7ca5b0f9c7d6a76e4c780e9a Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
2026-03-18Fix collection Members io_error regressionTony Ao2-1/+19
Keep existing Members on local I/O failures in the generic collection path, and ensure empty collections still return mandatory Members and Members@odata.count properties. Add a reusable JSON array helper and use it in both collection building and aggregator merge logic to avoid clearing the response on transient failures. Fixes common error #13.[1] [1] https://github.com/openbmc/bmcweb/blob/master/docs/COMMON_ERRORS.md#13-complete-replacement-of-the-response-object Tested: unit test passed; validator passed on empty collection URIs. Change-Id: I8e144f55b99e3f8017abcebb11c409fffebf38ad Signed-off-by: Tony Ao <tao@nvidia.com>
2026-03-17Collection: keep Members stable on io_error; add array helperTony Ao4-11/+179
The generic collection path could clear the "Members" array on a local I/O error, which breaks aggregated responses and can trigger Common Error #13 [1]. The aggregator merge logic also needed a small reusable helper to ensure a JSON value is an array. Add a generic JSON array "ensure" helper in utils/collection.hpp and use it from both the local collection builder and the aggregator merge path. This avoids resetting Members on transient failures and avoids relying on transitive includes for the helper. [1] https://github.com/openbmc/bmcweb/blob/master/docs/COMMON_ERRORS.md#13-complete-replacement-of-the-response-object Tested: Unit tests passed. Change-Id: Iddaa608916af661f75989b4aeae9b557d09eebe3 Signed-off-by: Tony Ao <tao@nvidia.com>
2026-03-17journal_utils: Fix memory leak from sd_journal_get_cursorJason M. Bills1-1/+4
sd_journal_get_cursor() returns a pointer allocated with malloc. That pointer is wrapped in std::unique_ptr to manage it, but the default std::unique_ptr calls delete[], so the memory allocated with malloc is not properly freed. This changes the std::unique_ptr Deleter to be std::free, so when the pointer is destroyed, free is called on the allocated memory to release it. Tested: Looped a GET of /redfish/v1/Managers/bmc/LogServices/Journal/Entries and monitored bmcweb memory usage. Before: 0 sec: VmRSS: 13696 kB RssAnon: 3840 kB RssFile: 9856 kB RssShmem: 0 kB 60s: VmRSS: 29304 kB RssAnon: 18212 kB RssFile: 11092 kB RssShmem: 0 kB 120s: VmRSS: 43976 kB RssAnon: 32844 kB RssFile: 10940 kB RssShmem: 192 kB After: 0 sec: VmRSS: 18008 kB RssAnon: 6836 kB RssFile: 7920 kB RssShmem: 3252 kB 60s: VmRSS: 17048 kB RssAnon: 6172 kB RssFile: 7768 kB RssShmem: 3108 kB 120s: VmRSS: 17136 kB RssAnon: 6180 kB RssFile: 7768 kB RssShmem: 3188 kB Change-Id: I4438a59798f2fb88992edc92e2049ebe3c5592b1 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2026-03-17Changing Account Password Returns 204Joseph-Jonathan Salzano1-0/+1
There was a change late last year where the success message was removed from the return when an account password is changed. Commit: adee9f2e5b9e371a7e9bf9c817a340982658b341 However if only the password is patched dbus utilities is never called. Therefore, the return code is still a 200. This breaks Redfish compliance tools due to the fact that the body was empty but the return was 200. This change sets the return to a 204 if the password change is successful. Failures later will still be handled. Change-Id: I7c03eb71e010082d45574962b57f8efb2f845b9b Signed-off-by: Joseph-Jonathan Salzano <joseph-jonathan.salzano@hp.com>
2026-03-12NetworkAdapter: add support for Network Adapter Port MetricsHarshit Aghera4-0/+628
This patch enables support for Nvidia ConnectX network cards. Network adapter schemas are restricted to a single URI path format: /redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdaptersId}/. [1] And thus, the port URI follows this structure /redfish/v1/Chassis/{ChassisId}/NetworkAdapters/{NetworkAdaptersId}/ Ports/{PortId}. [2] Route handler for collections and each individual components are added in this patch for each URI resource under /redfish/v1/Chassis/{ChassisId}/NetworkAdapters. Association between Chassis and NetworkAdapter is `containing` and `contained_by`. Association between NetworkAdapter and Port is `connecting` and `connected_to`. This patch enable support for following properties for Port Metrics URI of a Network Port. [3] - TXBytes - RXBytes - RXMulticastFrames - TXMulticastFrames - RXUnicastFrames - TXUnicastFrames - RXBroadcastFrames - TXBroadcastFrames - RXFCSErrors - RXFrameAlignmentErrors - RXFalseCarrierErrors - RXUndersizeFrames - RXOversizeFrames - RXPauseXONFrames - RXPauseXOFFFrames - TXPauseXONFrames - TXPauseXOFFFrames - TXSingleCollisions - TXMultipleCollisions - TXLateCollisions - TXExcessiveCollisions The patch uses "xyz.openbmc_project.Metric.Value" Interface for Network Port Metrics properties. Association between a Metric and a Port is `measuring` and `measured_by`. PDI patch - https://gerrit.openbmc.org/c/openbmc/bmcweb/+/84629 dbus-sensors patches - https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/84520 Tested: Build an image for nvl32-obmc machine with the following patch cherry picked. https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/84520 https://gerrit.openbmc.org/c/openbmc/openbmc/+/85490 The openbmc 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/ ``` redfish service validator is passing. ``` $ curl -s -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters", "@odata.type": "#NetworkAdapterCollection.NetworkAdapterCollection", "Members": [ { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_0" }, { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1" }, { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_2" }, { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_3" } ], "Members@odata.count": 4, "Name": "Nvidia_IMGX_ConnectX8_SuperNIC_Switch Network Adapter Collection" }% $ curl -s -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1 { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1", "@odata.type": "#NetworkAdapter.v1_11_0.NetworkAdapter", "Id": "Nvidia_ConnectX_1", "Name": "Nvidia_ConnectX_1 Network Adapter", "Ports": { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports" }, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } }% $ curl -s -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports", "@odata.type": "#PortCollection.PortCollection", "Members": [ { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0" }, { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_1" } ], "Members@odata.count": 2, "Name": "Nvidia_ConnectX_1 Port Collection" }% $ curl -s -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0/ { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0", "@odata.type": "#Port.v1_9_0.Port", "Id": "Port_0", "Metrics": { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0/Metrics" }, "Name": "Nvidia_ConnectX_1 Port_0 Port", "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Enabled" } }% $ curl -s -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0/Metrics/ { "@odata.id": "/redfish/v1/Chassis/Nvidia_IMGX_ConnectX8_SuperNIC_Switch/NetworkAdapters/Nvidia_ConnectX_1/Ports/Port_0/Metrics", "@odata.type": "#PortMetrics.v1_7_0.PortMetrics", "Id": "Metrics", "Name": "Nvidia_ConnectX_1 Port_0 Port Metrics", "Networking": { "RXBroadcastFrames": 0, "RXFCSErrors": 0, "RXFalseCarrierErrors": 0, "RXFrameAlignmentErrors": 0, "RXMulticastFrames": 0, "RXOversizeFrames": 0, "RXPauseXOFFFrames": 0, "RXPauseXONFrames": 0, "RXUndersizeFrames": 0, "RXUnicastFrames": 0, "TXBroadcastFrames": 0, "TXExcessiveCollisions": 0, "TXLateCollisions": 0, "TXMulticastFrames": 0, "TXMultipleCollisions": 0, "TXPauseXOFFFrames": 0, "TXPauseXONFrames": 0, "TXSingleCollisions": 0, "TXUnicastFrames": 0 }, "RXBytes": 0, "TXBytes": 0 }% ``` [1]: https://redfish.dmtf.org/schemas/v1/NetworkAdapter_v1.xml [2]: https://redfish.dmtf.org/schemas/v1/Port_v1.xml [3]: https://redfish.dmtf.org/schemas/v1/PortMetrics_v1.xml Change-Id: I73c5a39b12f8f0a40026fb50c2ded53e0b225f67 Signed-off-by: Harshit Aghera <haghera@nvidia.com>
2026-03-12Fabric: add support for PCIe Switch Port MetricsHarshit Aghera3-10/+150
This patch enable support for following properties for Port Metrics URI of a PCIe Switch. [1] - PCIeErrors.CorrectableErrorCount - PCIeErrors.NonFatalErrorCount - PCIeErrors.FatalErrorCount - PCIeErrors.L0ToRecoveryCount - PCIeErrors.ReplayCount - PCIeErrors.ReplayRolloverCount - PCIeErrors.NAKSentCount - PCIeErrors.NAKReceivedCount - PCIeErrors.UnsupportedRequestCount The patch uses "xyz.openbmc_project.Metric.Value" Interface for PCIe Port Metrics properties. Association between a Metric and a Port is `measuring` and `measured_by`. PDI patch - https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/84839 dbus-sensors patches - https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/84132 Tested: Build an image for nvl32-obmc machine with the following patch cherry picked. https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/84132 https://gerrit.openbmc.org/c/openbmc/openbmc/+/85490 The openbmc 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/ ``` redfish service validator is passing. ``` $ curl -k -u 'root:0penBmc' https://${bmc_ip}/redfish/v1/Fabrics/fabric/Switches/Nvidia_ConnectX_0/Ports/UP_0/Metrics/ { "@odata.id": "/redfish/v1/Fabrics/fabric/Switches/Nvidia_ConnectX_0/Ports/UP_0/Metrics", "@odata.type": "#PortMetrics.v1_3_0.PortMetrics", "Id": "Metrics", "Name": "Nvidia_ConnectX_0 UP_0 Port Metrics", "PCIeErrors": { "CorrectableErrorCount": 0, "FatalErrorCount": 0, "L0ToRecoveryCount": 1, "NAKReceivedCount": 0, "NAKSentCount": 0, "NonFatalErrorCount": 0, "ReplayCount": 0, "ReplayRolloverCount": 0, "UnsupportedRequestCount": 0 } }% ``` [1]: https://redfish.dmtf.org/schemas/v1/PortMetrics_v1.xml Change-Id: I7cca75fa5d4c77a4b02d35f7ce0b024f325ceff0 Signed-off-by: Harshit Aghera <haghera@nvidia.com>
2026-03-11Fix socket startup when mode is httpEd Tanous2-4/+37
When starting up in http mode, the socket needs to be of type http to allow the flow to work correctly. As is, enabling insecure-disable-ssl results in a non functional api due to hardcoded https. Teted: enabled insecure-disable-ssl; Verify that curl to http port 80 works Change-Id: I2958d6f39b642a02b6ce5f1c69d1da409dafc70d Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-10Change multipart parser APIEd Tanous3-128/+105
In preparation for making the multipart parser incremental, modify the API to explicitly call out steps of start, parsePart, and finish. This allows the parser to support incremental per-character parsing in the future. This also has the benefit of dropping the dependency on the Request struct on the multipart parser itself. Tested: Unit tests pass. Good coverage. Change-Id: I3359f45bb9faaea42908491a818cc4a81f257a1f Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-03-09EnvironmentMetrics: Use utility getAllPropertiesJanet Adkins1-6/+4
Corrected two places using sdbusplus::asio::getAllProperties instead of dbus::utility::getAllProperties Tested: - Confirmed EnvironmentMetrics response the same before and after the change. Change-Id: I1683fab4cf3a7b31d2014134372780ec36769680 Signed-off-by: Janet Adkins <janeta@us.ibm.com>
2026-03-09Remove redundant is_method_error() checksGeorge Liu2-13/+0
The handlers registered through sdbusplus::bus::match_t only receive D-Bus signals. Signal messages are never sent as method-error replies, and therefore message.is_method_error() can never be true in these callbacks. This change removes all unnecessary is_method_error() checks from signal handlers to simplify the code and avoid confusion. Change-Id: I280c94c074b8a30eaf8edaf7fb36edaa8a3c3ef5 Signed-off-by: George Liu <liuxiwei@ieisystem.com>
2026-03-06Add port and timeout args to generate_auth_certificatesIgor Kanyuka1-2/+16
If target BMC image is deployed in QEMU, port is typically non std one, and since it's being emulated, it's typically slower. As result, the script fails trying to connect to port 443 and not all operations finish within default 5 seconds timeout. So, add parameters which allow to override port and timeout to accommodate tests of images running in QEMU. Tested: Ran this against QEMU instance, passed 8443 as port and 30.0 as the timeout, worked fine. Change-Id: Ib3d9fa0e9cef87dba2f35b38f33dc8186ad0b4b8 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
2026-03-05Add SpeedPercent information for FanGeorge Liu4-1/+134
Adds SpeedPercent and SecondarySpeedPercent information according to the Redfish Fan schema.[1] The schema only allows fans of ReadingType Percent to be reported in SpeedPercent and SecondarySpeedPercent. These new properties are accessed through the Redfish Uri for a particular fan on a particular chassis[2]: ``` /redfish/v1/Chassis/<chassisId>/ThermalSubsystem/Fans/<fanId> ``` The primary and secondary fan sensors connected to the fan are found by: 1) Find all sensors associated to fan using the 'sensors' endpoint.[3] 2) For each sensor get its priority using the 'xyz.openbmc_project.Common.Priority' interface.[4][5] 3) Retrieve the sensor excerpt and place into the response based on the priority of the sensor. Implementation Notes: - The utility function objectExcerptToJson() is used to populate the SensorFanExcerpt. - Guards are added to handle different cases of D-Bus sensors Priority settings: - Fan has only 1 sensor associated and the sensor has no priority. Fills SpeedPercent for response. - Fan has more than one sensor. Any sensor without priority will be skipped. - Fan has one or more sensors with priority. The priority setting determines which property will be filled for the response. If the priority is 0 it uses SpeedPercent. If the priority is 1 it uses SecondarySpeedPercent. Any other priority the sensor will not be included in the response. - Fan has two sensors with the same priority. The first one is in the response and the second one is skipped. [1] https://redfish.dmtf.org/schemas/v1/Fan.v1_6_0.json [2] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2025.4.html#fan [3] https://github.com/openbmc/docs/blob/master/architecture/sensor-architecture.md#association-type-2-linking-a-low-level-hardware-item-to-its-sensors [4] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/66779 [5] https://gerrit.openbmc.org/c/openbmc/phosphor-hwmon/+/67170 Tested (using p10bmc hardware simulator with fan configuration edits): - Redfish Service Validator passes - Tested various fan configurations with Percent fans: ``` /* Fan has two sensors both with priority set */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0", "@odata.type": "#Fan.v1_6_0.Fan", ... "SecondarySpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_1", "Reading": 60, "SpeedRPM": 12036.0 }, ... "SpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "Reading": 100, "SpeedRPM": 18000.0 }, ... } /* Fan has two sensors neither with priority, both skipped */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan1 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan1", "@odata.type": "#Fan.v1_6_0.Fan", ... "PartNumber": "XXXXXXX", "SerialNumber": "XXXXXXXXXXXX", "SparePartNumber": "XXXXXXX", "Status": { "Health": "OK", "State": "Enabled" } } /* Fan has one sensor without priority, shown as primary */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2", "@odata.type": "#Fan.v1_6_0.Fan", ... "SpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_0", "Reading": 50, "SpeedRPM": 18000.0 }, ... } /* Fan has two sensors. Both have priority 0. The first sensor is in the * response the second sensor is skipped. */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan3 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan3", "@odata.type": "#Fan.v1_6_0.Fan", "Id": "fan3", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.1234567-A3" } }, "LocationIndicatorActive": false, "Manufacturer": "Delta", "Model": "7B5G", "Name": "Fan", "PartNumber": "02YK200", "SerialNumber": "YS10JP12V0TY", "SparePartNumber": "02YK237", "SpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_0", "Reading": null, "SpeedRPM": 18000.0 }, "Status": { "Health": "OK", "State": "Enabled" } } /* Fan has two sensors. One priority 0, other priority 2. Only the * primary is in the response. */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan4 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan4", "@odata.type": "#Fan.v1_6_0.Fan", ... "PartNumber": "XXXXXXX", "SerialNumber": "XXXXXXXXXXXX", "SparePartNumber": "XXXXXXX", "SpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_0", "Reading": null, "SpeedRPM": 18000.0 }, ... } /* Fan has two sensors. One priority 1, other priority 2. Only the * secondary is in the response. */ curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan5 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan5", "@odata.type": "#Fan.v1_6_0.Fan", ... "SecondarySpeedPercent": { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan5_1", "Reading": null, "SpeedRPM": 12036.0 }, "SerialNumber": "XXXXXXXXXXXX", "SparePartNumber": "XXXXXXX", "Status": { "Health": "OK", "State": "Enabled" } } ``` - Tested with rotational fans the new fields are not in response: ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0 { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0", "@odata.type": "#Fan.v1_6_0.Fan", ... "PartNumber": "XXXXXXX", "SerialNumber": "XXXXXXXXXXXX", "SparePartNumber": "XXXXXXX", "Status": { "Health": "OK", "State": "Enabled" } } curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "@odata.type": "#Sensor.v1_11_1.Sensor", ... "ReadingType": "Rotational", ... } ``` Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com> Signed-off-by: Janet Adkins <janeta@us.ibm.com> Change-Id: Ic767de3bde8bfe14b31da23b67e17a8d04eefadb
2026-03-02processor: Use lowercase hex prefix for ProcessorId fieldsChristian Walter1-5/+5
The Redfish schema for Processor requires IdentificationRegisters and related ProcessorId fields to match the pattern ^0x[0-9A-Fa-f]+$. The std::format specifier {:#X} produces an uppercase "0X" prefix (e.g. "0XBFEBFBFF000806F8"), which fails schema validation. Change to {:#x} to produce the lowercase "0x" prefix that the schema requires (e.g. "0xbfebfbff000806f8"). This affects EffectiveFamily, EffectiveModel, IdentificationRegisters, MicrocodeInfo, and Step. Tested: Ran DMTF Redfish Service Validator; ProcessorId fields now pass the pattern check. Change-Id: Id70abd2904e5b9d12b7d213d5da79802021535fe Signed-off-by: Christian Walter <christian.walter@9elements.com>
2026-02-27Fix Oem/OpenBMC Redfish Service Validator warningsMyung Bae4-14/+32
There are a few warnings like - Schema error to missing OpenBMCManager schema on BMC ``` Oem/OpenBmc Schema Error: Unable to locate the schema definition for the 'OpenBMCManager.v1_0_0.Manager' type. ``` ``` curl -k -X GET https://${bmc}/redfish/v1/Managers/bmc   "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"       }     } ``` - Schema error to missing OpenBMCAccountService schema on BMC ``` Oem/OpenBMC [Object] Schema Error: Unable to locate the schema definition for the 'OpenBMCAccountService.v1_0_0.AccountService' type. ``` ```  curl -k -X GET https://${bmc}/redfish/v1/AccountService     ...       "Oem": {         "OpenBMC": {           "@odata.id": "/redfish/v1/AccountService#/Oem/OpenBMC",           "@odata.type": "#OpenBMCAccountService.v1_0_0.AccountService",           "AuthMethods": {             "BasicAuth": true,             "Cookie": true,             "SessionToken": true,             "TLS": false,             "XToken": true           }         }       }, ``` - Unexpected trailing slash ``` @odata.id /redfish/v1/Managers/bmc/Truststore/Certificates/ Trailing Slash Warning: The URI for the resource has an unexpected trailing slash. ``` ``` curl -k -X GET https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates {   "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",   "@odata.type": "#CertificateCollection.CertificateCollection",   "Description": "A Collection of TrustStore certificate instances",   "Members": [],   "Members@odata.count": 0,   "Name": "TrustStore Certificates Collection” ``` Tested: - Redfish Service Validator passes on the above cases without warnings Change-Id: Ib2d2d765101e9d7820531f307164cef96a7705cf Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2026-02-27zstd: downgrade the encoding log levelHaiyue Wang1-1/+1
This isn't an error message, change it for making the command output of 'journalctl -u bmcweb' clean. Change-Id: Iff3af323b863776e2e49abcda51198f6b571007d Signed-off-by: Haiyue Wang <haiyuewa@163.com>
2026-02-27bmcweb: add PhysicalContext support for SensorsEnder Hsieh2-4/+32
This change implements support for the D-Bus interface xyz.openbmc_project.Common.PhysicalContext for Sensors. It allows bmcweb to fetch the physical location context via the 'Type' property from this interface and expose it through the Redfish Sensor resource. The dBusSensorPhysicalContextToRedfish helper is added to map the D-Bus PhysicalContextType enum string to the Redfish PhysicalContext enumeration. Currently only the Accelerator type is supported by PDI; additional types should be added here as they are introduced in phosphor-dbus-interfaces. This implementation follows the interface definition introduced in: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/86504 Key changes: - sensor_utils.hpp: Added dBusSensorPhysicalContextToRedfish helper. - sensor_utils.hpp: Updated fillSensorIdentity to unpack and map the PhysicalContext property to the sensor JSON response. - Redfish.md: Documented the PhysicalContext property for the Chassis Sensors resource (/redfish/v1/Chassis/{ChassisId}/ Sensors/{Id}/). Tested: ``` Sample output $ curl -k -H "Content-Type: application/json" -X GET https://"${BMC}"/redfish/v1/Chassis/<id>/Sensors/<sensor_id> { ... "PhysicalContext": {}, ... } ``` 1. Verified that PhysicalContext appears in the Redfish Sensor response (e.g., /redfish/v1/Chassis/<id>/Sensors/<sensor_id>). 2. Validated with Redfish Service Validator. Depends-On: I83dcbe4810139fb92fddf6b099f5a1a057e7e05e Depends-On: I1d5abfa5d4416af3565bf315e0f28cb6af56f14c Change-Id: I23a40f9c74c6c368c04488af727e0889fc44e010 Signed-off-by: Ender Hsieh <andhsieh@nvidia.com>
2026-02-25Add FanSpeedsPercent for EnvironmentMetricsGeorge Liu5-12/+177
Adds FanSpeedsPercent information according to the Redfish EnvironmentMetrics schema [1]. The schema only allows fans of ReadingType Percent to be included in the FanSpeedsPercent array. The Redfish Uri supports retrieval of the metrics for a specific chassis: ``` /redfish/v1/Chassis/<chassisId>/EnvironmentMetrics ``` The fan sensors connected to the chassis are found by: 1) Find all fans associated to the chassis using the 'cooled_by' endpoint. [3]. 2) Find all sensors associated to each fan using the 'sensors' endpoint. [4] 3) Retrieve the sensor excerpt data for each sensor. A similar approach to retrieving the sensor data is used here as for the proposed implementation for ThermalSubsystem/Fans [2]. [1] https://redfish.dmtf.org/schemas/v1/EnvironmentMetrics.v1_3_2.json [2] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57657 [3] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58300 [4] https://github.com/openbmc/docs/blob/master/architecture/sensor-architecture.md#association-type-2-linking-a-low-level-hardware-item-to-its-sensors Implementation notes: - The utility function objectExcerptToJson() is used to populate the SensorFanArrayExcerpt. - Altered the objectExcerptToJson() function to take a sensor::ReadingType value for the optional expected sensor type. Tested: (using hardware simulator) - Redfish Validator passes. - With redfish-allow-rotational-fans disabled: (Note fans that percent cannot be computed have null for Reading property.) ``` 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", "FanSpeedsPercent": [ { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "Reading": 100, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_1", "Reading": 60, "SpeedRPM": 12036.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0", "Reading": 50, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_1", "Reading": 32, "SpeedRPM": 12036.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_0", "Reading": 50, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_1", "Reading": 25, "SpeedRPM": 12036.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_0", "Reading": null, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_1", "Reading": null, "SpeedRPM": 12036.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_0", "Reading": null, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_1", "Reading": null, "SpeedRPM": 12036.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan5_0", "Reading": null, "SpeedRPM": 18000.0 }, { "DataSourceUri": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan5_1", "Reading": null, "SpeedRPM": 12036.0 } ], "FanSpeedsPercent@odata.count": 12, "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics" } ``` - Can see DataSourceUri match Sensors fan paths of ReadingType Percent: ``` curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors | grep fan "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_1" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan1_1" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan2_1" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan3_1" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan4_1" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan5_0" "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan5_1" // E.g. curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan0_0", ... "ReadingType": "Percent", ... ``` - With redfish-allow-rotational-fans enabled the only fans are not Percent ReadingType so are not added to the FanSpeedsPercent array : ``` 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", "FanSpeedsPercent": [], "FanSpeedsPercent@odata.count": 0, "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics" } // E.g. curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0 { "@odata.id": "/redfish/v1/Chassis/chassis/Sensors/fantach_fan0_0", "@odata.type": "#Sensor.v1_11_1.Sensor", "Id": "fantach_fan0_0", ... "ReadingType": "Rotational", ... ``` Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Janet Adkins <janeta@us.ibm.com> Change-Id: I4cfc0aa28d68e7e0fa947251363deb6f06e36225
2026-02-24Fix spelling mistakes using codespellGeorge Liu6-7/+7
Signed-off-by: George Liu <liuxiwei@ieisystem.com> Change-Id: If170e53077bc150d0062cd441394daea71f842b1
2026-02-24Replace deprecated argumentsIgor Kanyuka1-10/+18
httpx deprecated [1] passing CA as verify and certs as tuple and now the code does not work as expected. Replace these values with ssl context as suggested. Tested: Ran the script and it worked. [1] https://github.com/encode/httpx/blob/master/httpx/_config.py#L45-L63 Change-Id: Ifb90e8e978e63b94b7a0f149d226841ceaa20658 Signed-off-by: Igor Kanyuka <ifelmail@gmail.com>
2026-02-24Be more paranoid in json parsingEd Tanous3-8/+290
When taking json directly from a user, we should set some limits on parsing depth as well as total number of value elements. Value elements are considered any individual value, the start of an array, the start of a dictionary, or null. This is to prevent flooding type attacks creating large number of objects, while still keeping under the depth 10 cap. This commit makes use of the nlohmann sax parse to handle this by injecting a new error handler in between that will impose new limits. Currently this sets the depth limit to 10 and the total number of keys to 500; These are intentionally high, and could be tuned or expanded on in the future. Tested: Unit tests pass. Change-Id: I789543679e22b0b0ce0b2b0b71f31377b0759cd7 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-02-23Remove extra properties from LinkGunnar Mills1-6/+0
The newly released 3.0.4[1] Redfish Service Validator has additional checks. It is flagging the AccountService. ``` MultiFactorAuth/ClientCertificate/Certificates [Object] Reference Object Error: The navigation property 'Certificates' contains extra properties. FAIL ``` Today the AccountService looks like ``` Body Response of /redfish/v1/AccountService: { "@odata.id": "/redfish/v1/AccountService", "@odata.type": "#AccountService.v1_15_0.AccountService", ... "MultiFactorAuth": { "ClientCertificate": { "CertificateMappingAttribute": "CommonName", "Certificates": { "@odata.id": "/redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates", "@odata.type": "#CertificateCollection.CertificateCollection", "Members": [], "Members@odata.count": 0 }, "Enabled": false, "RespondToUnauthenticatedClients": true } }, "Name": "Account Service", ... ``` Reading AccountService schema[2], Certificates should just be a link. ``` "Certificates": { "$ref": "http://redfish.dmtf.org/schemas/v1/CertificateCollection.json#/definitions/CertificateCollection", "description": "The link to a collection of CA certificates used to validate client certificates.", ``` With this change: ``` "MultiFactorAuth": { "ClientCertificate": { "CertificateMappingAttribute": "CommonName", "Certificates": { "@odata.id": "/redfish/v1/AccountService/MultiFactorAuth/ClientCertificate/Certificates" }, "Enabled": false, "RespondToUnauthenticatedClients": true } }, ``` This matches other Collection Links like Roles. [1]: https://github.com/DMTF/Redfish-Service-Validator/tags [2]: https://redfish.dmtf.org/schemas/v1/AccountService.v1_18_1.json Tested: - Redfish Service Validator passes Change-Id: I71f448f65241443a651e6d69203b21d2a1fd29e3 Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2026-02-23redfish: Refactor BMC restart functions to eliminate duplicationRamya Sivakumar1-42/+21
Removed BMC state management D-Bus constants used directly into the functions and consolidate duplicate code in BMC restart functions Changes: - Create setBMCTransition() helper function to handle common D-Bus property write logic - Refactor doBMCGracefulRestart() and doBMCForceRestart() to use the new helper function This reduces code duplication by ~50 lines and provides a single source of truth for D-Bus interface strings, improving maintainability and reducing the risk of errors when BMC state interfaces change Tested: Verified GracefulRestart and ForceRestart actions work correctly via Redfish Manager.Reset endpoint Change-Id: I773da3dfcf720a66408df098ccf99f0912fbcafa Signed-off-by: Ramya Sivakumar <sramya@ami.com>
2026-02-21Fix corrupted error response for unknown properties in static addressesChandramohan Harkude1-3/+0
When PATCH requests contain unknown properties in IPv4StaticAddresses or IPv6StaticAddresses, the code was returning both PropertyUnknown and PropertyValueFormatError errors. The PropertyValueFormatError was showing corrupted values (empty strings) in the error message, making the response confusing and incorrect. The issue occurred because: 1. readJsonObject() detects unknown properties and calls messages::propertyUnknown() for each one, then returns false 2. The code then also called messages::propertyValueFormatError() with the JSON object, which showed corrupted/empty values Fix: - Remove the propertyValueFormatError() calls from parseAddresses() (IPv4StaticAddresses) and handleIPv6StaticAddressesPatch() (IPv6StaticAddresses) - Now only PropertyUnknown error is returned, which is the correct response per Redfish specification Examples of fixed responses: - IPv4StaticAddresses with unknown property "Abcd": Returns only PropertyUnknown error for "Abcd" - IPv6StaticAddresses with unknown property "Gateway": Returns only PropertyUnknown error for "Gateway" This ensures clean, accurate error responses without corrupted value information. ``` BEFORE curl -k -u root:0penBmc -H 'Content-Type: application/json' -X PATCH https://127.0.0.1:2443/redfish/v1/Managers/BMC_0/EthernetInterfaces/eth0 -d '{"IPv4StaticAddresses": [{"Address": "10.7.104.200", "SubnetMask": "255.255.224.0", "Gateway": "10.7.96.254", "Abcd": "dajkhdkj"}]}' { "IPv4StaticAddresses/0@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '{\"Abcd\":\"dajkhdkj\",\"Address\":\"\",\"Gateway\":\"\",\"SubnetMask\":\"\"}' for the property IPv4StaticAddresses/0 is not a format that the property can accept.", "MessageArgs": [ "{\"Abcd\":\"dajkhdkj\",\"Address\":\"\",\"Gateway\":\"\",\"SubnetMask\":\"\"}", "IPv4StaticAddresses/0" ], "MessageId": "Base.1.19.PropertyValueFormatError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ], "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property Abcd is not in the list of valid properties for the resource.", "MessageArgs": [ "Abcd" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "message": "The property Gate is not in the list of valid properties for the resource." } } curl -k -u root:0penBmc -H 'Content-Type: application/json' -X PATCH https://127.0.0.1:2443/redfish/v1/Managers/BMC_0/EthernetInterfaces/eth0 -d '{"IPv6StaticAddresses": [{"Address": "2002::1", "PrefixLength": 64, "Gate": "2002::2"}]}' { "IPv6StaticAddresses/1@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '{\"Address\":\"\",\"Gate\":\"2002::2\",\"PrefixLength\":64}' for the property IPv6StaticAddresses/1 is not a format that the property can accept.", "MessageArgs": [ "{\"Address\":\"\",\"Gate\":\"2002::2\",\"PrefixLength\":64}", "IPv6StaticAddresses/1" ], "MessageId": "Base.1.19.PropertyValueFormatError", "MessageSeverity": "Warning", "Resolution": "Correct the value for the property in the request body and resubmit the request if the operation failed." } ], "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property Gate is not in the list of valid properties for the resource.", "MessageArgs": [ "Gate" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed." } ], "code": "Base.1.19.PropertyUnknown", "message": "The property Gate is not in the list of valid properties for the resource." } AFTER curl -k -u root:0penBmc -H 'Content-Type: application/json' -X PATCH https://127.0.0.1:2443/redfish/v1/Managers/BMC_0/EthernetInterfaces/eth0 -d '{"IPv6StaticAddresses": [{"Address": "2002::1", "PrefixLength": 64, "Gateway": "2002::2"}]}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property Gateway is not in the list of valid properties for the resource.", "MessageArgs": [ "Gateway" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed." } ], "code": "Base.1.19.PropertyUnknown", "message": "The property Gateway is not in the list of valid properties for the resource." } } curl -k -u root:0penBmc -H 'Content-Type: application/json' -X PATCH https://127.0.0.1:2443/redfish/v1/Managers/BMC_0/EthernetInterfaces/eth0 -d '{"IPv4StaticAddresses": [{"Address": "10.7.104.200", "SubnetMask": "255.255.224.0", "Gateway": "10.7.96.254", "Abcd": "dajkhdkj"}]}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The property Abcd is not in the list of valid properties for the resource.", "MessageArgs": [ "Abcd" ], "MessageId": "Base.1.19.PropertyUnknown", "MessageSeverity": "Warning", "Resolution": "Remove the unknown property from the request body and resubmit the request if the operation failed." } ], "code": "Base.1.19.PropertyUnknown", "message": "The property Abcd is not in the list of valid properties for the resource." } } ``` Change-Id: Id1f23056aa27d53ab8945ac27f91028185a775db Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
2026-02-17Make sure init is called on http2Ed Tanous1-1/+21
The body object seems to work properly when init isn't called, but to make things efficient, init can call std::string::reserve when appropriate and avoid mallocs. Tested: Unit tests pass. Good coverage for http2. Change-Id: I7abba9640ad711678f1ca2ed6d1b42d9aba22dcc Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Rajeev Ranjan <ranjan.rajeev1609@gmail.com>