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/activation.hpp b/src/activation.hpp
index 59364e4..d0fdaba 100644
--- a/src/activation.hpp
+++ b/src/activation.hpp
@@ -2,6 +2,7 @@
#include "config.h"
+#include "association_interface.hpp"
#include "types.hpp"
#include <queue>
@@ -123,7 +124,8 @@
*/
Activation(sdbusplus::bus::bus& bus, const std::string& path,
const std::string& versionId, const std::string& extVersion,
- Status activationStatus, const AssociationList& assocs) :
+ Status activationStatus, const AssociationList& assocs,
+ AssociationInterface* associationInterface) :
ActivationInherit(bus, path.c_str(), true),
versionId(versionId), bus(bus), path(path),
systemdSignals(
@@ -132,7 +134,8 @@
sdbusRule::path("/org/freedesktop/systemd1") +
sdbusRule::interface("org.freedesktop.systemd1.Manager"),
std::bind(&Activation::unitStateChange, this,
- std::placeholders::_1))
+ std::placeholders::_1)),
+ associationInterface(associationInterface)
{
// Set Properties.
extendedVersion(extVersion);
@@ -227,11 +230,17 @@
/** @brief The PSU update systemd unit */
std::string psuUpdateUnit;
+ /** @brief The PSU Inventory path of the current updating PSU */
+ std::string currentUpdatingPsu;
+
/** @brief Persistent ActivationBlocksTransition dbus object */
std::unique_ptr<ActivationBlocksTransition> activationBlocksTransition;
/** @brief Persistent ActivationProgress dbus object */
std::unique_ptr<ActivationProgress> activationProgress;
+
+ /** @brief The AssociationInterface pointer */
+ AssociationInterface* associationInterface;
};
} // namespace updater