<feed xmlns='http://www.w3.org/2005/Atom'>
<title>BMC/OpenBmc/bmcweb.git/redfish-core/include/utils/name_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-09-30T18:19:49+00:00</updated>
<entry>
<title>utils: add PrettyName utility function</title>
<updated>2026-09-30T18:19:49+00:00</updated>
<author>
<name>Akash Arunkumar</name>
<email>mirrorghost007@gmail.com</email>
</author>
<published>2026-06-25T06:35:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/BMC/OpenBmc/bmcweb.git/commit/?id=552997940e1a06bc2fc43297d9b7492f008fea03'/>
<id>urn:sha1:552997940e1a06bc2fc43297d9b7492f008fea03</id>
<content type='text'>
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 &lt;mirrorghost007@gmail.com&gt;
Signed-off-by: Justin Nguyen &lt;justinnanguyen@gmail.com&gt;
</content>
</entry>
</feed>
