gpio-presence: Support for multiple iface assocs
This will allow additional interfaces to be specified
to associate with inventory items to allow for further
customization of inventory items.
Specifying property values for an interface added this way
is currently not supported.
Tested: Verified any given interface(s) is associated properly
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
Change-Id: I99e655b35120c82454a8851201218ec548ad9fe3
diff --git a/presence/gpio_presence.cpp b/presence/gpio_presence.cpp
index 1671721..4326602 100644
--- a/presence/gpio_presence.cpp
+++ b/presence/gpio_presence.cpp
@@ -145,6 +145,11 @@
invProp.emplace("Present", present);
invProp.emplace("PrettyName", name);
invIntf.emplace("xyz.openbmc_project.Inventory.Item", std::move(invProp));
+ // Add any extra interfaces we want to associate with the inventory item
+ for (auto& iface : ifaces)
+ {
+ invIntf.emplace(iface, PropertyMap());
+ }
invObj.emplace(std::move(inventory), std::move(invIntf));
return invObj;