summaryrefslogtreecommitdiff
path: root/redfish-core
AgeCommit message (Collapse)AuthorFilesLines
18 hoursstorage: use PrettyName for Drive Name fieldHEADmasterAKash A0071-1/+3
The Redfish Name field for drives currently defaults to the D-Bus object path filename (e.g. "drive0"). The D-Bus xyz.openbmc_project.Inventory.Item interface provides a PrettyName property for human-readable labels (e.g. "NVMe Drive Bay 0"). Map PrettyName to the Redfish Name field when available, falling back to the object ID when PrettyName is absent or empty. Tested: - Built bmcweb with meson/ninja successfully - Verified PrettyName appears in drive response when available - Falls back to default name when PrettyName is empty Relates-to: https://github.com/openbmc/bmcweb/issues/204 Change-Id: I90510d8633392c4fcadcee3bb94b87fbcf2ae006 Signed-off-by: Akash Arunkumar <mirrorghost007@gmail.com> Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
18 hoursredfish: Use PrettyName for hardware resourcesJustin Nguyen9-9/+31
Hardware resources are using a generic Redfish Name such as "PCIe Device." Pass PrettyName instead for a more descriptive and human-readable Name with it defaulting to what the resource was originally This preserves existing fallbacks such that if PrettyName is not present, nothing changes Tested: - Unit tests pass - Redfish Service Validator passes - Request to resources show `Name` field as PrettyName value otherwise defaulting to resource's original `Name` - For example ``` curl -k -v https://${bmc}/redfish/v1/Systems/system/PCIeDevices/pcie_card0 ``` Results in ``` { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card0", "@odata.type": "#PCIeDevice.v1_19_0.PCIeDevice", "Id": "pcie_card0", ... "Name": "PCIe4 x16 or PCIe5 x8 adapter", ... } ``` and defaults to ``` "Name": "PCIe Device", ``` Change-Id: I95ef77027311d18eb9f85295f359b2d9fbc31b2f Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
18 hoursutils: add PrettyName utility functionAkash Arunkumar1-0/+93
Create a reusable utility function getPrettyName() in utils/name_utils.hpp that can retrieve the PrettyName property from the D-Bus xyz.openbmc_project.Inventory.Item interface. The function accepts a JSON pointer parameter, allowing it to set the PrettyName at any location in the response (e.g. within arrays or nested objects). This makes it reusable across multiple components (Drives, Processors, Memory, Chassis, etc.). Relates-to: https://github.com/openbmc/bmcweb/issues/204 Tested: - Built bmcweb with meson/ninja successfully - Tested with https://gerrit.openbmc.org/c/openbmc/bmcweb/+/90364 and verified that PrettyName appears in the response - Falls back to default name when PrettyName is empty Change-Id: Iebd31b523797152b0e8e7ea8852f86b292fb5f55 Signed-off-by: Akash Arunkumar <mirrorghost007@gmail.com> Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
24 hoursredfish-core: Refactor getSnmpTrapClient lambdaYuvakumar Selvamani1-38/+40
Extract the long D-Bus GetManagedObjects callback lambda in getSnmpTrapClient() into a named function, afterGetSnmpTrapClient(), per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Call it via dbus::utility::getManagedObjects() and std::bind_front(), matching the pattern used by other GetManagedObjects call sites in the codebase. afterGetSnmpTrapClient() takes the GetManagedObjects result by const reference (const dbus::utility::ManagedObjectType& resp), since the callback only reads it. Tested on AST2600 SoC (live D-Bus tested, phosphor-snmp installed). - `GET /redfish/v1/EventService/Subscriptions/snmpbogus` (no matching D-Bus object) Expected: HTTP 404 Base.1.19.ResourceNotFound Actual: HTTP 404 Base.1.19.ResourceNotFound - `POST /redfish/v1/EventService/Subscriptions` with `{"Destination": "snmp://192.168.1.77:162", "Protocol": "SNMPv2c", "SubscriptionType": "SNMPTrap"}`, creating a real SNMP trap client on D-Bus (id snmp1) Expected: HTTP 201 Base.1.19.Created Actual: HTTP 201 Base.1.19.Created - `GET /redfish/v1/EventService/Subscriptions/snmp1` Expected: HTTP 200 with Destination matching the created client Actual: HTTP 200, "Destination": "snmp://192.168.1.77:162" - confirms afterGetSnmpTrapClient() correctly walks the real GetManagedObjects result (now via const&) and matches the id. - Redfish Service Validator: 5840 Pass / 353 Warn / 0 Fail Change-Id: I661d147f4639b05b87b586d3b1322a9ad3912958 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
6 dayseventservice: Return Redfish 404 on PATCHJoel Pullokaran Jesin1-2/+2
Return a Redfish ResourceNotFound error for PATCH requests to an EventDestination that does not exist. Before this change, PATCH on a missing subscription returned only HTTP 404 with no Redfish error payload. That left clients without the standard error body used to identify the failing resource and the expected message registry code. After this change, PATCH /redfish/v1/EventService/Subscriptions/{Id}/ returns HTTP 404 with Base.1.19.ResourceNotFound when the requested EventDestination is not present. Tested: PATCH /redfish/v1/EventService/Subscriptions/does-not-exist/ with {} returns HTTP 404 and Base.1.19.ResourceNotFound. Redfish Service Validator for /redfish/v1/EventService/Subscriptions/ reports PASS 5, WARN 0, FAIL 0, SKIP 5. Change-Id: I84eeabc91a3b75e8a47173b99217b128506f5e8a Signed-off-by: Joel Pullokaran Jesin <joelpj@ami.com>
6 daysUse enum for watchdog timeout action propertyVinothkumar Shanmugavel1-10/+13
The dbusToRfWatchdogAction() function returns the watchdog timeout action 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 computer_system::WatchdogTimeoutActions enum instead. This enum is already defined in computer_system.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. Tested: - Verified HostWatchdogTimer TimeoutAction property serializes to identical JSON values. - RSV: PASS: 5803, WARN: 353, FAIL: 0, NOT TESTED: 4894 Change-Id: I9aa667796a5bda7eddabd7d37a211d304b39796f Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
7 daysredfish-core: Refactor TelemetryService lambdaYuvakumar Selvamani1-52/+57
Extract the long D-Bus GetAllProperties callback lambda in handleTelemetryServiceGet() into a named function, afterGetTelemetryServiceProperties(), bound via std::bind_front(), per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Also updates the DBus error log message from "respHandler DBus error {}" to "afterGetTelemetryServiceProperties DBus error {}" to include the function name, per review feedback. Tested: - Verified GET /redfish/v1/TelemetryService returns identical values (MaxReports, MinCollectionInterval, Status, SupportedCollectionFunctions) to the pre-refactor lambda, with a live phosphor-telemetry backend. - Redfish Service Validator passed with a real MetricReportDefinition and MetricReport present: 0 Fail on all TelemetryService endpoints (5451 Pass / 353 Warn / 9 Fail overall; the 9 failures are pre-existing, unrelated Managers/bmc errors). Change-Id: I97733e7bedf5868625f32f2008c39b9a9b69abdd Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
10 daysUse the privilege entry that matches the routeBill Chan5-6/+6
Five routes are registered with a privilege registry entry that names a different resource, or a different method, than the route serves: - certificate_service: the Truststore certificate collection GET uses getCertificate. The POST on the same URL already uses postCertificateCollection, and the LDAP and HTTPS certificate collections use getCertificateCollection. - storage_chassis: the chassis drive GET uses getChassis, although the handler serves a Drive resource and the collection above it uses getDriveCollection. - redfish_v1: the JsonSchemas collection and a single JsonSchemaFile hold each other's entry. - metric_report_definition and aggregation_service: two HEAD routes use the get* entry where the head* entry exists. Every one of these pairs resolves to the same privilege set today, so no client sees a change. They are corrected so the routes stay right if the registry ever distinguishes a pair, and so the next reader can trust the entry name. Tested: Redfish Service Validator against a cypress BMC image carrying this change, and again against one without it: both pass, with no failures and identical warning and error counts. The routes this touches were traversed in both runs, bar AggregationSources, which that build does not register. Verified that each replacement entry exists in redfish-core/include/registries/privilege_registry.hpp, that the resource type matches what the handler serves, for example storage_chassis emits #Drive.v1_7_0.Drive, and that every changed pair resolves to the same privilege set as before: getCertificate and getCertificateCollection are both privilegeSetConfigureManager, while the JsonSchemaFile pair and both HEAD pairs are privilegeSetLogin. No client-visible behavior changes as a result. Change-Id: Ib06a2f0e0a43dcfe1fbc7127f6345e40c5202c5f Signed-off-by: Bill Chan <bill_chan@jabil.com>
10 daysReport rejected action values with ValueNotInListBill Chan3-8/+10
Manager.Reset, Manager.ResetToDefaults, Chassis.Reset and UpdateService.SimpleUpdate reject an unsupported parameter value with Base.1.19.ActionParameterNotSupported. That message reads "The parameter %1 for the action %2 is not supported on the target resource", and its resolution tells the client to remove the parameter and resubmit. ResetType and TransferProtocol are required parameters of those actions, so the client cannot act on that advice. The arguments were also passed in the wrong order, putting the submitted value where the parameter name belongs. All four parameters are published enumerations: ResetType through the ResetActionInfo resources and the ResetType@Redfish.AllowableValues annotation, TransferProtocol through TransferProtocol@Redfish.AllowableValues. A value outside those lists is Base.1.19.ActionParameterValueNotInList, which names the parameter, the value and the action, and tells the client to choose a supported value. This is the same correction commit 191526da made for ComputerSystem.Reset. The action argument carries the qualified action name, as it appears in the action's target URI and in the existing UpdateService.SimpleUpdate calls in update_service.hpp. Tested: Verified on a QEMU BMC, machine cypress, running a downstream OpenBMC build carrying this change. POST /redfish/v1/Managers/bmc/Actions/Manager.Reset with {"ResetType":"Nope"} returns HTTP 400 and Base.1.19.ActionParameterValueNotInList with MessageArgs ["Nope", "ResetType", "Manager.Reset"]. POST /redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults with the same body returns HTTP 400 and the same MessageId with MessageArgs ["Nope", "ResetType", "Manager.ResetToDefaults"]. POST /redfish/v1/Chassis/<id>/Actions/Chassis.Reset with the same body returns HTTP 400 and MessageArgs ["Nope", "ResetType", "Chassis.Reset"]. The UpdateService.SimpleUpdate site was not exercised: that build has redfish-allow-simple-update disabled, so the action is not registered. Change-Id: I2db0ddd1cec4d7efe512fe43d8ac7d85d112ab52 Signed-off-by: Bill Chan <bill_chan@jabil.com>
10 daysReport the property the request actually failed onBill Chan3-5/+6
Three error paths name a property or condition that has nothing to do with the failure, so a client cannot tell what to correct. - account_service: a RoleId that maps to no privilege reports PropertyValueNotInList for Locked with the value true. RoleId is the property that was rejected, and its submitted value is what the client needs to see. - systems: a PATCH of TrustedModuleRequiredToBoot on a system with no TPM.Policy object reports PropertyValueNotInList with the value "ComputerSystem", which is neither a submitted value nor an enumeration member. Nothing is wrong with the value; the property cannot be written on this system, which is PropertyNotWritable. - openbmc_managers: Direction is checked against the enumeration {Ceiling, Floor}, so a rejected value is PropertyValueNotInList, not PropertyValueTypeError. The arguments were also reversed, since PropertyValueTypeError takes the value first. Tested: Verified on a QEMU BMC, machine cypress, running a downstream OpenBMC build carrying this change. PATCH /redfish/v1/AccountService/Accounts/root with {"RoleId":"Bogus"} returns HTTP 400 and Base.1.19.PropertyValueNotInList with MessageArgs ["\"Bogus\"", "RoleId"], where the same request previously reported Locked with the value true. Not exercised on that build: the TrustedModuleRequiredToBoot site, because that platform has a TPM.Policy object so the empty-subtree branch never runs; and the OEM fan Direction site, because the machine exposes no PID or stepwise fan controllers to PATCH. Change-Id: I408456a7040f095b43a952532f761ec197c24146 Signed-off-by: Bill Chan <bill_chan@jabil.com>
12 daysRefactor eventlog_utils respHandler lambdasYuvakumar Selvamani1-42/+50
The dBusEventLogEntryDelete and dBusLogServiceActionsClear functions each contained an inline respHandler 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, afterDBusEventLogEntryDelete and afterDBusLogServiceActionsClear 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 on AST2600 SoC (with PACKAGECONFIG `redfish-dbus-log` enabled; disabled by default). - `DELETE .../EventLog/Entries/1` (real entry) Expected: HTTP 200 Base.1.19.Success, entry removed Actual: HTTP 200 Base.1.19.Success, entry removed - `DELETE .../EventLog/Entries/999` (nonexistent) Expected: HTTP 404 Base.1.19.ResourceNotFound Actual: HTTP 404 Base.1.19.ResourceNotFound - `POST .../EventLog/Actions/LogService.ClearLog` Expected: HTTP 200 Base.1.19.Success, all entries cleared Actual: HTTP 200 Base.1.19.Success, all entries cleared - RSV: 5845 Pass / 353 Warn / 0 Fail Change-Id: I323a0813fef4f04622a71f27258fe9b1930ec6cd Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
12 daysredfish-core: Refactor ThermalSubsystem HeadYuvakumar Selvamani1-14/+19
Extract the long respHandler lambda in handleThermalSubsystemCollectionHead() into a named function, doThermalSubsystemCollectionHead(), bound via std::bind_front(), matching the pattern used elsewhere in the file, per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Tested on AST2600 SoC: - `HEAD /redfish/v1/Chassis/<invalid-id>/ThermalSubsystem` Expected: HTTP 404 Base.1.19.ResourceNotFound Actual: HTTP 404 Base.1.19.ResourceNotFound - `HEAD /redfish/v1/Chassis/<valid-id>/ThermalSubsystem` Expected: HTTP 200 with Link: </redfish/v1/JsonSchemas/ThermalSubsystem/ThermalSubsystem.json> Actual: HTTP 200 with the identical Link header - confirms the extracted doThermalSubsystemCollectionHead() success branch - Redfish Service Validator: 5845 Pass / 353 Warn / 0 Fail Change-Id: I9ae5884bf207f79527bc83f1655a7cee9c0b88bb Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
13 daysredfish-core: Refactor AggregationSource lambdaYuvakumar Selvamani1-17/+20
Extract the long getSatelliteConfigs() callback lambda in handleAggregationSourcePatch() into a named function, afterGetSatelliteConfigsForPatch(), bound via std::bind_front(), per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Tested: - Sent PATCH /redfish/v1/AggregationService/AggregationSources/<id> for an AggregationSourceId that exists in Entity Manager sources and confirmed PropertyNotWritable is returned for UserName, same as before the refactor. - Sent PATCH for an AggregationSourceId that doesn't exist anywhere and confirmed ResourceNotFound is returned, same as before. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I995b97730b5a2b224f30e7afceb3e2c3c3c2e6ff Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
14 dayssubprocessor: Add Status.State/Health to coresGeorge Liu2-9/+78
Populate Redfish Status.Health and Status.State for processor core resources resource_utils::getResourceState() and getResourceHealth() are extended to accept MapperServiceMap and use the first service implementing the required interface. This avoids duplicate requests when multiple services advertise the same interface for a core object This commit also changes the iterator name in HEAD and GET path from `it` to `coreIt` for better readability as well as passing coreId by reference to avoid copies Tested: ``` curl -k -X GET https://${bmc}/redfish/v1/Systems/system/Processors/cpu0/SubProcessors/core0 { ... "Status": { "Health": "OK", "State": "Enabled" } } ``` - Where "State" can be "Present", "Available", "Enabled" - Redfish Validator Passed Change-Id: I5833541dceb9627b56b96e8235afcde78a09081f Signed-off-by: Myung Bae <myungbae@us.ibm.com> Signed-off-by: Justin Nguyen <justinnanguyen@gmail.com>
14 daysredfish-core: Refactor getDimmDataByService lambdaYuvakumar Selvamani1-13/+17
Extract the long D-Bus GetAllProperties callback lambda in getDimmDataByService() into a named function, afterGetDimmDataByService(), bound via std::bind_front(). This follows the <10-line lambda coding standard in docs/COMMON_ERRORS.md. Tested on a live platform against a real D-Bus Dimm object: - GET /redfish/v1/Systems/system/Memory/<id> returns all expected Memory properties (CapacityMiB, MemoryType, MemoryDeviceType, OperatingSpeedMhz, MemoryLocation, ProductionDate, etc.) correctly populated from the DBus GetAllProperties response. - Redfish Service Validator passed with 0 failures overall (5853 Pass / 353 Warn / 0 Fail), including 0 Fail on /redfish/v1/Systems/system/Memory and /redfish/v1/Systems/system/Memory/<id>. Change-Id: I3898dd21a7a55ac1f51c6aaf6bac298c6644f7e5 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-09-17Use enum for BootProgressTypes propertyVinothkumar Shanmugavel1-48/+51
The dbusToRfBootProgress() function returns boot progress states as std::string literals, lacking compile-time type safety. This can lead to typos or invalid values that are only caught at runtime. Convert this function to return computer_system::BootProgressTypes enum instead. This enum is already defined in generated/enums/computer_system.hpp with NLOHMANN_JSON_SERIALIZE_ENUM mapping and provides proper type checking. Tested: - Verified BootProgress LastState property serializes to identical JSON values. - Redfish Service Validator: PASS: 5923, WARN: 356, FAIL: 0, NOT TESTED: 4594 Change-Id: Ida8d4c71c6cea02193b037a3dcc9670feeb1eced Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
2026-09-17Report JSON values in errors, not quoted stringsBill Chan3-5/+6
The value argument of PropertyValueTypeError, PropertyValueNotInList and PropertyValueIncorrect is a nlohmann::json that the message formatter dumps. Passing a string literal therefore renders the JSON string "null", "true" or "false" rather than the JSON null, true or false the client actually sent, so the error text does not match the request body. Pass the JSON value instead: - account_service: JSON null for a deleted RemoteRoleMapping entry, and the boolean *params.locked for a rejected Locked request - network_protocol: JSON null for a deleted NTP server - ethernet: JSON false for VLAN/VLANEnable Tested: Verified on a QEMU BMC, machine cypress, running a downstream OpenBMC build carrying this change. Each value below now renders as the JSON literal the client sent rather than as a quoted string. PATCH /redfish/v1/AccountService with {"LDAP":{"RemoteRoleMapping":[null]}} reports Base.1.19.PropertyValueTypeError with MessageArgs ["null", "RemoteRoleMapping/0"]. PATCH /redfish/v1/AccountService/Accounts/root with {"Locked":true} returns HTTP 400 and Base.1.19.PropertyValueNotInList with MessageArgs ["true", "Locked"]. PATCH /redfish/v1/Managers/bmc/NetworkProtocol with {"NTP":{"NTPServers":[null]}} returns HTTP 400 and Base.1.19.PropertyValueNotInList with MessageArgs ["null", "NTP/NTPServers/0"]. POST /redfish/v1/Managers/bmc/EthernetInterfaces with a VLAN whose VLANEnable is false returns HTTP 400 and Base.1.19.PropertyValueIncorrect with MessageArgs ["VLAN/VLANEnable", "false"]. For contrast, on the same build a genuine string value still renders quoted: a rejected RoleId reports ["\"Bogus\"", "RoleId"]. Change-Id: I8b747a17eacb77687f526d4603876446287974b2 Signed-off-by: Bill Chan <bill_chan@jabil.com>
2026-09-17Fix argument order in Redfish error messagesBill Chan6-12/+13
Several error message calls pass their arguments in the order the message text reads rather than the order the function declares, so the rendered message names the value as the property, or names the resource instance as its type. The declarations in redfish-core/include/error_messages.hpp are: - propertyValueFormatError(value, property) - propertyValueIncorrect(property, value) - resourceNotFound(type, name) - actionParameterNotSupported(parameter, action) Swap the arguments at the affected call sites: - certificate_service: ChallengePassword is the parameter of the GenerateCSR action, matching the five sibling calls in the file - processor: report the rejected URI as the value of AppliedOperatingConfig - aggregation_service: report HostName as the property and the submitted hostname as the value - metric_report_definition: report the MetricProperties index as the property and the offending URI as the value - hypervisor_system: the missing resource is an ActionInfo named ResetActionInfo, not a resource of type hypervisor - sensors: report the type Sensor and the requested sensor as the name Tested: Verified on a QEMU BMC, machine cypress, running a downstream OpenBMC build carrying this change. GET /redfish/v1/Chassis/<id>/Sensors/nosuchsensor returns HTTP 404 and Base.1.19.ResourceNotFound with MessageArgs ["Sensor", "nosuchsensor"], naming the resource type first and the requested sensor second. The second lookup path, GET .../Sensors/temperature_NoSuchSensor, returns the same message with ["Sensor", "temperature_NoSuchSensor"]. PATCH /redfish/v1/Systems/system/Processors/P0 with {"AppliedOperatingConfig":{"@odata.id":"not a uri"}} returns HTTP 400 and Base.1.19.PropertyValueFormatError with MessageArgs ["\"not a uri\"", "AppliedOperatingConfig"]. POST /redfish/v1/TelemetryService/MetricReportDefinitions with a MetricProperties entry of /redfish/v1/Managers/bmc returns HTTP 400 and Base.1.19.PropertyValueIncorrect with MessageArgs ["MetricProperties/0", "\"/redfish/v1/Managers/bmc\""]. PATCH of a MetricReportDefinition created beforehand with a valid MetricProperties entry, carrying that same /redfish/v1/Managers/bmc URI, returns HTTP 400 and the same Base.1.19.PropertyValueIncorrect with MessageArgs ["MetricProperties/0", "\"/redfish/v1/Managers/bmc\""], covering the second call site. A CertificateService.GenerateCSR request carrying a ChallengePassword returns HTTP 400 and Base.1.19.ActionParameterNotSupported with MessageArgs ["ChallengePassword", "GenerateCSR"]. Redfish Service Validator 3.1.3 passing against the same QEMU BMC: PASS 21948, WARN 789, FAIL 0. docs/TESTING.md asks for that run on real hardware, where the resource tree is more complete; no hardware was available for this change, so the run and its tree are QEMU's. Not exercised on that build: the two AggregationSource sites, since redfish-aggregation is disabled there, and the hypervisor ResetActionInfo site, since hypervisor-computer-system is disabled. Change-Id: Ia0b405bc7fc5993fe9b9ac81735b9e605f3eee01 Signed-off-by: Bill Chan <bill_chan@jabil.com>
2026-09-16Use enums for boot override propertiesVinothkumar Shanmugavel1-21/+22
The dbusToRfBootType() and dbusToRfBootMode() functions return boot configuration 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 computer_system::BootSourceOverrideMode and computer_system::BootSource enums instead. These enums are already defined in generated/enums/computer_system.hpp with NLOHMANN_JSON_SERIALIZE_ENUM mappings and provide proper type checking. For unrecognized D-Bus values, omit the corresponding optional boot property instead of returning internalError. This allows clients to receive the remaining ComputerSystem properties. Tested: - Verified BootSourceOverrideMode property serializes to identical JSON values. - Verified BootSourceOverrideTarget property serializes to identical JSON values. - Redfish Service Validator: PASS: 5923, WARN: 356, FAIL: 0, NOT TESTED: 4594 Change-Id: I4ee40e94ccaa3f925ea3aadb5b70ba3fe03124e6 Signed-off-by: Vinothkumar Shanmugavel <vinothkumars@ami.com>
2026-09-15led: refactor setSystemLocationIndicatorActiveEric Liu1-13/+19
The callback is over the 10 line lambda limit and carried an ast-grep-ignore comment. Move it into afterSetLocationIndicatorBlink(). std::bind_front() does not work with sdbusplus::asio::setProperty, so a short lambda forwards to it. Tested: unit-test CI passes. No functional change. Change-Id: I86c37af5c15cb153149c3b9fefb6ac97345f3c19 Signed-off-by: Eric Liu <liuer@nvidia.com>
2026-09-15processor: refactor OperatingConfig lambdasEric Liu1-163/+170
The three D-Bus response callbacks in this file are over the 10 line lambda limit and carried an ast-grep-ignore comment. Move them into the named functions afterGetOperatingConfigData(), afterGetOperatingConfigCollection() and afterGetOperatingConfig(). Tested: unit-test CI passes. No functional change. Change-Id: I99ea43da39ff4a3cdcfc84b09e2bedb7cbb00e78 Signed-off-by: Eric Liu <liuer@nvidia.com>
2026-09-15led: refactor getSystemLocationIndicatorActiveEric Liu1-42/+49
Both callbacks are over the 10 line lambda limit and carried an ast-grep-ignore comment. Move them into afterGetLocationIndicatorBlink() and afterGetLocationIndicatorEnclosure(), named after the LED group each one reads. Tested: unit-test CI passes. No functional change. Change-Id: Ie23b20cc774b84188f2c887decad6b59e7f790aa Signed-off-by: Eric Liu <liuer@nvidia.com>
2026-09-11redfish-core: Refactor StorageController lambdaYuvakumar Selvamani1-15/+20
Extract the long D-Bus GetProperty callback lambda in populateStorageController() into a named function, afterGetStorageControllerPresent(), bound via std::bind_front(), per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Tested: - No functional change. - Build successfully compiled. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: I0c93e8b2e2381a14cc7d8a7299cd28af9e086b28 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-09-11redfish-core: Refactor PowerSubsystem HeadYuvakumar Selvamani1-14/+18
Extract the long respHandler lambda in handlePowerSubsystemCollectionHead() into a named function, doPowerSubsystemCollectionHead(), bound via std::bind_front(), matching the pattern used elsewhere in the file, per the <10 line lambda coding standard in docs/COMMON_ERRORS.md. Tested: - No functional change. - Build successfully compiled. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: Ieabcf123ae659a60aa4d42aaab86e8dd087e0b92 Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-09-11redfish-core: Refactor EnvironmentMetrics HeadYuvakumar Selvamani1-16/+19
Extract the long respHandler lambda in handleEnvironmentMetricsHead() into a named function, doEnvironmentMetricsHead(), bound via std::bind_front(). This matches the pattern already used by handleEnvironmentMetricsGet() and follows the <10-line lambda coding standard in docs/COMMON_ERRORS.md. Tested: - No functional change. - Build successfully compiled. - Redfish Service Validator passed with no new errors or warnings introduced. Change-Id: Iba1758bb21d112701aa6bf59b3ce7f2127ce702a Signed-off-by: Yuvakumar Selvamani <yuvakumars@ami.com>
2026-09-09Consistent naming in dump log serviceOliver Brewka2-53/+61
Analogous to other log services, rename dump log service handler functions to refer to the parent collection they handle the resource for. Tested: Code compiles. Change-Id: I4128cee31ed6841096a6e578595298aa46e28e2f Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-09-09Refactor remaining lambdas in dump utilityOliver Brewka1-221/+231
Remove all remaining lambdas violating the lambda length rule. Tested: Code compiles. 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/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: 26, Warn: 0, Fail: 0, Skip: 58 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/1... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 Validating /redfish/v1/Managers/bmc/LogServices/Dump/Entries/2... - Pass: 9, Warn: 0, Fail: 0, Skip: 27 +--------------+--------------+--------------+--------------+ | PASS | WARN | FAIL | NOT TESTED | +--------------+--------------+--------------+--------------+ | 58 | 0 | 0 | 121 | +--------------+--------------+--------------+--------------+ 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: Iaac0b9b14b898b079765eb18f513aaea3c417740 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-09-07Inline dump util functionOliver Brewka1-1/+1
It should be avoided using static for header only functions. Tested: Code compiles. Change-Id: Icb944588fc6f64c663960bf40da29e2de9e0b8bd Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-09-07Fix createDump progress logicOliver Brewka1-4/+2
The current logic in createDump always sets the isProgressIntfPresent flag to true, even if it is not present at all. It breaks out of the search loop on the first interface that may not be xyz.openbmc_project.Common.Progress. This can cause a task to time out and not be handled properly since completion is only reported when the Progress interface a) exists and b) reports Status=Completed. Tested: Manually tested on romulus running in qemu with ibm dump extension enabled. POST request to Managers/Dump action ``` curl -v -k POST 'https://localhost:44443/redfish/v1/Managers/bmc/ LogServices/Dump/Actions/LogService.CollectDiagnosticData' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN_ROML"'' \ -H "Content-Type: application/json" -d \ '{"DiagnosticDataType":"Manager", \ "OEMDiagnosticDataType":"Manager"}' { "@odata.id": "/redfish/v1/TaskService/Tasks/2", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "2", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '2' has started.", "MessageArgs": [ "2" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 2", "Payload": { "HttpHeaders": [ "user-agent: curl/8.20.0", "accept: */*", "content-length: 66" ], "HttpOperation": "POST", "JsonBody": "{\"DiagnosticDataType\":\"Manager\",\"OEMDiagnosticDataType\":\"Manager\"}", "TargetUri": "/redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData" }, "PercentComplete": 0, "StartTime": "2026-09-07T15:10:26+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/2", "TaskState": "Running", "TaskStatus": "OK" * Connection #1 to host localhost:44443 left intact } ``` dbus tree dump manager ``` 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/faultlog |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system `- /xyz/openbmc_project/dump/system/entry |- /xyz/openbmc_project/dump/system/entry/1 `- /xyz/openbmc_project/dump/system/entry/2 ``` bmcweb debug log ``` Sep 07 15:11:02 romulus bmcweb[200]: [dump_utils.hpp:655] /xyz/openbmc_project/dump/bmc/entry/3: Dump creation task is in progress Sep 07 15:11:02 romulus bmcweb[200]: [dump_utils.hpp:655] /xyz/openbmc_project/dump/bmc/entry/3: Dump creation task is in progress Sep 07 15:11:02 romulus bmcweb[200]: [dump_utils.hpp:679] /xyz/openbmc_project/dump/bmc/entry/3: Dump creation task completed ``` Systems/Dump Set machine state to Quiesced ``` busctl set-property xyz.openbmc_project.State.Host0 \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.Host CurrentHostState \ s "xyz.openbmc_project.State.Host.HostState.Quiesced" ``` POST request to Systems/Dump action ``` curl -v -k POST 'https://localhost:44443/redfish/v1/Systems/system/ LogServices/Dump/Actions/LogService.CollectDiagnosticData' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN_ROML"'' \ -H "Content-Type: application/json" -d \ '{"DiagnosticDataType":"OEM", \ "OEMDiagnosticDataType":"Systems"}' { "@odata.id": "/redfish/v1/TaskService/Tasks/3", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "3", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '3' has started.", "MessageArgs": [ "3" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 3", "Payload": { "HttpHeaders": [ "user-agent: curl/8.20.0", "accept: */*", "content-length: 61" ], "HttpOperation": "POST", "JsonBody": "{\"DiagnosticDataType\":\"OEM\",\"OEMDiagnosticDataType\":\"System\"}", "TargetUri": "/redfish/v1/Systems/system/LogServices/Dump/Actions/LogService.CollectDiagnosticData" }, "PercentComplete": 0, "StartTime": "2026-09-07T15:14:53+00:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/3", "TaskState": "Running", "TaskStatus": "OK" * Connection #1 to host localhost:44443 left intact } 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/faultlog |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system `- /xyz/openbmc_project/dump/system/entry |- /xyz/openbmc_project/dump/system/entry/1 |- /xyz/openbmc_project/dump/system/entry/2 `- /xyz/openbmc_project/dump/system/entry/3 ``` Set /xyz/openbmc_project/dump/system/entry/3 status to Completed ``` busctl set-property xyz.openbmc_project.Dump.Manager \ /xyz/openbmc_project/dump/system/entry/3 \ xyz.openbmc_project.Common.Progress Status \ s "xyz.openbmc_project.Common.Progress.OperationStatus.Completed" journalctl -u bmcewb Sep 07 15:17:24 romulus bmcweb[200]: [dump_utils.hpp:679] /xyz/openbmc_project/dump/system/entry/3: Dump creation task completed ``` Change-Id: I8efc2588e31d9b838b6a4bf1d33f08b589ed5808 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-09-07Refactor createDump functionOliver Brewka1-169/+176
The function as well as the task callback consisted of multiple lambdas that exceeded the lambda length rule. Extract each lambda into separate functions. Tested: Code compiles. Manually tested on romulus running in qemu with ibm dump extension enabled. POST Managers/bmc ``` curl -v -k POST 'https://localhost:44443/redfish/v1/Managers/bmc/ LogServices/Dump/Actions/LogService.CollectDiagnosticData' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN_ROML"'' \ -H "Content-Type: application/json" -d \ '{"DiagnosticDataType":"Manager", \ "OEMDiagnosticDataType":"Manager"}' { "@odata.id": "/redfish/v1/TaskService/Tasks/0", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "0", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '0' has started.", "MessageArgs": [ "0" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 0", "Payload": { "HttpHeaders": [ "user-agent: curl/8.20.0", "accept: */*", "content-length: 68" ], "HttpOperation": "POST", "JsonBody": "{\"DiagnosticDataType\":\"Manager\", \"OEMDiagnosticDataType\":\"Manager\"}", "TargetUri": "/redfish/v1/Managers/bmc/LogServices/Dump/Actions/ LogService.CollectDiagnosticData" }, "PercentComplete": 0, "StartTime": "2026-09-01T03:39:42-07:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/0", "TaskState": "Running", "TaskStatus": "OK" * Connection #1 to host localhost:4343 left intact } ``` bmcweb log output: ``` Sep 01 14:58:28 romulus bmcweb[200]: [dump_utils.hpp:720] Dump Created. Path: /xyz/openbmc_project/dump/bmc/entry/2 ... Sep 01 14:58:53 romulus bmcweb[200]: [dump_utils.hpp:564] /xyz/ openbmc_project/dump/bmc/entry/2: Dump creation task is in progress Sep 01 14:58:53 romulus bmcweb[200]: [dump_utils.hpp:564] /xyz/ openbmc_project/dump/bmc/entry/2: Dump creation task is in progress Sep 01 14:58:53 romulus bmcweb[200]: [dump_utils.hpp:588] /xyz/ openbmc_project/dump/bmc/entry/2: Dump creation task completed ``` dump/bmc tree after two POST request ``` 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/faultlog |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system ``` POST Systems/system CreateDump only works if the host is either in "Running", "Quiesced" or "TransitioningToOff" state. ``` busctl set-property xyz.openbmc_project.State.Host0 /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.Host \ CurrentHostState \ s "xyz.openbmc_project.State.Host.HostState.Quiesced" ``` ``` curl -v -k POST 'https://localhost:44443/redfish/v1/Systems/system/ LogServices/Dump/Actions/LogService.CollectDiagnosticData' \ -H 'X-Auth-Token: '"$BMCWEB_SESSION_TOKEN_ROML"'' \ -H "Content-Type: application/json" -d \ '{"DiagnosticDataType":"OEM", "OEMDiagnosticDataType":"System"}' { "@odata.id": "/redfish/v1/TaskService/Tasks/2", "@odata.type": "#Task.v1_4_3.Task", "HidePayload": false, "Id": "2", "Messages": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The task with Id '2' has started.", "MessageArgs": [ "2" ], "MessageId": "TaskEvent.1.0.TaskStarted", "MessageSeverity": "OK", "Resolution": "None." } ], "Name": "Task 2", "Payload": { "HttpHeaders": [ "user-agent: curl/8.20.0", "accept: */*", "content-length: 62" ], "HttpOperation": "POST", "JsonBody": "{\"DiagnosticDataType\":\"OEM\", \"OEMDiagnosticDataType\":\"System\"}", "TargetUri": "/redfish/v1/Systems/system/LogServices/Dump/Actions/ LogService.CollectDiagnosticData" }, "PercentComplete": 0, "StartTime": "2026-09-01T03:54:01-07:00", "TaskMonitor": "/redfish/v1/TaskService/TaskMonitors/2", "TaskState": "Running", "TaskStatus": "OK" * Connection #1 to host localhost:4343 left intact } ``` Set system dump entry to completed: ``` 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" ``` bmcweb log output: ``` Sep 02 11:26:44 romulus bmcweb[200]: [dump_utils.hpp:804] Dump Created. Path: /xyz/openbmc_project/dump/system/entry/1 ... Sep 02 11:28:13 romulus bmcweb[200]: [dump_utils.hpp:672] /xyz/ openbmc_project/dump/system/entry/1: Dump creation task completed ``` 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/faultlog |- /xyz/openbmc_project/dump/resource `- /xyz/openbmc_project/dump/system `- /xyz/openbmc_project/dump/system/entry `- /xyz/openbmc_project/dump/system/entry/1 ``` Change-Id: Id48b4643fcb634405b06db928e9a5c9d951f3ee4 Signed-off-by: Oliver Brewka <oliver.brewka@9elements.com>
2026-09-03Fix 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>
2026-09-03Simplify 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>
2026-09-03Break out dump / faultlog log servicesOliver Brewka5-1323/+1416
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>
2026-09-03Use 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>
2026-09-03bmcweb: add PowerState to Fabric Switch GETJY Voon1-1/+94
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>
2026-09-02Fix 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>
2026-09-01bmcweb: add PCIeDevice UUID propertyJY Voon1-0/+32
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>
2026-08-31Cable: Add Available state and Status.HealthAkshay Gaitonde1-31/+10
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>
2026-08-28state: 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>
2026-08-28Refactor 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>
2026-08-28Refactor 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>
2026-08-26Fix 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>
2026-08-26clang-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-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>