libpldm: Add parent to pldm_entity_node structure

Add its own parent entity to the pldm_entity_node structure, and then
use pldm_entity_get_parent to get the entity's parent.

Also, add UTest code for it.

Tested: Built pldm daemon successfully and UTest passes.

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I067f82ad6d03f3cffd2ca24cd771274777901b61
diff --git a/libpldm/pdr.h b/libpldm/pdr.h
index 24137ab..68702f3 100644
--- a/libpldm/pdr.h
+++ b/libpldm/pdr.h
@@ -266,6 +266,14 @@
  */
 bool pldm_entity_is_node_parent(pldm_entity_node *node);
 
+/** @brief Get parent of entity
+ *
+ *  @param[in] node - opaque pointer acting as a handle to an entity node
+ *
+ *  @return pldm_entity_node* - opaque pointer to parent entity
+ */
+pldm_entity_node *pldm_entity_get_parent(pldm_entity_node *node);
+
 /** @brief Convert entity association tree to PDR
  *
  *  @param[in] tree - opaque pointer to entity association tree