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/section.hpp b/extensions/openpower-pels/section.hpp
index bf08aa5..0d079f2 100644
--- a/extensions/openpower-pels/section.hpp
+++ b/extensions/openpower-pels/section.hpp
@@ -72,6 +72,17 @@
     }
 
     /**
+     * @brief Get section in JSON. Derived classes to override when required to.
+     * @param[in] creatorID - Creator Subsystem ID from Private Header
+     * @return std::optional<std::string> - If a section comes with a JSON
+     * representation, this would return the string for it.
+     */
+    virtual std::optional<std::string> getJSON(uint8_t creatorID) const
+    {
+        return std::nullopt;
+    }
+
+    /**
      * @brief Shrinks a PEL section
      *
      * If this is even possible for a section depends on which section