commit | 2fa322280d730a5ef123c8fe749b90ded90cd293 | [log] [tgz] |
---|---|---|
author | Lakshmi Yadlapati <lakshmiy@us.ibm.com> | Tue Mar 12 09:21:59 2024 -0500 |
committer | Patrick Williams <patrick@stwcx.xyz> | Fri Aug 16 18:37:47 2024 +0000 |
tree | 21a1665b636f72f492e040380b32dd26c113777b | |
parent | 5302e3a6ae32971a5aebabe3ad8f40c8dde2ac49 [diff] |
mapper: Add GetAssociatedSubTreeById and GetAssociatedSubTreePathsById These methods are similar to the existing GetSubTree and GetSubTreePaths methods, but they retrieve the paths of the associated endpoints corresponding to the provided identifier. Here, the "Id" refers to the leaf name of the D-Bus path, which uniquely identifies a specific component or entity within the system. For example, in the path /xyz/openbmc_project/inventory/system/ChassisId/motherboard/FanId, the identifiers could be ChassisId and FanId, where each Id uniquely identifies a chassis or a fan. These methods use two arrays of interfaces: one to filter paths with the specified identifier and another to filter the endpoint paths of the identifier. These methods simplify the process by combining subtree retrieval and association lookup into a single call, reducing the number of D-Bus calls needed. ex: ''' busctl call -j "xyz.openbmc_project.ObjectMapper" "/xyz/openbmc_project/object_mapper" \ "xyz.openbmc_project.ObjectMapper" "GetAssociatedSubTreePathsById" ssiassas "chassis" \ "/xyz/openbmc_project/inventory" 0 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" ] ] } ''' Change-Id: I7f23ad585a46064aaccb0a3c789ca4a69c923291 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
YAML descriptors of standard D-Bus interfaces. The format is described by the sdbusplus binding generation tool sdbus++.
Before defining a new D-Bus interface or modifying an existing one, please read through the documented set of the common requirements and expectations.
This project can be built with meson
. The typical meson
workflow is: meson builddir && ninja -C builddir
.
The meson files used to handle the YAML files are automatically generated and found under the gen
subdirectory. When adding or removing YAML files, this must be regenerated. This can be done with the helper script found in the gen
subdirectory: cd gen && ./regenerate-meson
.
Only the xyz/openbmc_project and org/freedesktop interfaces are built by default. Other interfaces can be enabled by meson options:
-Ddata_com_ibm=true
-Ddata_org_open_power=true
Example: meson builddir -Ddata_com_ibm=true && ninja -C builddir