summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
4 daysopenbmc_rest: Refactor subscribe onmessage lambdaHEADmasterYuvakumar Selvamani1-130/+126
Extract the long onmessage() websocket lambda in requestRoutes() into a named function, handleDbusMonitorMessage(), per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Tested: - No other functional change. - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I340df11dfbc626e26dab931f0ca0581cbd17e102 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
5 daysFix unchecked optional value in dump createTaskOliver Brewka1-2/+10
In order to silence clang-tidy, check payload value. Tested: Code compiles. clang-tidy runs through. Change-Id: Ib9db2552b0c9f8974728b8afe909a138d948b278 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
5 daysSimplify dump routes registryOliver Brewka3-63/+6
Instead of registering each route separately, register all routes in a single function call for systems dump, manager dump and manager faultlog. Tested: Code compiles. Unit tests pass. Validator passed. Change-Id: I335ef22873137743eade4d3c0119ad38c6a68a83 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
5 daysBreak out dump / faultlog log servicesOliver Brewka6-1325/+1418
Similar to how other log services got broken out into own header files, do the same for dump / faultlog. A new dump utility header has been created, request handler and route register function went into manager / systems log service header files respectively. Code logic stays untouched in this patch. Tested: Code compiles. Unit test runs through. Validator was run on romulus in qemu with phosphor-debug-collector ibm extension enabled to get access to /xyz/openbmc_project/dump/system. Via the 'CreateDump' method empty dump entries were manually created for: /xyz/openbmc_project/dump/system /xyz/openbmc_project/dump/bmc /xyz/openbmc_project/dump/faultlog ``` busctl call xyz.openbmc_project.Dump.Manager \ /xyz/openbmc_project/dump/bmc \ xyz.openbmc_project.Dump.Create \ CreateDump a{sv} 0 > o "/xyz/openbmc_project/dump/bmc/entry/1" 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/bmc/entry/2 | |- /xyz/openbmc_project/dump/bmc/entry/3 | |- /xyz/openbmc_project/dump/bmc/entry/4 | |- /xyz/openbmc_project/dump/bmc/entry/5 | `- /xyz/openbmc_project/dump/bmc/entry/6 |- /xyz/openbmc_project/dump/faultlog | `- /xyz/openbmc_project/dump/faultlog/entry | `- /xyz/openbmc_project/dump/faultlog/entry/1 |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system `- /xyz/openbmc_project/dump/system/entry `- /xyz/openbmc_project/dump/system/entry/1 ``` Overwrite OperationStatus of /xyz/openbmc_project/dump/system/entry/1 for the entry to be added to the collection: ``` busctl set-property xyz.openbmc_project.Dump.Manager \ /xyz/openbmc_project/dump/system/entry/1 \ xyz.openbmc_project.Common.Progress Status \ s xyz.openbmc_project.Common.Progress.OperationStatus.Completed \ ``` Systems/Dump Validating /redfish/v1/Systems/system/LogServices/Dump... - Pass: 14, Warn: 0, Fail: 0, Skip: 9 Validating /redfish/v1/Systems/system/LogServices/Dump/Entries... - Pass: 17, Warn: 0, Fail: 0, Skip: 30 Validating /redfish/v1/Systems/system/LogServices/Dump/Entries/1... - Pass: 10, Warn: 0, Fail: 0, Skip: 26 +--------------+--------------+--------------+--------------+ | PASS | WARN | FAIL | NOT TESTED | +--------------+--------------+--------------+--------------+ | 41 | 0 | 0 | 65 | +--------------+--------------+--------------+--------------+ Managers/Dump Validating /redfish/v1/Managers/bmc/LogServices/Dump... - Pass: 14, Warn: 0, Fail: 0, Skip: 9 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries... - Pass: 70, Warn: 0, Fail: 0, Skip: 162 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/1... - Pass: 11, Warn: 0, Fail: 0, Skip: 25 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/2... - Pass: 11, Warn: 0, Fail: 0, Skip: 25 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/3... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/4... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/5... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/6... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 +--------------+--------------+--------------+--------------+ | PASS | WARN | FAIL | NOT TESTED | +--------------+--------------+--------------+--------------+ | 142 | 0 | 0 | 329 | +--------------+--------------+--------------+--------------+ Managers/FaultLog Validating /redfish/v1/Managers/bmc/LogServices/FaultLog... - Pass: 12, Warn: 0, Fail: 0, Skip: 9 Validating /redfish/v1/Managers/bmc/LogServices/FaultLog/Entries... - Pass: 13, Warn: 0, Fail: 0, Skip: 34 Validating /redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1... - Pass: 6, Warn: 0, Fail: 0, Skip: 30 +--------------+--------------+--------------+--------------+ | PASS | WARN | FAIL | NOT TESTED | +--------------+--------------+--------------+--------------+ | 31 | 0 | 0 | 73 | +--------------+--------------+--------------+--------------+ Change-Id: I6379f877149c545b3b3bfcda8510c6ee1085dcf9 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
6 daysUse enums in processor and virtual_mediaVinothkumar Shanmugavel2-21/+33
Several functions in processor.hpp and virtual_media.hpp return ProcessorArchitecture, InstructionSet, and TransferProtocolType values as std::string literals, which lacks compile-time type safety. This can lead to typos or invalid values that are only caught at runtime. Convert these to use processor::ProcessorArchitecture, processor::InstructionSet, and virtual_media::TransferProtocolType enums instead. These enums are already defined in their respective generated header files with NLOHMANN_JSON_SERIALIZE_ENUM mappings. The enums automatically serialize to the same JSON strings. This provides compile-time type checking and prevents invalid property values. Tested: - Verified properties serialize to identical JSON values. - Redfish Service Validator: PASS: 6082, WARN: 353, FAIL: 0, NOT TESTED: 5245 Change-Id: Ia8c0a80e418770c39c159d66d30655b621e488b2 Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
6 daysbmcweb: add unit tests for Fabric Switch PowerState handlersJY Voon2-0/+166
Cover dbusToRfPowerState() and the callbacks introduced by the Fabric Switch PowerState change: afterGetSwitchPowerState and afterGetSwitchPowerStateService. The tests assert each branch's externally visible behavior: known PowerState decorator values map to the matching resource::PowerState and unmapped values yield nullopt; a property read error or an unmapped value leaves PowerState omitted without failing the request; EBADR, io_error and an empty mapper object leave PowerState omitted; any other mapper error sets an internal server error. Change-Id: Id488f88b8d7784a4f195fcf7c832fbecfdb0b513 Signed-off-by: JY Voon <jvoon@nvidia.com>
6 daysbmcweb: add PowerState to Fabric Switch GETJY Voon2-1/+95
Extend handleFabricSwitchPathSwitchGet() in fabric.hpp to read xyz.openbmc_project.State.Decorator.PowerState from the resolved Switch D-Bus path and surface the value as the Redfish PowerState property on /redfish/v1/Fabrics/{FabricId}/Switches/{SwitchId}. Tested: Build an image for nvl32-obmc machine with the following patches cherry-picked: 1. Align with upstream u-boot dts tree: https://gerrit.openbmc.org/c/openbmc/openbmc/+/89932 2. mctpd configuration: https://gerrit.openbmc.org/c/openbmc/openbmc/+/87390 3. Enable nvidia-gpu sensor: https://gerrit.openbmc.org/c/openbmc/openbmc/+/89933 4. nvidia-gpu: add PowerState on ConnectX PCIeDevice: https://gerrit.openbmc.org/c/openbmc/dbus-sensors/+/90170 $ curl -sk https://{BMC_IP}/redfish/v1/Fabrics/fabric/Switches/\ Nvidia_ConnectX_24_PCIe { "@odata.id": "/redfish/v1/Fabrics/fabric/Switches/Nvidia_ConnectX_24_PCIe", "@odata.type": "#Switch.v1_7_0.Switch", "Id": "Nvidia_ConnectX_24_PCIe", "Name": "Nvidia_ConnectX_24_PCIe", "Ports": { "@odata.id": ".../Switches/Nvidia_ConnectX_24_PCIe/Ports" }, "PowerState": "On", "Status": { "Health": "OK", "State": "Enabled" } } $ busctl get-property xyz.openbmc_project.GpuSensor \ /xyz/openbmc_project/inventory/Nvidia_ConnectX_24_PCIe \ xyz.openbmc_project.State.Decorator.PowerState PowerState s "xyz.openbmc_project.State.Decorator.PowerState.State.On" ``` Redfish Service Validator: Summary - PASS: 9752, WARN: 373, FAIL: 0, NOT TESTED: 13355 Validating /redfish/v1/Fabrics/fabric/Switches/Nvidia_ConnectX_24_PCIe... - Pass: 9, Warn: 0, Fail: 0, Skip: 32 Validating /redfish/v1/Fabrics/fabric/Switches/Terminus_18_PCIeSwitch_1_100... - Pass: 8, Warn: 0, Fail: 0, Skip: 33 ``` Change-Id: I4bc636664ae74280b72eab13219e5bf5b1e79a85 Signed-off-by: JY Voon <jvoon@nvidia.com>
6 daysFix internalError when protocol service absentVijaysankar Ravi1-0/+10
When phosphor-ipmi-net or any other protocol service is not registered with the D-Bus object mapper, handleProtocolEnabled() was returning HTTP 500 InternalError to the client. The mapper returns EIO (value=5, generic category) when the requested service object path does not exist. Handle this specific error code and return PropertyNotWritable, consistent with the existing fallback for missing backend entries in the same function. Tested: Toggled IPMI/ProtocolEnabled on EVB-AST2600 where phosphor-ipmi-net is absent. Confirmed response changed from 500 InternalError to 405 PropertyNotWritable. Change-Id: I1da8eb5658985512faeb6603d8a9be6fb2295aae Signed-off-by: Vijaysankar Ravi <vijaysankarr@ami.com>
7 daysbmcweb: add PCIeDevice UUID propertyJY Voon4-0/+103
Add optional support for UUID property for PCIeDevice. Tested: Build an image for nvl32-obmc machine with the following patch cherry picked. ``` 1. Align with upstream u-boot dts tree: https://gerrit.openbmc.org/c/openbmc/openbmc/+/89932 2. mctpd configuration: https://gerrit.openbmc.org/c/openbmc/openbmc/+/87390 3. Enable nvidia-gpu sensor: https://gerrit.openbmc.org/c/openbmc/openbmc/+/89933 ``` PCIeDevice with Common.UUID published (GPU path): $ busctl get-property xyz.openbmc_project.GpuSensor \ /xyz/openbmc_project/inventory/Nvidia_GPU_10 \ xyz.openbmc_project.Common.UUID UUID s "68174e99-daf4-02d1-ba39-4ed2bf8a0f21" $ curl -sk https://{BMC_IP}/redfish/v1/Systems/system/\ PCIeDevices/Nvidia_GPU_10 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/Nvidia_GPU_10", "@odata.type": "#PCIeDevice.v1_19_0.PCIeDevice", "Id": "Nvidia_GPU_10", "Manufacturer": "NVIDIA", "Model": "RTXPRO6000BlackwellDC", "Name": "PCIe Device", "PartNumber": "900-2G153-0000-000", "SerialNumber": "1792425045093", "Status": { "Health": "OK", "State": "Enabled" }, "UUID": "68174e99-daf4-02d1-ba39-4ed2bf8a0f21" } PCIeDevice without Common.UUID published (ConnectX path): $ busctl get-property xyz.openbmc_project.GpuSensor \ /xyz/openbmc_project/inventory/Nvidia_ConnectX_24_PCIe \ xyz.openbmc_project.Common.UUID UUID Failed to get property UUID on interface xyz.openbmc_project.Common.UUID: Unknown interface xyz.openbmc_project.Common.UUID or property UUID. $ curl -sk https://{BMC_IP}/redfish/v1/Systems/system/\ PCIeDevices/Nvidia_ConnectX_24_PCIe | jq 'has("UUID")' false Change-Id: I38cf972f03f0dd0299b708ea8203872c73c8e224 Signed-off-by: JY Voon <jvoon@nvidia.com>
8 daysCable: Add Available state and Status.HealthAkshay Gaitonde2-31/+12
Extended Cable's Status.State to use Available mapping and added Status.Health to Cable which it did not have before Utilize resource_util's getResourceHealth and getResourceState to standardize Redfish Status.State and Status.Health Tested: on QEMU, which has no host and so no real cable inventory, with a cable object injected into phosphor-inventory-manager. Functional true -> "Health": "OK", "State": "Enabled" Functional false -> "Health": "Critical", "State": "Enabled" Where State can be "Enabled", "Absent", and "UnavailableOffline" if the xyz.openbmc_project.State.Decorator.Availability interface is implemented Change-Id: I9f99f7cfe348545506753cc4eedd81570fbf3fba Signed-off-by: Akshay Gaitonde <a.g@utexas.edu> Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
11 daysAdd unit tests for security headersJoel P J2-0/+157
Add unit tests for the security header helper. Cover headers that are always added, preserve existing Cache-Control values, and verify the HTML-only header path. Also validate representative Content-Security-Policy and Permissions-Policy values so future header regressions are caught by unit test coverage. Tested: Passed local CI docker run for bmcweb unit tests Change-Id: I069d203f6bc35155d17d8488ab5511aa38218f3a Signed-off-by: Joel P J <joelpj@ami.com>
11 daysstate: Add Available to Processors and AcceleratorJustin Nguyen1-65/+27
- Map `Available` to Redfish `UnavailableOffline` for resource which are present but not available - Utilize getResourceState and getResourceHealth utility functions to standardize Status.State and Status.Health Tested: - Redfish Service Validator passes - Request ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/Processors/cpu0/ ``` ``` { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "cpu0", ... "LocationIndicatorActive": false, "MaxSpeedMHz": 0, "Name": "Processor", "ProcessorType": "CPU", "Socket": "", "Status": { "Health": "OK", "State": "UnavailableOffline" }, ... } ``` Change-Id: I8e08c15eb6e10251d3e1fe0902150a76f9c63bd2 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
12 daysRefactor location_utils getLocationCode lambdaYuvakumar Selvamani1-19/+23
getLocationCode() used an inline lambda for the D-Bus async response callback. The lambda body was long enough to trigger the long-lambda ast-grep rule, which required an inline suppression comment (// ast-grep-ignore: long-lambda). Extract the lambda into a named afterGetLocationCode() function and bind it with std::bind_front() instead. This matches the existing bmcweb pattern for D-Bus response callbacks, improves readability, and removes the need for the ast-grep suppression. Also change the EBADR log message from BMCWEB_LOG_ERROR to BMCWEB_LOG_WARNING. Tested: - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings. Change-Id: I3ffa51b1f6bb4bc7bd31e0b2f361294c8aa36978 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
12 daysRefactor EventService: Extract DELETE handlerYuvakumar Selvamani1-24/+27
Convert the inline DELETE subscription lambda into a named handleEventDestinationDelete() bound via std::bind_front, matching the handler style used elsewhere in this file. Tested: - No other functional change. - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I92b00d312548cbd38a3d1a821cea7839764b199d Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
13 daysFix systemd unit path for quiesce checkXinyuan Wang1-1/+1
checkForQuiesced() reads the ActiveState property of the obmc-bmc-service-quiesce@0.target systemd unit using an unescaped object path. systemd derives unit object paths by escaping every character outside [A-Za-z0-9] as an underscore plus two hex digits, so '-' becomes _2d, '@' becomes _40 and '.' becomes _2e. The unescaped form is not merely a mismatch. '-', '@' and '.' are not valid characters in a D-Bus object path, so the call fails on the bus before it ever reaches systemd. The error branch then falls through to Health "OK" and State "Enabled", so the failure is silent and a quiesced BMC reports itself as healthy and enabled over Redfish. The correctly escaped form is already used elsewhere in the tree: manager_diagnostic_data.hpp queries bmcweb_2eservice. Users will now see Status/State "Quiesced" and Status/Health "Critical" on /redfish/v1/Managers/<id> when the BMC has quiesced. Previously that condition always reported "Enabled" and "OK". Clients that implicitly relied on Managers never reporting Quiesced will see the new value. This is the behavior the existing code already intends and what the Redfish Resource schema specifies, so it is treated as a bug fix rather than a breaking change. Tested: Built obmc-phosphor-image for romulus (bmcweb 92b625bc) and ran it under QEMU (qemu-system-arm 11.0.2, -M romulus-bmc). D-Bus layer, on the running BMC: ''' # busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 \ org.freedesktop.systemd1.Manager GetUnit s \ obmc-bmc-service-quiesce@0.target o "/org/freedesktop/systemd1/unit/obmc_2dbmc_2dservice_2dquiesce_400_2etarget" # busctl get-property org.freedesktop.systemd1 \ /org/freedesktop/systemd1/unit/obmc-bmc-service-quiesce@0.target \ org.freedesktop.systemd1.Unit ActiveState Invalid object path: /org/freedesktop/systemd1/unit/obmc-bmc-service-quiesce@0.target # busctl get-property org.freedesktop.systemd1 \ /org/freedesktop/systemd1/unit/obmc_2dbmc_2dservice_2dquiesce_400_2etarget \ org.freedesktop.systemd1.Unit ActiveState s "active" ''' Before this patch, with obmc-bmc-service-quiesce@0.target active, GET /redfish/v1/Managers/bmc still returned: ''' "Status": { "Health": "OK", "State": "Enabled" } ''' After this patch, same image and machine, with the quiesce target inactive and CurrentBMCState Ready: ''' "Status": { "Health": "OK", "State": "Enabled" } ''' and then after systemctl start obmc-bmc-service-quiesce@0.target, with CurrentBMCState Quiesced: ''' "Status": { "Health": "Critical", "State": "Quiesced" } ''' No unit test was added: bmcweb has no D-Bus mocking in test/ and there is no test file for managers.hpp. Change-Id: I676c4f58c90e9619603b27bad59940e382f57f13 Signed-off-by: Xinyuan Wang <wang.x.6f@gmail.com>
13 daysclang-tidy fixes for log services headerOliver Brewka7-52/+30
Silent clang-tidy warnings: - remove unused header includes - switch <systemd/sd_bus.h> to <systemd/sd-bus-protocol> for sd_bus_error usage - change str.find usage to str.contains Tested: Code compiles. Change-Id: I814239d47e1586ebc28bccc00c08e41f711b9beb Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-08-25Fix ComputerSystem.Reset error reportingJoel Pullokaran Jesin1-1/+2
Report invalid ResetType values with Base.1.19.ActionParameterValueNotInList instead of Base.1.19.ActionParameterUnknown. ResetType is a recognized action parameter, so an unsupported value must be reported as an invalid enumeration value rather than an unknown parameter name. This gives clients the correct error semantics and actionable response details. Tested: The invalid-value response now identifies ResetType as a known parameter and reports the supplied value as unsupported. POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset with {"ResetType":"Nope"} returns HTTP 400 and Base.1.19.ActionParameterValueNotInList. POST /redfish/v1/Systems/system/Actions/ComputerSystem.Reset with {} continues to return HTTP 400 and Base.1.19.PropertyMissing. Change-Id: Ieb71f89b0bedf5ceeaaa8c8c6d89c05ae4a4aac6 Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-08-25Use LogEntry enums for dump responsesJoel Pullokaran Jesin1-6/+11
Replace the dump entry response assignments for `EntryType` and `DiagnosticDataType` with generated `LogEntry` enum values. No functional changes Change-Id: I5b2ce19dfe2cb7070494d4e315605946ecc7bcba Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
2026-08-25virtual_media: use configured manager URI nameRython Cai1-4/+6
The VirtualMedia handlers compared the manager path segment against a hardcoded "bmc" instead of BMCWEB_REDFISH_MANAGER_URI_NAME. That constant comes from the redfish-manager-uri-name meson option, which defaults to "bmc" but may be set to any value. When the option is set to another value, Manager still advertises VirtualMedia at /redfish/v1/Managers/<name>/VirtualMedia, but the VirtualMedia handlers rejected that URI with resourceNotFound. The collection GET, the resource GET, and the InsertMedia and EjectMedia actions were all unreachable, so Manager published a dangling link. Compare against BMCWEB_REDFISH_MANAGER_URI_NAME instead, matching how managers.hpp, network_protocol.hpp, and update_service.hpp already validate the manager segment. Behavior is unchanged for the default option value. Tested: Built bmcweb with -Dredfish-manager-uri-name=manager. Verified GET /redfish/v1/Managers/manager/VirtualMedia works. Verified the default manager URI behavior remains unchanged. Change-Id: I2375398d6a2780ef403870061d6583b3ae699551 Signed-off-by: Rython Cai <rython_cai@jabil.com>
2026-08-24Update security compiler flagsEd Tanous1-1/+37
ossf maintains a list of best practice compiler flags for hardened services[1] implement them. Tested: Unit tests pass. No code changes. [1] https://github.com/ossf/wg-best-practices-os-developers/blob/main/docs/Compiler-Hardening-Guides/Compiler-Options-Hardening-Guide-for-C-and-C%2B%2B.md Change-Id: I0c83c30aa2d80317d9e016544d736a60ad894806 Signed-off-by: Ed Tanous <etanous@nvidia.com>
2026-08-23hypervisor: cleanup ResetType parameter handlingYuvakumar Selvamani1-11/+4
Change ResetType to std::string so readJsonAction() automatically returns ActionParameterMissing when the field is absent, removing the redundant explicit check. Also replace propertyValueNotInList with actionParameterValueNotInList for unsupported ResetType values, consistent with the Redfish schema semantics for action parameters. Tested: - No functionality changes, updated the validation fix. - Verified property missing error by testing locally in AST2600 platform. - Service Validator Passed. +--------------+--------------+--------------+--------------+ | PASS | WARN | FAIL | NOT TESTED | +--------------+--------------+--------------+--------------+ | 5820 | 353 | 0 | 4906 | +--------------+--------------+--------------+--------------+ Change-Id: I286afe08a66f0fc07c518cd5b227e5312fe5a524 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-08-22state: Add Available mapping for Power SupplyJustin Nguyen1-60/+5
- Utilized resource util's getResourceState and getResourceHealth to get the Status.State and Status.Health of the power supply resource Tested: - Unit tests passed - Redfish Service Validator passed - Response as expected: ``` curl -k -v https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply0 ``` Results in ``` { "@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/PowerSupplies/powersupply0", ... "SerialNumber": "Y YL106 63F0", "SparePartNumber": "0 ", "Status": { "Health": "OK", "State": "UnavailableOffline" } ... } ``` Change-Id: I9fed94f7800fe01b6cb6de1a768da381bc116155 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-21redfish-core: Refactor sw_utils lambdasYuvakumar Selvamani1-52/+55
The getSwMinimumVersion and getSwStatus functions each contained an inline lambda that triggered the long-lambda ast-grep rule, requiring an inline suppression (// ast-grep-ignore: long-lambda). This commit extracts each lambda into a separate named function, afterGetSwMinimumVersion and afterGetSwStatus respectively, and uses std::bind_front to handle the asynchronous callback. This aligns the code with the preferred bmcweb pattern for D-Bus callbacks, improves readability, and allows the removal of the static analysis suppressions. Tested: - No other functional change. - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I5557501b1af6506ebd23301110899b324b94d867 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-08-21Refactor asset_utils getAssetInfo lambdaYuvakumar Selvamani1-17/+23
The getAssetInfo function contained an inline lambda that triggered the long-lambda ast-grep rule, requiring an inline suppression (// ast-grep-ignore: long-lambda). This commit extracts the lambda into a separate afterGetAssetInfo function and uses std::bind_front to handle the asynchronous callback. This aligns the code with the preferred bmcweb pattern for D-Bus callbacks, improves readability, and allows the removal of the static analysis suppression. Tested: - No other functional change. - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I471ab2402be00c81e629e965994a650024e120c4 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-08-21redfish-core: Refactor getManagedHostPropertyYuvakumar Selvamani1-13/+19
The getManagedHostProperty function contained an inline lambda that triggered the long-lambda ast-grep rule, requiring an inline suppression (// ast-grep-ignore: long-lambda). This commit extracts the lambda into a separate afterGetManagedHostProperty function and uses std::bind_front to handle the asynchronous callback. This aligns the code with the preferred bmcweb pattern for D-Bus callbacks, improves readability, and allows the removal of the static analysis suppression. Tested: - No other functional change. - Tested on an AST2600 SoC platform. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I8e1fe0aae26b07a4f84c1d41aef536627f7051ac Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-08-21Use enum for MemoryDeviceType propertyVinothkumar Shanmugavel1-25/+26
The translateMemoryTypeToRedfish() function returns memory device types as std::string literals, which lacks compile-time type safety. This can lead to typos or invalid values that are only caught at runtime. Convert this function to return memory::MemoryDeviceType enum instead. This enum is already defined in generated/enums/memory.hpp with NLOHMANN_JSON_SERIALIZE_ENUM mapping and provides proper type checking. The enum automatically serializes to the same JSON strings, so there is no functional change to the Redfish API. This provides compile-time type checking and better error handling through the Invalid enum value for unknown or unsupported memory types. Tested: - No functional change. - Verified MemoryDeviceType property serializes to identical JSON values. - Redfish Service Validator: PASS: 6002, WARN: 353, FAIL: 0, NOT TESTED: 5227 Change-Id: I34087487ce88ab4767a27d93ff85448b946a6528 Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
2026-08-19state: Add Available state to MemoryJustin Nguyen1-4/+10
- Map `Available` to Redfish `UnavailableOffline` for Status.State when resource is present but not available Tested: - Unit tests passed - Redfish Service Validator passed - Request ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/Memory/dimm3 ``` Results in ``` { "@odata.id": "/redfish/v1/Systems/system/Memory/dimm3", "@odata.type": "#Memory.v1_12_0.Memory", ... "Status": { "Health": "OK", "State": "Enabled" } ... ``` `UnavailableOffline` if not available but present ``` "Status": { "Health": "OK", "State": "UnavailableOffline" } ``` Change-Id: I163095f013bc233a8eb7de3894ef950a75d93379 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19state: Add Available mapping for AssemblyJustin Nguyen1-66/+5
- Utilize getResourceState and getResourceHealth utility function for Assembly Status.State and Status.Health - Map `Available` to Redfish `UnavailableOffline` Tested: - Unit tests passed - Redfish Service Validator passed - Request expected ``` curl -k -v https://${bmc}/redfish/v1/Chassis/chassis/Assembly ``` ``` { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly", "@odata.type": "#Assembly.v1_6_0.Assembly", "Assemblies": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/0", "@odata.type": "#Assembly.v1_6_0.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "Ufcs-N00-D0" } }, "LocationIndicatorActive": false, "MemberId": "0", "Name": "base_op_panel_blyth", "Status": { "Health": "OK", "State": "Absent" } }, { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/1", "@odata.type": "#Assembly.v1_6_0.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "U78DA.N00.1234567-D1" } }, "LocationIndicatorActive": false, "MemberId": "1", "Model": "6B86", "Name": "lcd_op_panel_hill", "PartNumber": "PN12345", "SerialNumber": "YL6B86010000", "SparePartNumber": "F191014", "Status": { "Health": "OK", "State": "UnavailableOffline" } } ], "Assemblies@odata.count": 2, "Id": "Assembly", "Name": "Assembly Collection" } ``` Change-Id: If7f06b27dbdfa914a9db4480ba856d9dd25c8795 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19state: Add Available mapping for Fabric PortsJustin Nguyen1-65/+5
- Utilize getResourceState and getResourceHealth utility function for resource's Status.State and Status.Health - Map `Available` to Redfish `UnavailableOffline` Tested: - Unit tests passed - Redfish Service Validator passed - Request expected: ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector1 ``` Results in ``` { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0/Ports/dp0_connector1", "@odata.type": "#Port.v1_11_0.Port", "Id": "dp0_connector1", ... "Status": { "Health": "OK", "State": "UnavailableOffline" } } ``` if the resource is present but not available Change-Id: I9220a9df2f602ed0712b10142782eeaa6f949ac9 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19state: Add Available mapping for Fabric AdaptersJustin Nguyen1-60/+5
- Utilized resource util's getResourceState and getResourceHealth to get the Status.State and Status.Health of the fabric adapters resource - Map `Available` to Redfish `UnavailableOffline` Tested: - Unit tests passed - Redfish Service Validator passed ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/FabricAdapters/pcie_card0 ``` Results in ``` { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card0", "@odata.type": "#FabricAdapter.v1_4_0.FabricAdapter", ... "Status": { "Health": "OK", "State": "UnavailableOffline" } ... } ``` If the resource is functional and present but not available Change-Id: I045191029ba0f08d1eccb2bf4406cd4925289459 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19state: Add Available mapping for PCIeJustin Nguyen1-59/+5
- Utilize getResourceState and getResourceHealth utility function for PCIe Status.State and Status.Health - Map `Available` to Redfish `UnavailableOffline` for resources that are present but unavailable Tested: - Unit tests passed - Redfish Service Validator - Request ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/PCIeDevices/pcie_card12 ``` - Results in ``` { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card12", "@odata.type": "#PCIeDevice.v1_19_0.PCIeDevice", "Id": "pcie_card12", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card12/PCIeFunctions" }, ... "Status": { "Health": "OK", "State": "UnavailableOffline" } } ``` Change-Id: I97c40b8800dcbd902a7eb5d9bc1902a738ddfd6b Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19state: Add Available mapping for FanJustin Nguyen1-57/+5
- Utilized resource util's getResourceState() and getResourceHealth() to get Status.State and Status.Health of the fan resource - Added state mapping for `Available` to Redfish `UnavailableOffline` Tested: - Unit tests passed - Redfish Service Validator passed - Response as expected: ``` curl -k -v https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0 ``` Results in ``` { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0", "@odata.type": "#Fan.v1_3_0.Fan", "Id": "fan0", "Location": { "PartLocation": { "ServiceLabel": "U78DA.N00.WZS003H-A0" } }, "Manufacturer": "Delta", "Model": "7B5F", "Name": "fan0", "PartNumber": "02YK323", "SerialNumber": "YL12JP1C1234", "SparePartNumber": "02YK323", "Status": { "Health": "OK", "State": "UnavailableOffline" } ``` Where the state can be `Enabled`, `UnavailableOffline`, or `Absent` Change-Id: I21b257c39735b2f3d519549aa52a8c6a0cc48ac9 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-19utils: Map Available to UnavailableOfflineJustin Nguyen3-0/+416
- State `Available` will be mapped to `UnavailableOffline` for Status.State for resources that are present but unavailable - Added a utility function to reduce code duplication for retrieving resource's Status.State (`getResourceState`) and Status.Health (`getResourceHealth`) Tested: - Compiles and builds - Unit tests pass Change-Id: I1164a9412cbd4e1ab8938366ffc7ea9c7fe58786 Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
2026-08-17Refactor fan_utils getFanPaths lambdaYuvakumar Selvamani1-16/+20
The getFanPaths function contained an inline lambda that triggered the long-lambda ast-grep rule, requiring an inline suppression (// ast-grep-ignore: long-lambda). This commit extracts the lambda into a separate afterGetFanPaths function and uses std::bind_front to handle the asynchronous callback. This aligns the code with the preferred bmcweb pattern for D-Bus callbacks, improves readability, and allows the removal of the static analysis suppression. Change-Id: Ibb72a939590077f1f8b4f19dfc5809d3411d0742 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-08-14redfish: thermal: Remove TODO, fix error msgShivraj Toravi1-2/+1
This commit makes two minor cleanups to the Thermal resource: 1. Removes an obsolete `TODO` comment regarding Chassis Redundancy information in the GET handler. The redundancy data is already being correctly populated for Thermal resources via the `populateFanRedundancy()` function called within `sensors.hpp`. 2. Fixes a copy-paste error in the PATCH handler. If an empty payload was provided, the `resourceNotFound` message incorrectly referenced "Voltages" (which belongs to the Power schema) instead of "Fans". Change-Id: Icb35f1e85fe56895dcc47c6241a556da3a3238d9 Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-08-12ethernet: Expose FullDuplex property on RedfishRashid MP1-0/+11
Read FullDuplex from D-Bus and expose it in the Redfish EthernetInterface GET response. Tested: Get /redfish/v1/Managers/bmc/EthernetInterfaces/eth0 { "@odata.id": "/redfish/v1/Managers/bmc/EthernetInterfaces/eth0", "@odata.type": "#EthernetInterface.v1_9_0.EthernetInterface", "DHCPv4": { "DHCPEnabled": true, "UseDNSServers": true, "UseDomainName": true, "UseNTPServers": true }, "DHCPv6": { "OperatingMode": "Enabled", "UseDNSServers": true, "UseDomainName": true, "UseNTPServers": true }, "Description": "Management Network Interface", "EthernetInterfaceType": "Physical", "FQDN": "evb-ast2600", "FullDuplex": true, "HostName": "evb-ast2600", "IPv4Addresses": [ { "Address": "x.x.x.x", "AddressOrigin": "DHCP", "Gateway": "x.x.x.x", "SubnetMask": "255.255.255.0" } ], "IPv4StaticAddresses": [], "IPv6AddressPolicyTable": [], "IPv6Addresses": [ { "Address": "fe80::xxxx:xxxx:xxxx:xxxx", "AddressOrigin": "LinkLocal", "PrefixLength": 64 } ], "IPv6DefaultGateway": "0:0:0:0:0:0:0:0", "IPv6StaticAddresses": [], "IPv6StaticDefaultGateways": [], "Id": "eth0", "InterfaceEnabled": true, "LinkStatus": "LinkUp", "MACAddress": "xx:xx:xx:xx:xx:xx", "MTUSize": 1500, "Name": "Manager Ethernet Interface", "NameServers": [ "x.x.x.x" ], "SpeedMbps": 1000, "StatelessAddressAutoConfig": { "IPv6AutoConfigEnabled": true }, "StaticNameServers": [], "Status": { "State": "Enabled" } - Redfish Service Validator v3.1.6 run against tree: /redfish/v1/Managers/bmc/EthernetInterfaces PASS: 199, WARN: 0, FAIL: 0, NOT TESTED: 98 Change-Id: I3892a75b6a023fcd435f06074011e5a199d11c08 Signed-off-by: Rashid MP <rashidmp@ami.com>
2026-08-11Use enums for State and Health propertiesVinothkumar Shanmugavel5-26/+28
Several utility functions return State and Health values as std::string literals, which lacks compile-time type safety. This can lead to typos or invalid values that are only caught at runtime. Convert these functions to return resource::State and resource::Health enums instead. These enums are already defined in resource.hpp with NLOHMANN_JSON_SERIALIZE_ENUM mappings and are used extensively throughout the codebase. The enums automatically serialize to the same JSON strings, so there is no functional change. This provides compile-time type checking. Tested: - No functional change. - Verified State and Health properties serialize to identical JSON values. - Redfish Service Validator: PASS: 5788, WARN: 353, FAIL: 0, NOT TESTED: 4878 Change-Id: I590fc3dddac6f126c26814b549d2fea961409170 Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
2026-08-11redfish-core: Refactor ThermalMetrics lambdaShivraj Toravi1-13/+16
The handleThermalMetricsHead function contained an inline lambda that triggered the long-lambda ast-grep rule, requiring an inline suppression (// ast-grep-ignore: long-lambda). This commit extracts the lambda into a separate doThermalMetricsHead function and uses std::bind_front to handle the asynchronous callback. This aligns the code with the preferred bmcweb pattern for D-Bus callbacks, improves readability, and allows the removal of the static analysis suppression. Change-Id: I656e9d03e0780ac252d8778c825c12def9eac89e Signed-off-by: Shivraj Toravi <shivrajnt@ami.com>
2026-08-11snmp: Handle duplicate client creationVijaysankar Ravi1-0/+10
afterSnmpClientCreate() had no handler for ObjectAlreadyExists from the D-Bus Network.Client.Create method. When phosphor-snmp detected a duplicate SNMP client (same address and port), it threw ObjectAlreadyExists (errno EEXIST). Since EEXIST != EBADR, the existing fallthrough logic incorrectly returned PropertyValueOutOfRange with "SNMPv2c"/"Protocol" instead of reporting the actual cause. Add an explicit check for ObjectAlreadyExists before the EBADR check and map it to the correct Redfish response (resourceAlreadyExists). Related: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/90890 https://gerrit.openbmc.org/c/openbmc/phosphor-snmp/+/92218 Change-Id: Ia038795366bf7bf6acf9adcd09ae24d4c56e7172 Signed-off-by: Vijaysankar Ravi <vijaysankarr@ami.com>
2026-08-06redfish-core:multi-host: no link to log servicesAlexander Hansen1-2/+9
redfish-validator complained that there was a link in ComputerSystem resource which is 404, the Log Services. ``` /redfish/v1/Systems/Tyan_S8030_Baseboard Warnings Warning: Schema not found for HostedStorageServices.HostedStorageServices Errors Entity Get Error: GET of resource LogServices at URI /redfish/v1/Systems/Tyan_S8030_Baseboard/LogServices returned HTTP error. Check URI. Property Validation Error: LogServices /redfish/v1/Systems/Tyan_S8030_Baseboard/LogServices Errors Get URI Error: URI did not return resource /redfish/v1/Systems/Tyan_S8030_Baseboard/LogServices ``` Tested: on Tyan S8030 set `-Dexperimental-redfish-multi-computer-system=enabled`. Before patching, there is a link to nonexistent LogServices [1] `"/redfish/v1/Systems/Tyan_S8030_Baseboard/LogServices"`: ``` curl --insecure --user root:root https://${bmc}/redfish/v1/Systems/Tyan_S8030_Baseboard { "@odata.id": "/redfish/v1/Systems/Tyan_S8030_Baseboard", "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/Tyan_S8030_Baseboard/ResetActionInfo", "target": "/redfish/v1/Systems/Tyan_S8030_Baseboard/Actions/ComputerSystem.Reset" } }, "Boot": { "AutomaticRetryConfig": "RetryAttempts", "AutomaticRetryConfig@Redfish.AllowableValues": [ "Disabled", "RetryAttempts" ], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideMode@Redfish.AllowableValues": [ "Legacy", "UEFI" ], "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup", "Usb" ], "StopBootOnFault": "Never", "TrustedModuleRequiredToBoot": "Disabled" }, "Description": "Computer System", "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true }, "HostWatchdogTimer": { "FunctionEnabled": false, "Status": { "State": "Enabled" }, "TimeoutAction": "PowerCycle" }, "Id": "Tyan_S8030_Baseboard", "LastResetTime": "2026-01-26T02:23:22+00:00", "Links": { "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "LocationIndicatorActive": false, "LogServices": { "@odata.id": "/redfish/v1/Systems/Tyan_S8030_Baseboard/LogServices" }, "MemorySummary": { "TotalSystemMemoryGiB": 0.0 }, "Name": "Tyan_S8030_Baseboard", "PowerRestorePolicy": "AlwaysOff", "PowerState": "Off", "ProcessorSummary": { "Count": 0 }, "SerialConsole": { "IPMI": { "ServiceEnabled": true }, "MaxConcurrentSessions": 15, "SSH": { "HotKeySequenceDisplay": "Press ~. to exit console", "Port": 2200, "ServiceEnabled": true } }, "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical" } ``` After patching, the invalid link is gone: ``` curl --insecure --user root:root https://${bmc}/redfish/v1/Systems/Tyan_S8030_Baseboard { "@odata.id": "/redfish/v1/Systems/Tyan_S8030_Baseboard", "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/Tyan_S8030_Baseboard/ResetActionInfo", "target": "/redfish/v1/Systems/Tyan_S8030_Baseboard/Actions/ComputerSystem.Reset" } }, "Boot": { "AutomaticRetryConfig": "RetryAttempts", "AutomaticRetryConfig@Redfish.AllowableValues": [ "Disabled", "RetryAttempts" ], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideMode@Redfish.AllowableValues": [ "Legacy", "UEFI" ], "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup", "Usb" ], "StopBootOnFault": "Never", "TrustedModuleRequiredToBoot": "Disabled" }, "Description": "Computer System", "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true }, "HostWatchdogTimer": { "FunctionEnabled": false, "Status": { "State": "Enabled" }, "TimeoutAction": "PowerCycle" }, "Id": "Tyan_S8030_Baseboard", "LastResetTime": "2026-01-26T02:23:22+00:00", "Links": { "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "LocationIndicatorActive": false, "MemorySummary": { "TotalSystemMemoryGiB": 0.0 }, "Name": "Tyan_S8030_Baseboard", "PowerRestorePolicy": "AlwaysOff", "PowerState": "Off", "ProcessorSummary": { "Count": 0 }, "SerialConsole": { "IPMI": { "ServiceEnabled": true }, "MaxConcurrentSessions": 15, "SSH": { "HotKeySequenceDisplay": "Press ~. to exit console", "Port": 2200, "ServiceEnabled": true } }, "Status": { "Health": "OK", "State": "Disabled" }, "SystemType": "Physical" } ``` References: [1] https://github.com/openbmc/bmcweb/blob/ac69e77ea938e8c2a5bd3dad258cdafd9d3182b7/redfish-core/lib/log_services.hpp#L910 Change-Id: I60d1e5f6e7d3f0c293c389f90b1d45203143c08c Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2026-08-06Fix Manager EventLog ClearLog Accept handlingRex Fu1-6/+0
The ClearLog action returns a JSON Redfish response, but it checks the Accept header for application/octet-stream. This causes requests with Accept: application/json to be marked as Bad Request. The handler does not return after setting the error status, so it still clears the log and returns a JSON success message. Remove the invalid check to return the correct status. Change-Id: Ica492e3185f970d39dd1655165ba623c5e7e29a4 Signed-off-by: Rex Fu <rex.fu@amd.com>
2026-08-06systems: Prevent empty UUID and SubModelVinothkumar Shanmugavel1-2/+2
The afterGetUUID and afterGetInventory handlers set UUID and SubModel properties without validating D-Bus returned values are non-empty. Per Redfish schema, UUID must be a valid RFC4122 identifier and empty strings are invalid. This adds empty string checks to prevent setting invalid property values in the Redfish response. When D-Bus returns empty strings for these properties (which can occur during early boot or with certain hardware configurations), they will now be omitted from the response rather than returned as empty values. Tested: - Verified properties are omitted when D-Bus returns empty string - Verified properties are correctly set when valid values present - No functional change when valid non-empty values are returned Change-Id: I80b4f8588cb065d25097f4fd3712987adef820c0 Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
2026-08-05OpenBmc org BiosResetOliver Brewka1-1/+2
Currently the BiosReset action is only supported on openpower platforms, as the implementation calls into an org.openpower owned dbus service. As part of this patch series [1], a new cmos-reset service is added to platform-init that also should be requested via said Redfish action, independent of the platform. To unify, call into a xyz.openbmc_project owned service. Accordingly, adpapt the busname in openpower-pnor-code-mgmt [2]. Tested: In order to test the openpower case, built a romulus image based on this patch and the patch in openpower-pnor-code-mgmt. Made a POST request and checked the journal that the request triggered the service. Limitation of this testing is that the dbus call errors out as expected with "Failed to reset bios: No route to host". I don't have access to an openpower platform, but if real hw testing is needed I could ask around on discord if someone could run the code on their machine. All testing for the patch series in platform-init has already been tested through Redfish. [1] https://gerrit.openbmc.org/c/openbmc/platform-init/+/88369 [2] https://gerrit.openbmc.org/c/openbmc/openpower-pnor-code-mgmt/+/88228 Change-Id: I5a52f138848063814e08b152756b8d5d8c31e267 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-08-05Install FabricGunnar Mills2-0/+2
For some reason, validator run at the recent bmcweb bump[1] wasn't able to download the schemas and hit: ``` /redfish/v1/Fabrics FabricCollection Pass: 5 Failure: 1 Show Results Show Payload NameValueResult Schema Error: Unable to locate the schema definition for the 'Fabric.Fabric' type.FAILMembers@odata.count1PASSMembers@odata.nextLink[Not Present]SKIPNameFabric CollectionPASSOem[Not Present]SKIP ``` Fabric was added at 3132dacead0. Long term it would be nice to get rid of this only install certain schemas.. Separate discussion. [1]: https://gerrit.openbmc.org/c/openbmc/openbmc/+/93063 Commands ran: cd redfish-core/schema/dmtf/json-schema-installed ln -fs ../json-schema/Fabric.v1_4_0.json Fabricv1_4_0.json cd redfish-core/schema/dmtf/installed ln -fs ../csdl/Fabric_v1.xml Fabric_v1.xml Tested: Inspection only. Change-Id: I8a36b978b7228238f7011beefd7d03f24a7839b1 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2026-08-04AccountService: fix PATCH error-path response handlingSandeep Akant Patil1-1/+11
Added early-return checks in AccountService PATCH handling to avoid continuing processing after an error response is already set. Earlier, when no auth-method fields were present in the request, the auth patch flow could still contribute success semantics. In error scenarios, this could produce mixed outcomes in one response (for example, Success with PropertyNotWritable for MaxPasswordLength) and could also cause PATCH requests for valid writable properties to appear to hang or time out after an earlier failure path. With this change: - Auth-method processing returns immediately when no auth fields are present. - HTTP 200 is set only when status is still OK. - Processing stops immediately after validation/helper errors. - Read-only property updates such as MaxPasswordLength return only PropertyNotWritable, as expected. No Redfish schema or property additions in this commit. Behavior-only change in AccountService PATCH handling. Tested: - EVB2600 PATCH /redfish/v1/AccountService with {"MaxPasswordLength":30} response contains only PropertyNotWritable. - EVB2600 PATCH with valid writable properties, for example: {"AccountLockoutDuration":301,"AccountLockoutThreshold":32} request completes normally without hang/abrupt client close. - Redfish-Service-Validator: PASS. Change-Id: Ie6e66c432d38ef29f4aadd70067440d15a93a95f Signed-off-by: Sandeep Akant Patil <sandeepap@ami.com>
2026-08-01Implement SubProcessors core for processorGeorge Liu2-0/+173
The SubProcessors core is a collection under the processor schema. The association objects, (containing, contained_by), are used to link the processor core. The association between processor and core have been documented in phosphor-dbus-interfaces [1] [1] https://github.com/openbmc/phosphor-dbus-interfaces/commit/8c79b1dc0270d01c0b713a345c8ec39533c542e4 Tested: Redfish Validator Passed ``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0 { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "core0", "Name": "SubProcessor", "ProcessorType": "Core" } ``` Verified that below return a link header ``` - GET /redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0 - HEAD /redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0 ``` Change-Id: I8cee9909ce20fc0bfdd56fb4fc992163546be180 Signed-off-by: George Liu <liuxiwei@inspur.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2026-08-01Implement SubProcessors for processor collectionGeorge Liu5-0/+200
The SubProcessors is a collection under the processor collection schema. The association objects, (containing, contained_by), are used to link the processor. The association between processor and core have been documented in phosphor-dbus-interfaces [1] [1] https://github.com/openbmc/phosphor-dbus-interfaces/commit/8c79b1dc0270d01c0b713a345c8ec39533c542e4 Tested: - GET cpu and cpu subprocessors ``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0 { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0", "@odata.type": "#Processor.v1_18_0.Processor", "Id": "cpu0", ... "SubProcessors": { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0/SubProcessors" }, ... } ``` ``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0/SubProcessors { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0/SubProcessors", "@odata.type": "#ProcessorCollection.ProcessorCollection", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0" }, { "@odata.id": "/redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core1" }, ... ], "Members@odata.count": 4, "Name": "SubProcessor Collection" } ``` - Verified that below return a link header - GET /redfish/v1/Systems/system/Processors/cpu0/SubProcessors - HEAD /redfish/v1/Systems/system/Processors/cpu0/SubProcessors - Redfish Validator Passed Change-Id: If155b97b0c782d82541c00ecf5ee70cb0180f71f Signed-off-by: George Liu <liuxiwei@ieisystem.com> Signed-off-by: Nikhil Namjoshi <nikhilnamjoshi@google.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2026-08-01clang-format: update latest spec and reformat with clang-21Patrick Williams1-0/+1
Copy the latest format file from the docs repository and apply using clang-format-21. See I795e88ada8e676c242b5a18888ce9c08afdedc93 for clang-21 enablement. Change-Id: I08e1dad55a6dd1bc6b56fc47d2ddef7c9bbebdd7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2026-07-31OWNERS: prune inactive membersPatrick Williams1-25/+0
Enforce the policy[1] which requires that subproject maintainers are only list developers who have been active in the project. Removed developers that have not been active per that policy from OWNERS. [1]: https://github.com/openbmc/docs/commit/1b531cd0d861d9c1d9ff81fb782e43f15c3c48d9 Change-Id: I752a375a9f080ce4809387405c7ac8b245825145 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
2026-07-30Fix swapped args in propertyValueNotInListGunnar Mills1-2/+2
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/92936 fixed the missing return and corrected the property name spelling from 'HttpBasicAuth' to 'HTTPBasicAuth' but incorrectly swapped the arguments to propertyValueNotInList. The signature is: propertyValueNotInList(res, arg1=<value>, arg2=<property name>) Per the Redfish Base registry: Message: "The value '%1' for the property %2 is not in the list of acceptable values." ArgDescriptions: - %1: The value provided for the property. - %2: The name of the property. https://redfish.dmtf.org/registries/Base.1.23.0.json Tested: Inspection only. Change-Id: I5bbf80291abe1150fb6bd83722c6bcf9152b8472 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>