<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/bmcweb.git/redfish-core/lib/assembly.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-09-30T18:19:50+00:00</updated>
<entry>
<title>redfish: Use PrettyName for hardware resources</title>
<updated>2026-09-30T18:19:50+00:00</updated>
<author>
<name>Justin Nguyen</name>
<email>justinnanguyen@gmail.com</email>
</author>
<published>2026-08-24T19:24:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=af5c3aab899ea209e88933042a1ecdde2788ca07'/>
<id>urn:sha1:af5c3aab899ea209e88933042a1ecdde2788ca07</id>
<content type='text'>
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 &lt;justinnanguyen@gmail.com&gt;
</content>
</entry>
<entry>
<title>state: Add Available mapping for Assembly</title>
<updated>2026-08-19T20:01:11+00:00</updated>
<author>
<name>Justin Nguyen</name>
<email>justinnanguyen@gmail.com</email>
</author>
<published>2026-07-27T16:04:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=1a8a2ae0cd66ad2d8c79c952b5bce0a150a0957d'/>
<id>urn:sha1:1a8a2ae0cd66ad2d8c79c952b5bce0a150a0957d</id>
<content type='text'>
- 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 &lt;justinnanguyen@gmail.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>sdbusplus: use shorter type aliases</title>
<updated>2026-04-15T01:50:54+00:00</updated>
<author>
<name>Patrick Williams</name>
<email>patrick@stwcx.xyz</email>
</author>
<published>2026-04-14T11:26:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=36498b406abb3be754e84072d50f16d9dcbbfa8f'/>
<id>urn:sha1:36498b406abb3be754e84072d50f16d9dcbbfa8f</id>
<content type='text'>
The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines.  Possible replacements are for:
  * bus_t
  * exception_t
  * manager_t
  * match_t
  * message_t
  * object_t
  * slot_t
  * object_path

Change-Id: Iace20f9ad26e8d9dc234979e7a4087d599da2641
Signed-off-by: Patrick Williams &lt;patrick@stwcx.xyz&gt;
</content>
</entry>
<entry>
<title>Add LocationIndicatorActive for Assembly</title>
<updated>2025-12-09T16:25:02+00:00</updated>
<author>
<name>Myung Bae</name>
<email>myungbae@us.ibm.com</email>
</author>
<published>2025-09-23T17:33:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=d32aff8d085db882f222a0de019385d37749b8b1'/>
<id>urn:sha1:d32aff8d085db882f222a0de019385d37749b8b1</id>
<content type='text'>
Implement LocationIndicatorActive for Assembly schema to set and get the
status of the location LED. A client uses the `LocationIndicatorActive`
property to physically identify or locate the assembly.

The assembly is an array of AssemblyData [1], and the element of the
array can be patched as explained in [2].

```
{
    "Assemblies": [
        {},
        {},
        {
            "LocationIndicatorActive": true
        },
        {}
    ]
}
```

Tested:
- Validator passes.
-
1. Get LocationIndicatorActive
```
curl -k -H "X-Auth-Token: $token" -X GET 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",
      "LocationIndicatorActive": false,
      "MemberId": "0",

      ...

    },
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/1",
      "@odata.type": "#Assembly.v1_6_0.AssemblyData",
      "LocationIndicatorActive": false,
      "MemberId": "1",

      ...

    }
  ],
  "Assemblies@odata.count": 2,
  "Id": "Assembly",
  "Name": "Assembly Collection"
}
```

2. Set LocationIndicatorActive to true
```
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" \
     -X PATCH -d '{"Assemblies":[{"LocationIndicatorActive":true},{}]}' \
     https://${bmc}/redfish/v1/Chassis/chassis/Assembly
```

Then we will see the location LED lit up, and the
LocationIndicatorActive value becomes true.

```
curl -k -H "X-Auth-Token: $token" -X GET 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",
      "LocationIndicatorActive": true,
      "MemberId": "0",

      ...

    },
    {
      "@odata.id": "/redfish/v1/Chassis/chassis/Assembly#/Assemblies/1",
      "@odata.type": "#Assembly.v1_6_0.AssemblyData",
      "LocationIndicatorActive": false,
      "MemberId": "1",

      ...

    }
  ],
  "Assemblies@odata.count": 2,
  "Id": "Assembly",
  "Name": "Assembly Collection"
}
```

If the input array size is different from the existing assemblies, it
will cause an error like

```
curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" \
     -X PATCH -d '{"Assemblies":[{},{"LocationIndicatorActive":true},{}]}' \
     https://${bmc}/redfish/v1/Chassis/chassis/Assembly
{
  "error": {
    "@Message.ExtendedInfo": [
      {
        "@odata.type": "#Message.v1_1_1.Message",
        "Message": "The array provided for property Assemblies exceeds the size limit 2.",
        "MessageArgs": [
          "Assemblies",
          "2"
        ],
        "MessageId": "Base.1.19.ArraySizeTooLong",
        "MessageSeverity": "Warning",
        "Resolution": "Resubmit the request with an appropriate array size."
      }
    ],
    "code": "Base.1.19.ArraySizeTooLong",
    "message": "The array provided for property Assemblies exceeds the size limit 2."
  }
}%
```

[1] https://redfish.dmtf.org/schemas/v1/Assembly.v1_6_0.json
[2] https://redfishforum.com/thread/437/patch-individual-items-array-objects

Change-Id: Ic2e87f5daeb7ebed161654bb54ac29e7d5daa482
Signed-off-by: Myung Bae &lt;myungbae@us.ibm.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>
</feed>
