Static layout: Add dummy activation_static

Add ActivationStatic inherits Activation, which will be used to do PNOR
code update for statis layout.

Tested: Verify code compiles.

Change-Id: I5d90c84b63797e37fa309caeb9b23035f3c76f9f
Signed-off-by: Lei YU <mine260309@gmail.com>
diff --git a/static/Makefile.am.include b/static/Makefile.am.include
index 827e2fd..126907f 100644
--- a/static/Makefile.am.include
+++ b/static/Makefile.am.include
@@ -1,2 +1,3 @@
 openpower_update_manager_SOURCES += \
-	%reldir%/item_updater_static.cpp
+	%reldir%/item_updater_static.cpp \
+	%reldir%/activation_static.cpp
diff --git a/static/activation_static.cpp b/static/activation_static.cpp
new file mode 100644
index 0000000..d73dc50
--- /dev/null
+++ b/static/activation_static.cpp
@@ -0,0 +1,25 @@
+#include "activation_static.hpp"
+
+namespace openpower
+{
+namespace software
+{
+namespace updater
+{
+namespace softwareServer = sdbusplus::xyz::openbmc_project::Software::server;
+
+void ActivationStatic::startActivation()
+{
+}
+
+void ActivationStatic::unitStateChange(sdbusplus::message::message& msg)
+{
+}
+
+void ActivationStatic::finishActivation()
+{
+}
+
+} // namespace updater
+} // namespace software
+} // namespace openpower
diff --git a/static/activation_static.hpp b/static/activation_static.hpp
new file mode 100644
index 0000000..85914ac
--- /dev/null
+++ b/static/activation_static.hpp
@@ -0,0 +1,29 @@
+#pragma once
+
+#include "activation.hpp"
+
+namespace openpower
+{
+namespace software
+{
+namespace updater
+{
+
+/** @class ActivationStatic
+ *  @brief Implementation for static PNOR layout
+ */
+class ActivationStatic : public Activation
+{
+  public:
+    using Activation::Activation;
+    ~ActivationStatic() = default;
+
+  private:
+    void unitStateChange(sdbusplus::message::message& msg) override;
+    void startActivation() override;
+    void finishActivation() override;
+};
+
+} // namespace updater
+} // namespace software
+} // namespace openpower
diff --git a/static/item_updater_static.cpp b/static/item_updater_static.cpp
index 5937e13..9ae2942 100644
--- a/static/item_updater_static.cpp
+++ b/static/item_updater_static.cpp
@@ -2,7 +2,7 @@
 
 #include "item_updater_static.hpp"
 
-#include "activation.hpp"
+#include "activation_static.hpp"
 #include "version.hpp"
 
 #include <cstring>
@@ -115,7 +115,8 @@
         activationStatus,
     AssociationList& assocs)
 {
-    return {};
+    return std::make_unique<ActivationStatic>(
+        bus, path, *this, versionId, extVersion, activationStatus, assocs);
 }
 
 std::unique_ptr<Version> ItemUpdaterStatic::createVersionObject(
@@ -125,11 +126,16 @@
         versionPurpose,
     const std::string& filePath)
 {
-    return {};
+    auto version = std::make_unique<Version>(
+        bus, objPath, *this, versionId, versionString, versionPurpose, filePath,
+        std::bind(&ItemUpdaterStatic::erase, this, std::placeholders::_1));
+    version->deleteObject = std::make_unique<Delete>(bus, objPath, *version);
+    return version;
 }
 
 bool ItemUpdaterStatic::validateImage(const std::string& path)
 {
+    // There is no need to validate static layout pnor
     return true;
 }
 
@@ -170,6 +176,21 @@
         createActiveAssociation(path);
     }
 
+    // Create Activation instance for this version.
+    activations.insert(std::make_pair(
+        id, std::make_unique<ActivationStatic>(bus, path, *this, id,
+                                               extendedVersion, activationState,
+                                               associations)));
+
+    // If Active, create RedundancyPriority instance for this version.
+    if (activationState == server::Activation::Activations::Active)
+    {
+        // For now only one PNOR is supported with static layout
+        activations.find(id)->second->redundancyPriority =
+            std::make_unique<RedundancyPriority>(
+                bus, path, *(activations.find(id)->second), 0);
+    }
+
     // Create Version instance for this version.
     auto versionPtr = std::make_unique<Version>(
         bus, path, *this, id, version, purpose, "",