Create an association to BMC inventory item

Create an association from /xyz/openbmc_project/software/<id>
to the BMC inventory item.
To determine the BMC inventory item path, look for paths under
/xyz/openbmc_project/inventory/system/chassis/ that end in /bmc.

Change-Id: I8da748743368e3e607b30a76a6729829dcceec54
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/activation.hpp b/activation.hpp
index 89269bd..0a98b85 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -14,6 +14,8 @@
 namespace updater
 {
 
+using AssociationList =
+     std::vector<std::tuple<std::string, std::string, std::string>>;
 using ActivationInherit = sdbusplus::server::object::object<
     sdbusplus::xyz::openbmc_project::Software::server::Activation,
     sdbusplus::org::openbmc::server::Associations>;
@@ -177,12 +179,14 @@
          * @param[in] parent - Parent object.
          * @param[in] versionId  - The software version id
          * @param[in] activationStatus - The status of Activation
+         * @param[in] assocs - Association objects
          */
         Activation(sdbusplus::bus::bus& bus, const std::string& path,
                    ItemUpdater& parent,
                    std::string& versionId,
                    sdbusplus::xyz::openbmc_project::Software::
-                   server::Activation::Activations activationStatus) :
+                   server::Activation::Activations activationStatus,
+                   AssociationList& assocs) :
                    ActivationInherit(bus, path.c_str(), true),
                    bus(bus),
                    path(path),
@@ -202,6 +206,8 @@
             subscribeToSystemdSignals();
             // Set Properties.
             activation(activationStatus);
+            associations(assocs);
+
             // Emit deferred signal.
             emit_object_added();
         }