<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/bmcweb.git/redfish-core/include/utils/asset_utils.hpp, branch master</title>
<subtitle>A do everything Redfish, KVM, GUI, and DBus webserver for OpenBMC (mirror)</subtitle>
<id>https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/'/>
<updated>2026-08-21T06:54:46+00:00</updated>
<entry>
<title>Refactor asset_utils getAssetInfo lambda</title>
<updated>2026-08-21T06:54:46+00:00</updated>
<author>
<name>Yuvakumar Selvamani</name>
<email>yuvakumars@ami.com</email>
</author>
<published>2026-08-17T11:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=db9298dca79745e5396684a621d75903b072f141'/>
<id>urn:sha1:db9298dca79745e5396684a621d75903b072f141</id>
<content type='text'>
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 &lt;yuvakumars@ami.com&gt;
</content>
</entry>
<entry>
<title>Flag long lambdas</title>
<updated>2026-07-01T17:10:08+00:00</updated>
<author>
<name>Ed Tanous</name>
<email>etanous@nvidia.com</email>
</author>
<published>2026-06-22T16:53:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=8176ae6778015743b77e8744c046bc50edf13cc4'/>
<id>urn:sha1:8176ae6778015743b77e8744c046bc50edf13cc4</id>
<content type='text'>
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 &lt;etanous@nvidia.com&gt;
</content>
</entry>
<entry>
<title>Inventory properties via Assembly schema</title>
<updated>2025-10-07T14:14:03+00:00</updated>
<author>
<name>SunnySrivastava1984</name>
<email>sunnsr25@in.ibm.com</email>
</author>
<published>2021-01-11T18:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=83237dd618c38a54aaa91b9fe4968eeb454a5dfa'/>
<id>urn:sha1:83237dd618c38a54aaa91b9fe4968eeb454a5dfa</id>
<content type='text'>
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 &lt;sunnsr25@in.ibm.com&gt;
Signed-off-by: Ninad Palsule &lt;ninad@linux.ibm.com&gt;
Signed-off-by: Myung Bae &lt;myungbae@us.ibm.com&gt;
</content>
</entry>
<entry>
<title>Add getAssetInfo into util function</title>
<updated>2025-09-24T18:40:55+00:00</updated>
<author>
<name>Myung Bae</name>
<email>myungbae@us.ibm.com</email>
</author>
<published>2025-09-07T16:36:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=1ac7f6cf1e1338a5345f15b8c9183f6e6c0107fa'/>
<id>urn:sha1:1ac7f6cf1e1338a5345f15b8c9183f6e6c0107fa</id>
<content type='text'>
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 &lt;myungbae@us.ibm.com&gt;
</content>
</entry>
</feed>
