| Age | Commit message (Collapse) | Author | Files | Lines | |
|---|---|---|---|---|---|
| 2026-08-21 | Refactor asset_utils getAssetInfo lambda | Yuvakumar Selvamani | 1 | -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-07-01 | Flag long lambdas | Ed Tanous | 1 | -0/+1 | |
| Long lambdas have been documented as an anti-pattern for some time.[1] Despite this being generally understood, bmcweb has a long ways to go cleaning these up, and routinely code is submitted in violation of this anti-pattern. Invent an ast-grep rule that can identify when new examples of this anti-pattern are added, and ignore the existing 200+ examples that are in the codebase already using ast-grep ignore. These flags will give us something to search for as we clean this up, and will help to prevent new instances from being added unintentionally. [1] https://github.com/openbmc/docs/blob/master/anti-patterns.md#very-long-lambda-callbacks Tested: Comment only change. ast-grep passes. Manually removing an ast-grep ignore flag shows as a failure in ast-grep scan Change-Id: I77d634a393884969f184d2c39c02cc08288d5a29 Signed-off-by: Ed Tanous <etanous@nvidia.com> | |||||
| 2025-10-07 | Inventory properties via Assembly schema | SunnySrivastava1984 | 1 | -9/+9 | |
| This commit implements Redfish Assembly schema. This schema will be used to publish inventory data for FRUs which are attached to a given Chassis and does not map to any specific schema definition. The properties which are published in this commit are LocationCode, SparePartNumber, Model, SerialNumber and PartNumber. One of the major use case to publish these properties via redfish is for anyone to identify the inventory and its location in the system, which in turn will help them in repair/replacement related to that FRU. The validator has been executed on the change and no error has been found. As this has been tested on a development image some fields are empty in the below pasted output for which warning was thrown by validator but no errors. Sample Output with [1]: ``` { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly", "@odata.type": "#Assembly.v1_5_1.Assembly", "Assemblies": [ { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/0", "@odata.type": "#Assembly.v1_5_1.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.1234567-D0" } }, "Manufacturer": "", "MemberId": "0", "Model": "", "Name": "base_op_panel_blyth", "PartNumber": "", "SerialNumber": "", "Status": { "Health": "OK", "State": "Absent" } }, { "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/1", "@odata.type": "#Assembly.v1_5_1.AssemblyData", "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.1234567-D1" } }, "Manufacturer": "", "MemberId": "1", "Model": "6B86", "Name": "lcd_op_panel_hill", "PartNumber": "PN12345", "SerialNumber": "YL6B86010000", "Status": { "Health": "OK", "State": "Enabled" } } ], "Assemblies@odata.count": 2, "Id": "Assembly", "Name": "Assembly Collection" } ``` [1] https://gerrit.openbmc.org/c/openbmc/openbmc/+/83907 Change-Id: I2d462340fe1a0b0eb387697f0ff70fcafde3f8d9 Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com> Signed-off-by: Ninad Palsule <ninad@linux.ibm.com> Signed-off-by: Myung Bae <myungbae@us.ibm.com> | |||||
| 2025-09-24 | Add getAssetInfo into util function | Myung Bae | 1 | -0/+102 | |
| AssetInfo is needed for many schemas like Fan, Storage etc. Using this utility function, those AssetInfo can be obtained in one place. This function extracts the following properties if available. - Manufacturer - Model - PartNumber - SerialNumber - SparePartNumber (if requested) Tested: - GET Chassis, Fan, Storage etc - Redfish Service Validator passes Change-Id: I2e8fdab8969d24899c261cfdf601be971d0210d7 Signed-off-by: Myung Bae <myungbae@us.ibm.com> | |||||
