I do not understand the issue, please provide a campaign that would case the ambiguity between nodes.

On 11/16/2017 10:18 AM, Vijay Roy wrote:
Conditional check on AMF nodes in swadd and swRemove exactly for same and match 
to avoid ambiguity between nodes.
---
  src/smf/smfd/SmfUpgradeMethod.cc | 21 ++++++++++++++++++++-
  1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/smf/smfd/SmfUpgradeMethod.cc b/src/smf/smfd/SmfUpgradeMethod.cc
index 0149c93..3671d80 100644
--- a/src/smf/smfd/SmfUpgradeMethod.cc
+++ b/src/smf/smfd/SmfUpgradeMethod.cc
@@ -173,11 +173,30 @@ void SmfUpgradeScope::removeSwAddRemoveDuplicates(
    std::set<std::string> toBeRemoved;
// Find out which bundles are specified in both swAdd and SwRemove.
-  // Create a set of DN, since the comparison is based on that.
+  // Create a set of DN's if their Amf Nodes in swAdd and swRemove exactly 
same and match.
    for (auto &elemAdd : io_addList) {
+    bool sameNodesInAddRemoveSw = false;
      for (auto &elemRemove : io_removeList) {
        const std::string &swAddBundleDn = elemAdd.getBundleDn();
        if (swAddBundleDn == elemRemove.getBundleDn()) {
+         for (auto &itAdd : elemAdd.getPlmExecEnvList()) {
+           const std::string& i_addNodeDn = itAdd.getAmfNode();
+             for (auto itRemove : elemRemove.getPlmExecEnvList()) {
+               const std::string& i_removeNodeDn = itRemove.getAmfNode();
+               if (i_addNodeDn == i_removeNodeDn) {
+                 sameNodesInAddRemoveSw = true;
+                 TRACE("SmfUpgradeScope::removeSwAddRemoveDuplicates(): node DN's 
%s are same ", i_addNodeDn.c_str());
+                 break;
+               }
+             }
+             if (sameNodesInAddRemoveSw == false) {
+               break;
+             }
+         }
+         if (sameNodesInAddRemoveSw == false) {
+           continue;
+         }
+
          TRACE(
              "SmfUpgradeScope::removeSwAddRemoveDuplicates(): Bundle=%s found in <swAdd> 
and <swRemove> within a procedure, remove from both lists\n",
              swAddBundleDn.c_str());


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to