Activation: create associations
Create activation, functional, activate associations during PSU update.
Tested: With dummy psu update service, verify the assocations are
created when the PSU update is completed, and not created
when PSU update fails.
Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I3d457e65b55066b93f7fc9a3311093dcec05d020
diff --git a/src/item_updater.hpp b/src/item_updater.hpp
index eabe66f..c0a64fa 100644
--- a/src/item_updater.hpp
+++ b/src/item_updater.hpp
@@ -3,6 +3,7 @@
#include "config.h"
#include "activation.hpp"
+#include "association_interface.hpp"
#include "types.hpp"
#include "utils.hpp"
#include "version.hpp"
@@ -31,7 +32,7 @@
/** @class ItemUpdater
* @brief Manages the activation of the PSU version items.
*/
-class ItemUpdater : public ItemUpdaterInherit
+class ItemUpdater : public ItemUpdaterInherit, public AssociationInterface
{
friend class ::TestItemUpdater;
@@ -63,27 +64,27 @@
*/
void deleteAll();
- private:
/** @brief Creates an active association to the
* newly active software image
*
* @param[in] path - The path to create the association to.
*/
- void createActiveAssociation(const std::string& path);
+ void createActiveAssociation(const std::string& path) override;
/** @brief Add the functional association to the
* new "running" PSU images
*
* @param[in] path - The path to add the association to.
*/
- void addFunctionalAssociation(const std::string& path);
+ void addFunctionalAssociation(const std::string& path) override;
/** @brief Removes the associations from the provided software image path
*
* @param[in] path - The path to remove the association from.
*/
- void removeAssociation(const std::string& path);
+ void removeAssociation(const std::string& path) override;
+ private:
/** @brief Callback function for Software.Version match.
* @details Creates an Activation D-Bus object.
*