Create active association

Create an association between an active image
and the active image's version object.
This change includes code to remove the active
association if the image is deleted.

Change-Id: Id5b2d353d7df05854b035641765e1066d64a3ef5
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/item_updater.cpp b/item_updater.cpp
index 9038471..6df57ac 100644
--- a/item_updater.cpp
+++ b/item_updater.cpp
@@ -398,6 +398,30 @@
     }
 }
 
+void ItemUpdater::createActiveAssociation(std::string path)
+{
+    assocs.emplace_back(std::make_tuple(ACTIVE_FWD_ASSOCIATION,
+                                        ACTIVE_REV_ASSOCIATION,
+                                        path));
+    associations(assocs);
+}
+
+void ItemUpdater::removeActiveAssociation(std::string path)
+{
+    for (auto iter = assocs.begin(); iter != assocs.end();)
+    {
+        if ((std::get<2>(*iter)).compare(path) == 0)
+        {
+            iter = assocs.erase(iter);
+            associations(assocs);
+        }
+        else
+        {
+            ++iter;
+        }
+    }
+}
+
 } // namespace updater
 } // namespace software
 } // namespace openpower