History log of /openbmc/phosphor-objmgr/src/ (Results 1 – 25 of 119)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
d7926d0c29-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix performance-unnecessary-value-param

Tested by building mapperx.

Change-Id: Ib8c3f52e437a13de75f934bb17605dd8527bb15b
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

7dd2029e29-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: fix -Wmissing-prototype

This helps make the author's original intent clear. Tested by building
and running the unit tests with clang.

Change-Id: If0231ec5634adad0b61e7fcff8ec1e5bcbbb92c1
Si

build: fix -Wmissing-prototype

This helps make the author's original intent clear. Tested by building
and running the unit tests with clang.

Change-Id: If0231ec5634adad0b61e7fcff8ec1e5bcbbb92c1
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

e5cb4aec15-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: fix -Wmissing-variable-declarations

This helps make the author's original intent clear. Tested by building
and running the unit tests with clang.

Change-Id: Iaf0aca72b5a8cc931bcb84c27df1c55

build: fix -Wmissing-variable-declarations

This helps make the author's original intent clear. Tested by building
and running the unit tests with clang.

Change-Id: Iaf0aca72b5a8cc931bcb84c27df1c55d2f438dda
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

86436ac015-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: fix -Wsuggest-override

suggest-override helps make the original author's intent clear for
future readers. For false positives, use a different method name.
Tested by building and running the

build: fix -Wsuggest-override

suggest-override helps make the original author's intent clear for
future readers. For false positives, use a different method name.
Tested by building and running the unit tests with clang.

Change-Id: Icc657bf3c0269e681f26fb5e58c5198aa5aa4a19
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

18d3d44729-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: remove unused headers

Remove or reduce the scope of some unused headers. Tested by building
the code and running the unit tests.

Change-Id: I7a2b311d90352f0a949e76e9387ba552e2a186ec
Signed-

build: remove unused headers

Remove or reduce the scope of some unused headers. Tested by building
the code and running the unit tests.

Change-Id: I7a2b311d90352f0a949e76e9387ba552e2a186ec
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

069470dc29-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix bugprone-unused-local-non-trivial-variable

Tested by building the code and running the unit tests.

Change-Id: I2b50223f59fc53c4a73e3fd5527bc382e319609b
Signed-off-by: Brad Bishop <bradbis

tidy: fix bugprone-unused-local-non-trivial-variable

Tested by building the code and running the unit tests.

Change-Id: I2b50223f59fc53c4a73e3fd5527bc382e319609b
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

78585a7729-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix modernize-use-override

Tested by building the code.

Change-Id: I57d44e54c67c7b6b3f5b758107a6d5988d1e47e3
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

7f900ff929-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix performance-avoid-endl

Tested by building the code.

Change-Id: I3de027d34b3e91bc08923b47bda16b0b0f4b34b4
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

78b0486408-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix performance-inefficient-string-concatenation

Tested by building and running the unit tests.

Change-Id: Ia7638172abcd737d6036bb5b2b96d03fb0a85562
Signed-off-by: Brad Bishop <bradbish@qti.q

tidy: fix performance-inefficient-string-concatenation

Tested by building and running the unit tests.

Change-Id: Ia7638172abcd737d6036bb5b2b96d03fb0a85562
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

a725706d29-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

tidy: fix readability-container-contains

Tested by building and running the unit tests.

Change-Id: I146a62e54d37d8cb4b7f75f3ed8872f0c80bbb49
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

93d664fc29-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

codespell: run and fix

Fix the misspellings. Tested by building the code and running the unit
tests.

Change-Id: I3fb3f1f46fa41bb0c65157ff6e68bc4f1079f280
Signed-off-by: Brad Bishop <bradbish@qti.q

codespell: run and fix

Fix the misspellings. Tested by building the code and running the unit
tests.

Change-Id: I3fb3f1f46fa41bb0c65157ff6e68bc4f1079f280
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

11c0cc3c08-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: enable and fix -Wshadow

Shadow names can be prone to bugs. Enable the warning to avoid them in
the future. Tested by building and running the unit tests.

Change-Id: Ic3227675f4ff40d266ae2a

build: enable and fix -Wshadow

Shadow names can be prone to bugs. Enable the warning to avoid them in
the future. Tested by building and running the unit tests.

Change-Id: Ic3227675f4ff40d266ae2a60c66c894f16e5888e
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

197de18109-Jul-2025 Brad Bishop <bradbish@qti.qualcomm.com>

build: enable and fix -Wconversion,-Wsign-conversion

Fix instances of cppcoreguidelines-narrowing-conversions, and enable the
warnings to catch future cases. Tested by building and running the unit

build: enable and fix -Wconversion,-Wsign-conversion

Fix instances of cppcoreguidelines-narrowing-conversions, and enable the
warnings to catch future cases. Tested by building and running the unit
tests.

Change-Id: I4047acd87a5ac6050ed7650e1efd32a921574041
Signed-off-by: Brad Bishop <bradbish@qti.qualcomm.com>

show more ...

1e3f781025-Mar-2025 Myung Bae <myungbae@us.ibm.com>

Fix SubTreePathsById when given ID is invalid

The commit 7a93d51 makes `getAssociatedSubTreePathsById()` to return
empty paths if there are no associated subtrees. However, it also
returns empty pa

Fix SubTreePathsById when given ID is invalid

The commit 7a93d51 makes `getAssociatedSubTreePathsById()` to return
empty paths if there are no associated subtrees. However, it also
returns empty paths as a success, even if the given id is not valid.

This is to check the invalid case and to return NotFound.

For example, currently, this gives the success
- GET /redfish/v1/Chassis/INVALID/PowerSubsystem/PowerSupplies

Tested:
- GET with the invalid id and check the return condition.

```
busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \
"xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \
"InvalidChassis" \
"/xyz/openbmc_project/inventory" \
1 "xyz.openbmc_project.Inventory.Item.Chassis" \
"powered_by" \
1 "xyz.openbmc_project.Inventory.Item.PowerSupply"

-->
Call failed: The resource is not found.
```

Change-Id: If4f621e105bc1a5c443c1ec8b7762f57748e1d10
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

2a1ef01303-Mar-2025 Patrick Williams <patrick@stwcx.xyz>

meson: reformat with meson formatter

Apply the `meson format` results.

Change-Id: I5e218b58822e02ead2f37a069da4c0034c5005f5
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

41ad838013-Feb-2025 Ed Tanous <ed@tanous.net>

Fix deprecated asio usage

And enable BOOST_ASIO_NO_DEPRECATED

Change-Id: I83612501948e8c1c4a0df735aafc80e26af7f3cb
Signed-off-by: Ed Tanous <ed@tanous.net>

d884cdf701-Feb-2025 Patrick Williams <patrick@stwcx.xyz>

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I555df8382455157bff44671b6f284e3121d5c182
Signed-off-by: Patrick Williams <p

clang-format: update latest spec and reformat

Copy the latest format file from the docs repository and apply.

Change-Id: I555df8382455157bff44671b6f284e3121d5c182
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

7cc8d00a23-Sep-2024 Lei YU <yulei.sh@bytedance.com>

Remove default interfaces

When association is used, mapper will create DBus objects on the leaf
of the associated objects, and will "assign" the "default interfaces" to
the parent objects:
* org.fre

Remove default interfaces

When association is used, mapper will create DBus objects on the leaf
of the associated objects, and will "assign" the "default interfaces" to
the parent objects:
* org.freedesktop.DBus.Introspectable
* org.freedesktop.DBus.Peer
* org.freedesktop.DBus.Properties

For example, software manager will create BMC version object and create
association, and we could see below DBus objects created by mapper:
```
/xyz/openbmc_project/software/64876e4e/inventory
/xyz/openbmc_project/software/64876e4e/software_version
```

And we could mapper's `GetObject` method will return the default
interfaces on the parent object:

```json
# busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0
{
"type" : "a{sas}",
"data" : [
{
"xyz.openbmc_project.ObjectMapper" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties"
],
"xyz.openbmc_project.Software.BMC.Updater" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties",
"xyz.openbmc_project.Association.Definitions",
"xyz.openbmc_project.Common.FilePath",
"xyz.openbmc_project.Inventory.Decorator.Compatible",
"xyz.openbmc_project.Software.Activation",
"xyz.openbmc_project.Software.ExtendedVersion",
"xyz.openbmc_project.Software.RedundancyPriority",
"xyz.openbmc_project.Software.Version"
]
}
]
}
```

This patch removes registering the default interfaces (peer, properties,
Introspectable) when done as part of an ObjectManager event, because
they're generally not received as part of an InterfacesAdded call. These
don't generally get searched on, and don't make a ton of sense to have
the mapper implicitly add, but were done to make the introspect and
objectmapper results match.

However, the default interfaces returned by introspect on the parents
could not be called, e.g.

```
# The leaf object is OK:
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e/inventory org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties
a{sv} 0

# The parent object fails to call:
busctl call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/software/64876e4e org.freedesktop.DBus.Properties GetAll s org.freedesktop.DBus.Properties
Call failed: Unknown object '/xyz/openbmc_project/software/64876e4e'.
```

This probably means that the default interfaces returned by introspect
could not really be used, and thus we could remove then in mapper here.

Tested: With this patch, the parent object does not show default
interfaces:
```json
# busctl --json=pretty call xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper xyz.openbmc_project.ObjectMapper GetObject sas /xyz/openbmc_project/software/64876e4e 0
{
"type" : "a{sas}",
"data" : [
{
"xyz.openbmc_project.ObjectMapper" : [],
"xyz.openbmc_project.Software.BMC.Updater" : [
"org.freedesktop.DBus.Introspectable",
"org.freedesktop.DBus.Peer",
"org.freedesktop.DBus.Properties",
"xyz.openbmc_project.Association.Definitions",
"xyz.openbmc_project.Common.FilePath",
"xyz.openbmc_project.Inventory.Decorator.Compatible",
"xyz.openbmc_project.Software.Activation",
"xyz.openbmc_project.Software.ExtendedVersion",
"xyz.openbmc_project.Software.RedundancyPriority",
"xyz.openbmc_project.Software.Version"
]
}
]
}
```

Note: if this gets merged, bmcweb's related code in
openbmc_dbus_rest.hpp shall be updated to handle this case.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I568f618141ac514f9720e83960a1b4e76f77eb54

show more ...

883a892922-Jan-2025 Benjamin Fair <benjaminfair@google.com>

associations: fix leak in assocMaps.ifaces

New entries get added to ifaces whenever an object with associations is
detected, but the entries are never removed even if all the endpoints
are gone, lea

associations: fix leak in assocMaps.ifaces

New entries get added to ifaces whenever an object with associations is
detected, but the entries are never removed even if all the endpoints
are gone, leading to a memory leak.

Change-Id: Ide5439e4eaab7c70fb0331d59d59753905f45066
Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Signed-off-by: Willy Tu <wltu@google.com>

show more ...

ea0e5d2711-Nov-2024 Ed Tanous <etanous@nvidia.com>

Fix compile error on boost 1.86

Boost 1.86 shows a compiler error which is holding up the rebase here.
The mapper extends std::vector, because it results in smaller binary
sizes compared to boost::v

Fix compile error on boost 1.86

Boost 1.86 shows a compiler error which is holding up the rebase here.
The mapper extends std::vector, because it results in smaller binary
sizes compared to boost::vector. It's not clear if this is the problem,
or if there's something else amiss within container. Triaging the real
root cause isn't important to this use case.

There are a few reported bugs and changes that might be related[1][2].

It's not clear which one would've broken try_emplace in this case, nor
is it worth the effort to resolve.

This patchset replaces try_emplace calls with emplace calls. In theory
these are slightly less efficient, but considering that map construction
is a cold path, it's not terribly important that it be efficient.

[1] https://github.com/boostorg/container/issues/292
[2] https://github.com/boostorg/container/issues/280

Change-Id: I30d176022d2cec45430a50dc02c84666541fb4d7
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...

7a93d51613-Sep-2024 Myung Bae <myungbae@us.ibm.com>

Return empty paths if no SubTreePathsById is found

`getAssociatedSubTreePaths()` returns the empty paths if there are no
associated subtrees, and bmcweb uses it to differentiate from the error.

How

Return empty paths if no SubTreePathsById is found

`getAssociatedSubTreePaths()` returns the empty paths if there are no
associated subtrees, and bmcweb uses it to differentiate from the error.

However, `getAssociatedSubTreePathsById()` (which is introduced by [1])
returns NotFound error for the case. It would be more appropriate to
match its behavior with `getAssociatedSubTreePaths()`.

Tested:
- unit-test is succeeded for good and bad cases

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-objmgr/+/70699

Change-Id: I84680b1b39ba8ade94ea6fdb7dae280505e5c050
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

c363323e09-Apr-2024 Lakshmi Yadlapati <lakshmiy@us.ibm.com>

mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById

dbus-interface change in:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999

This commit implements two new

mapper: Add GetAssociatedSubTreePathsById and GetAssociatedSubTreeById

dbus-interface change in:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69999

This commit implements two new methods: GetAssociatedSubTreePathsById
and GetAssociatedSubTreeById. These methods retrieve the paths of
associated endpoints corresponding to the provided identifier, filtering
based on their association with specified endpoint interfaces.

GetAssociatedSubTreePathsById returns the D-Bus paths of associated
endpoints, while GetAssociatedSubTreeById retrieves a dictionary of
D-Bus paths of associated endpoints mapped to corresponding services
associated with the provided identifier.

Tested:
'''
busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \
"xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssassas \
"chassis" \
"/xyz/openbmc_project/inventory" \
1 "xyz.openbmc_project.Inventory.Item.Chassis" \
"powered_by" \
1 "xyz.openbmc_project.Inventory.Item.PowerSupply"
{
"type" : "as",
"data" : [
[
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply2",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply3"
]
]
}
'''

Another example.

```
busctl call -j xyz.openbmc_project.ObjectMapper /xyz/openbmc_project/object_mapper \
xyz.openbmc_project.ObjectMapper GetAssociatedSubTreePathsById ssassas \
disk_backplane0 \
/xyz/openbmc_project/inventory \
1 xyz.openbmc_project.Inventory.Item.FabricAdapter \
connecting \
1 xyz.openbmc_project.Inventory.Connector.Port
{
"type" : "as",
"data" : [
[
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector0",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector1",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector2",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector3",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector4",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/dp0_connector5"
]
]
}
```

Change-Id: Id55a9b41fe70f7204543d92b5396888f6914a1d4
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
Signed-off-by: Myung Bae <myungbae@us.ibm.com>

show more ...

8c25006c23-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

handler: fix undefined behavior

Saving a reference to a temporary returned from a function call is
undefined behavior and subverts RVO. Remove the `&` so these become
local variables.

Signed-off-b

handler: fix undefined behavior

Saving a reference to a temporary returned from a function call is
undefined behavior and subverts RVO. Remove the `&` so these become
local variables.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I8e7da30fddef808dfe7ee323d7f91a7c2a2cdeb6

show more ...

9052ebd316-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: Ic68b91e23738cafe198c50f40e46d4163bda02b6
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

47b68cbc20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: Ibc0976e16acb6163431698832a461e9fc7335448
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...

12345