PEL: Add Symbolic FRU support to Callout
This adds a constructor that takes a priority, symbolic FRU, location
cod, and if the location code can be trusted enough that the FRU can be
replaced based on it. It then creates a FRUIdentity object with the
symbolic FRU.
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I38074467dd5dba6f9260d50afe93e08c7fe96cd2
diff --git a/extensions/openpower-pels/callout.cpp b/extensions/openpower-pels/callout.cpp
index 66181ff..a477803 100644
--- a/extensions/openpower-pels/callout.cpp
+++ b/extensions/openpower-pels/callout.cpp
@@ -108,6 +108,22 @@
_size = flattenedSize();
}
+Callout::Callout(CalloutPriority priority,
+ const std::string& symbolicFRUFromRegistry,
+ const std::string& locationCode, bool trustedLocationCode)
+{
+ _flags = calloutType | fruIdentIncluded;
+
+ _priority = static_cast<uint8_t>(priority);
+
+ setLocationCode(locationCode);
+
+ _fruIdentity = std::make_unique<FRUIdentity>(symbolicFRUFromRegistry,
+ trustedLocationCode);
+
+ _size = flattenedSize();
+}
+
void Callout::setLocationCode(const std::string& locationCode)
{
if (locationCode.empty())