commit | 1634a6e93f1e9b2efb508216f2d90fd1d5af3e4c | [log] [tgz] |
---|---|---|
author | Archana Kakani <archana.kakani@ibm.com> | Tue Feb 04 01:12:29 2025 -0600 |
committer | ManojKiran Eda <manojkiran.eda@gmail.com> | Mon Feb 10 05:16:53 2025 +0000 |
tree | ede66f37c38e6391754cec37a98389e918c93269 | |
parent | 24e9a9bb8562f50cc8e40585ffa6b1782f4ec9aa [diff] [blame] |
host-bmc: Implement Asset interface Adding support to host Asset dbus interface. Based on the Topology data received from remote PLDM terminus, PLDM hosts the dbus interface. The Asset interface is defined at [1]. Tested: Functional test passed [1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Decorator/Asset.interface.yaml Change-Id: Ia32e69861192fca6db8c1613fbec281ca3faa3e8 Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/host-bmc/dbus/custom_dbus.cpp b/host-bmc/dbus/custom_dbus.cpp index 16b822a..f5dd592 100644 --- a/host-bmc/dbus/custom_dbus.cpp +++ b/host-bmc/dbus/custom_dbus.cpp
@@ -157,5 +157,14 @@ } } +void CustomDBus::implementAssetInterface(const std::string& path) +{ + if (!asset.contains(path)) + { + asset.emplace(path, std::make_unique<Asset>( + pldm::utils::DBusHandler::getBus(), path)); + } +} + } // namespace dbus } // namespace pldm