PNOR: implement Software RedundancyPriority interface.

- Create override function for redundancepriority.
- Update RedundancyPriority for image that holds that
  already holds the requested priority.

Resolves openbmc/openbmc#1553

Change-Id: I1a5c35826c881f6e9e21550c664b033c6f4b4bc0
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/activation.cpp b/activation.cpp
index 3b28c73..9a19008 100755
--- a/activation.cpp
+++ b/activation.cpp
@@ -1,6 +1,7 @@
 #include <experimental/filesystem>
 #include "activation.hpp"
 #include "config.h"
+#include "item_updater.hpp"
 
 namespace openpower
 {
@@ -128,7 +129,9 @@
                     redundancyPriority =
                               std::make_unique<RedundancyPriority>(
                                         bus,
-                                        path);
+                                        path,
+                                        *this,
+                                        0);
                 }
                 activationBlocksTransition.reset(nullptr);
                 return softwareServer::Activation::activation(
@@ -181,6 +184,7 @@
 
 uint8_t RedundancyPriority::priority(uint8_t value)
 {
+    parent.parent.freePriority(value);
     return softwareServer::RedundancyPriority::priority(value);
 }