pel-quiesce: quiesce on error pels with callout

The PEL requirement is that if a nonInfo host PEL is logged, it has a
callout of any type within it, and the QuiesceOnHwError is enabled,
then the boot block / quiesce functionality should be executed.

Tested:

1) Verified nothing occurs when QuiesceOnHwError is not enabled

2) Injected info PEL with no callout and unrecoverable error with no
   callout with QuiesceOnHwError enabled and verified no actions were
   taken.

3) Injected Error PEL with callout and QuiesceOnHwError enabled
   and verified boot block logic was enabled.

Error inject which will create PEL with callout:
busctl call xyz.openbmc_project.Logging /xyz/openbmc_project/logging xyz.openbmc_project.Logging.Create Create ssa{ss} org.open_power.Logging.Error.TestError1 xyz.openbmc_project.Logging.Entry.Level.Error 0

Journal from fail:
Sep 09 14:03:30 w56 phosphor-log-manager[264]: Created PEL 0x50000266 (BMC ID 340) with SRC BD802003
Sep 09 14:03:30 w56 phosphor-log-manager[264]: QuiesceOnHwError enabled, PEL severity not nonError, and callout is present
Sep 09 14:03:30 w56 phosphor-log-manager[264]: QuiesceOnError set and callout present
Sep 09 14:03:30 w56 systemd[1]: Reached target Quiesce Target.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I09e3ced608ffd2661d9cf015a24d4e0d8a6a84bd
diff --git a/extensions/openpower-pels/pel.cpp b/extensions/openpower-pels/pel.cpp
index 64b0f59..f66d985 100644
--- a/extensions/openpower-pels/pel.cpp
+++ b/extensions/openpower-pels/pel.cpp
@@ -464,6 +464,34 @@
     return callouts;
 }
 
+bool PEL::isCalloutPresent() const
+{
+    auto pSRC = primarySRC();
+    if (!pSRC)
+    {
+        return false;
+    }
+
+    bool calloutPresent = false;
+    if ((*pSRC)->callouts())
+    {
+        for (auto& i : (*pSRC)->callouts()->callouts())
+        {
+            if (((*i).fruIdentity()))
+            {
+                auto& fruId = (*i).fruIdentity();
+                if ((*fruId).failingComponentType() != 0)
+                {
+                    calloutPresent = true;
+                    break;
+                }
+            }
+        }
+    }
+
+    return calloutPresent;
+}
+
 namespace util
 {