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