Merge entity association PDRs

This commit enables merging entity association PDRs from the host into
the BMC's PDR repo. Entities from the host are inserted into the
appropriate location in the entity tree maintained by the BMC.

Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
Change-Id: Ie9fa46d9f8512fad6c04069e4fc65785972fbf64
diff --git a/libpldmresponder/examples/fru/host_frus.json b/libpldmresponder/examples/fru/host_frus.json
new file mode 100644
index 0000000..07107ff
--- /dev/null
+++ b/libpldmresponder/examples/fru/host_frus.json
@@ -0,0 +1,22 @@
+{
+        "entities":[
+            {
+                # Entity Type 64 from the host has ...
+                "entity_type" : 64,
+                "parent":
+                     {
+                        # ... entity type 100 and instance 1 on the BMC as parent
+                        "entity_type" : 100,
+                        "entity_instance" : 1
+                     }
+            },
+            {
+                "entity_type" : 65,
+                "parent":
+                     {
+                        "entity_type" : 100,
+                        "entity_instance" : 1
+                     }
+            }
+        ]
+}
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index df29065..50e46d8 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -104,7 +104,7 @@
         }
     }
 
-    pldm_entity_association_pdr_add(entityTree, pdrRepo);
+    pldm_entity_association_pdr_add(entityTree, pdrRepo, false);
 
     if (table.size())
     {
diff --git a/libpldmresponder/pdr_utils.cpp b/libpldmresponder/pdr_utils.cpp
index 185a6ce..85af37f 100644
--- a/libpldmresponder/pdr_utils.cpp
+++ b/libpldmresponder/pdr_utils.cpp
@@ -17,7 +17,7 @@
 RecordHandle Repo::addRecord(const PdrEntry& pdrEntry)
 {
     return pldm_pdr_add(repo, pdrEntry.data, pdrEntry.size,
-                        pdrEntry.handle.recordHandle);
+                        pdrEntry.handle.recordHandle, false);
 }
 
 const pldm_pdr_record* Repo::getFirstRecord(PdrEntry& pdrEntry)