PEL: Read the compatible system names property

The chassis object in the inventory has (or rather at the time of this
writing: will have) a Names property that contains a list of the
compatible system types for the current system.  An example is:
["company-systemA-4G", "company-systemA", "company"].

Add this to the DataInterface class, and remove the previous
'getSystemType' API that was there but was still stubbed out.

Also change all the calls from getSystemType() to the new call
getSystemNames(), and check against all entries in that array to see if
the desired name applies to the current system.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I86aa0c15c564153fea612f407c161dfe9041fce6
diff --git a/extensions/openpower-pels/user_header.cpp b/extensions/openpower-pels/user_header.cpp
index 07c3de3..0e53acf 100644
--- a/extensions/openpower-pels/user_header.cpp
+++ b/extensions/openpower-pels/user_header.cpp
@@ -70,7 +70,7 @@
     {
         // Find the severity possibly dependent on the system type.
         auto sev =
-            getSeverity(entry.severity.value(), dataIface.getSystemType());
+            getSeverity(entry.severity.value(), dataIface.getSystemNames());
         if (sev)
         {
             _eventSeverity = *sev;
@@ -78,11 +78,15 @@
         else
         {
             // Someone screwed up the message registry.
+            std::string types;
+            const auto& compatibles = dataIface.getSystemNames();
+            std::for_each(compatibles.begin(), compatibles.end(),
+                          [&types](const auto& t) { types += t + '|'; });
+
             log<level::ERR>(
-                "No severity entry found for this error and system type",
+                "No severity entry found for this error and system name",
                 phosphor::logging::entry("ERROR=%s", entry.name.c_str()),
-                phosphor::logging::entry("SYSTEMTYPE=%s",
-                                         dataIface.getSystemType().c_str()));
+                phosphor::logging::entry("SYSTEMNAMES=%s", types.c_str()));
 
             // Have to choose something, just use informational.
             _eventSeverity = 0;
@@ -194,7 +198,7 @@
 
 std::optional<uint8_t> UserHeader::getSeverity(
     const std::vector<message::RegistrySeverity>& severities,
-    const std::string& systemType) const
+    const std::vector<std::string>& systemNames) const
 {
     const uint8_t* s = nullptr;
 
@@ -202,7 +206,8 @@
     // entry (where no system type is specified).
     for (const auto& sev : severities)
     {
-        if (sev.system == systemType)
+        if (std::find(systemNames.begin(), systemNames.end(), sev.system) !=
+            systemNames.end())
         {
             s = &sev.severity;
             break;