History log of /openbmc/phosphor-objmgr/src/handler.cpp (Results 1 – 10 of 10)
Revision Date Author Comments
# d884cdf7 01-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 ...


# 7a93d516 13-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 ...


# c363323e 09-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 ...


# 8c25006c 23-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 ...


# 9052ebd3 16-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 ...


# 47b68cbc 20-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 ...


# 1a19e6aa 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 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-16 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: I9252bdd2509e5a9cff31fce9be31291f63b3a5cc
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 670edd12 15-Feb-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: update with latest

Copy the latest clang-format and apply to the repository.

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


# 58881d0b 02-Oct-2022 Willy Tu <wltu@google.com>

mapper: Add Associated subtree method definition

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

Create new mapper function to make subtree call and

mapper: Add Associated subtree method definition

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

Create new mapper function to make subtree call and association call at
the same time. With the association definition, we will have more
endpoints to fetch and verify that it is actually the resource that we
are looking for. We need to verify that it has the expected interface to
confirm that it is right device. In the current workflow this will take
two dbus calls to the mapper to get the association and the subtree.

This change aims to reduce that down to one by combining the two
operations. It will not significant performance increase for the daemons,
but it can help reduce the load on the dbus-broker.service.

Tested:
```
Normal Call:
busctl call "xyz.openbmc_project.ObjectMapper" \
"/xyz/openbmc_project/object_mapper" \
"xyz.openbmc_project.ObjectMapper" "GetSubTreePaths" sias \
"/xyz/openbmc_project/inventory" 0 1 \
"xyz.openbmc_project.Inventory.Item.Storage"
as 4 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1"
"/xyz/openbmc_project/inventory/storage_4" "/xyz/openbmc_project/inventory/storage_3"

Associated Call: (Only 0 and 1 is associated to the chassis)
busctl call "xyz.openbmc_project.ObjectMapper" \
"/xyz/openbmc_project/object_mapper" \
"xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePaths" ssias \
"/xyz/openbmc_project/inventory/chassis_0/storage" \
"/xyz/openbmc_project/inventory" 0 1 "xyz.openbmc_project.Inventory.Item.Storage"
as 2 "/xyz/openbmc_project/inventory/storage_0" "/xyz/openbmc_project/inventory/storage_1"
```

Change-Id: Ib532e660cf20b9efc83045fb1cbd9143d0c1841e
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# aba14d3d 31-Jan-2023 Willy Tu <wltu@google.com>

test: Add dbus handler unit tests

Created unit tests for all of the object mapper dbus handlers.

Refactor the handlers to handler.cpp to allow unit testing.
Also updated to use std::set_intersectio

test: Add dbus handler unit tests

Created unit tests for all of the object mapper dbus handlers.

Refactor the handlers to handler.cpp to allow unit testing.
Also updated to use std::set_intersection.

Change-Id: Ib87ab81f949d27f7dab55899d3e8d380e43bda04
Signed-off-by: Willy Tu <wltu@google.com>

show more ...