Create an association to host inventory item

Create an association from /xyz/openbmc_project/software/<id>
to /xyz/openbmc_project/inventory/system/chassis for Host
software images.

Change-Id: Ic0d690f86c164fd3441ad6475cce5e07208d899e
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index dd313a8..e14bdee 100755
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -106,6 +106,13 @@
         std::string extendedVersion = (Version::getValue(manifestPath.string(),
                  std::map<std::string, std::string>
                  {{"extended_version", ""}})).begin()->second;
+
+        // Create an association to the host inventory item
+        AssociationList associations{(std::make_tuple(
+                                          ACTIVATION_FWD_ASSOCIATION,
+                                          ACTIVATION_REV_ASSOCIATION,
+                                          HOST_INVENTORY_PATH))};
+
         activations.insert(std::make_pair(
                 versionId,
                 std::make_unique<Activation>(
@@ -114,7 +121,8 @@
                         *this,
                         versionId,
                         extendedVersion,
-                        activationState)));
+                        activationState,
+                        associations)));
         versions.insert(std::make_pair(
                             versionId,
                             std::make_unique<Version>(
@@ -180,6 +188,13 @@
             auto purpose = server::Version::VersionPurpose::Host;
             auto path = fs::path(SOFTWARE_OBJPATH) / id;
 
+
+            // Create an association to the host inventory item
+            AssociationList associations{(std::make_tuple(
+                                              ACTIVATION_FWD_ASSOCIATION,
+                                              ACTIVATION_REV_ASSOCIATION,
+                                              HOST_INVENTORY_PATH))};
+
             // Create Activation instance for this version.
             activations.insert(std::make_pair(
                                    id,
@@ -189,7 +204,8 @@
                                        *this,
                                        id,
                                        extendedVersion,
-                                       activationState)));
+                                       activationState,
+                                       associations)));
 
             // If Active, create RedundancyPriority instance for this version.
             if (activationState == server::Activation::Activations::Active)