PEL: Python3 module support for UserData parsing

This change enables the calling of python3 parsers for UserData section.
Modules will be searched under the namespace "udparsers" from python3
sys.path directories (including the current directory).

Example:

  /usr/lib/python3.8/site-packages/udparsers/bxxxx/bxxxx.py

  or

  ./udparsers/bxxxx/bxxxx.py

  where

  b = Creator Subsystem ID for Hostboot
  xxxx = Component ID of UserData section

The parsers will need to provide a function called "parseUDToJson" with
input parameters:

1. (int) Sub-section type
2. (int) Section version
3. (memoryview): Data

The return value needs to be a valid JSON string.

Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I4d3523083bc48ad0c329c525d83c4a61d36ff611
diff --git a/extensions/openpower-pels/pel.hpp b/extensions/openpower-pels/pel.hpp
index ac1bddc..0e8ee1a 100644
--- a/extensions/openpower-pels/pel.hpp
+++ b/extensions/openpower-pels/pel.hpp
@@ -239,8 +239,10 @@
     /**
      * @brief Output a PEL in JSON.
      * @param[in] registry - Registry object reference
+     * @param[in] plugins - Vector of strings of plugins found in filesystem
      */
-    void toJSON(message::Registry& registry) const;
+    void toJSON(message::Registry& registry,
+                const std::vector<std::string>& plugins) const;
 
     /**
      * @brief Sets the host transmission state in the User Header
@@ -333,10 +335,14 @@
      * @param[in|out] pluralSections - Map used to track sections counts for
      *                                 when there is more than 1.
      * @param[in] registry - Registry object reference
+     * @param[in] plugins - Vector of strings of plugins found in filesystem
+     * @param[in] creatorID - Creator Subsystem ID (only for UserData section)
      */
     void printSectionInJSON(const Section& section, std::string& buf,
                             std::map<uint16_t, size_t>& pluralSections,
-                            message::Registry& registry) const;
+                            message::Registry& registry,
+                            const std::vector<std::string>& plugins,
+                            uint8_t creatorID = 0) const;
 
     /**
      * @brief The PEL Private Header section