PEL: Still create callout without full loc code
When PELs are created early during a power on reset, the service that
expands location codes may not be online yet. Previously, callouts just
wouldn't be created if a location code couldn't be expanded.
Fix that so that a callout is still created with the unexpanded location
code, as that is still better than nothing. In those cases, the
CC/PN/FN fields would also be empty since those are obtained by finding
the FRU inventory path from the location code.
Also create a similar callout in the case where the call to get the
inventory path from a location code fails.
This applies for callouts created via:
- The PEL message registry
- The device path lookup tables
- JSON FFDC files
Tested:
New unit tests that cover these paths pass.
On a system, after stopping vpd-manager.service, will get callouts like:
```
"Callout Section": {
"Callout Count": "4",
"Callouts": [{
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "P0-C5",
"Part Number": "",
"CCIN": "",
"Serial Number": ""
}, {
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "E0",
"Part Number": "",
"CCIN": "",
"Serial Number": ""
}, {
"FRU Type": "Normal Hardware FRU",
"Priority": "Lowest priority replacement",
"Location Code": "P0",
"Part Number": "",
"CCIN": "",
"Serial Number": ""
}, {
"FRU Type": "Normal Hardware FRU",
"Priority": "Lowest priority replacement",
"Location Code": "P0-T4",
"Part Number": "",
"CCIN": "",
"Serial Number": ""
}]
}
```
Change-Id: Ia7e94f9d4848f78ba0b00023438c4db4135fed75
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
diff --git a/extensions/openpower-pels/src.hpp b/extensions/openpower-pels/src.hpp
index ff302e0..fa3a952 100644
--- a/extensions/openpower-pels/src.hpp
+++ b/extensions/openpower-pels/src.hpp
@@ -566,6 +566,18 @@
const DataInterfaceBase& dataIface);
/**
+ * @brief Adds a FRU callout with only the location code
+ *
+ * Used when it's known not all of the data is available,
+ * including possibly the expanded location code.
+ *
+ * @param[in] locationCode - The location code
+ * @param[in] priority - The callout priority
+ */
+ void addLocationCodeOnlyCallout(const std::string& locationCode,
+ const CalloutPriority priority);
+
+ /**
* @brief Extracts a CalloutPriority value from the json
* using the 'Priority' key.
*