Enhance system VPD map
This commit enhances system VPD map to incorporate useful
information about each critical keywords like the default
keyword value, if the keyword is restorable or not, if the
keyword is resettable at manufacturing or not, if a PEL
required or not when failed to restore the keywords.
Tested the following,
1. system VPD restore on cache via parser
2. system VPD restore on hardware via vpd-manager
3. system VPD restore via vpd-tool
4. system VPD reset via vpd-tool
Signed-off-by: Priyanga Ramasamy <priyanga24@in.ibm.com>
Change-Id: I29ae6016f6d84342a8ad91ba72617a45121cf8a6
diff --git a/types.hpp b/types.hpp
index a46e677..6579f99 100644
--- a/types.hpp
+++ b/types.hpp
@@ -61,6 +61,19 @@
using RestoredEeproms = std::tuple<Path, std::string, Keyword, Binary>;
using ReplaceableFrus = std::vector<VPDfilepath>;
using EssentialFrus = std::vector<Path>;
+using RecordName = std::string;
+using KeywordDefault = Binary;
+using isPELReqOnRestoreFailure = bool;
+using isMFGResetRequired = bool;
+using SystemKeywordInfo =
+ std::tuple<Keyword, KeywordDefault, isPELReqOnRestoreFailure,
+ isMFGResetRequired>;
+
+/** Map of system backplane records to list of keywords and its related data. {
+ * Record : { Keyword, Default value, Is PEL required on restore failure, Is MFG
+ * reset required }} **/
+using SystemKeywordsMap =
+ std::unordered_map<RecordName, std::vector<SystemKeywordInfo>>;
} // namespace inventory
} // namespace vpd