Backup & restore changes for bonnell's system VPD
This commit implements the changes of system backplane VPD backup on
the base banel VPD and restoring it from the base panel VPD
The bonnell BMC is embedded in the system backplane, so if either fails,
the backplane should be replaced as a whole. So the changes have been
made to backup the system backplane critical keywords on the operator
panel base EEPROM under the VSBK record.
Test:
Case 1: A PEL with error severity is created when the base
panel EEPROM file doesn't exist.
Case 2: A PEL with error severity is created when the base
panel VPD has ecc exceptions.
Case 3: A PEL with error severity is created when the base
panel EEPROM doesn't contain VSBK record.
Case 4: System VPD's critical keywords are backing up in the base panel
VPD
Case 5: System VPD's critical keywords are restoring from the base panel
VPD
Case 6: The VSBK record creation and population of properties on dbus
Case 7: A PEL with warning serverity is created when there is a
mismatch between system VPD & base panel keyword values.
Case 8: A PEL with error serverity is created when both the system VPD
& base panel keyword values are default.
Tests above works as expected.
Change-Id: Ieea6ff4e267518f010c924e2d51a2b080b47e91c
Signed-off-by: Kantesh Nagaradder <kantesh.nagaradder@ibm.com>
diff --git a/ibm_vpd_utils.hpp b/ibm_vpd_utils.hpp
index 4ebda1e..c5f3593 100644
--- a/ibm_vpd_utils.hpp
+++ b/ibm_vpd_utils.hpp
@@ -21,25 +21,38 @@
// Should be updated for another type of systems For those keywords whose
// default value is system specific, the default value field is left empty.
// Record : {Keyword, Default value, Is PEL required on restore failure, Is MFG
-// reset required}
+// reset required, backupVpdRecName, backupVpdKwName}
static const inventory::SystemKeywordsMap svpdKwdMap{
{"VSYS",
- {inventory::SystemKeywordInfo("BR", Binary(2, 0x20), true, true),
- inventory::SystemKeywordInfo("TM", Binary(8, 0x20), true, true),
- inventory::SystemKeywordInfo("SE", Binary(7, 0x20), true, true),
- inventory::SystemKeywordInfo("SU", Binary(6, 0x20), true, true),
- inventory::SystemKeywordInfo("RB", Binary(4, 0x20), true, true),
- inventory::SystemKeywordInfo("WN", Binary(12, 0x20), true, true),
- inventory::SystemKeywordInfo("RG", Binary(4, 0x20), true, true),
- inventory::SystemKeywordInfo("FV", Binary(32, 0x20), false, true)}},
+ {inventory::SystemKeywordInfo("BR", Binary(2, 0x20), true, true, "VSBK",
+ "BR"),
+ inventory::SystemKeywordInfo("TM", Binary(8, 0x20), true, true, "VSBK",
+ "TM"),
+ inventory::SystemKeywordInfo("SE", Binary(7, 0x20), true, true, "VSBK",
+ "SE"),
+ inventory::SystemKeywordInfo("SU", Binary(6, 0x20), true, true, "VSBK",
+ "SU"),
+ inventory::SystemKeywordInfo("RB", Binary(4, 0x20), true, true, "VSBK",
+ "RB"),
+ inventory::SystemKeywordInfo("WN", Binary(12, 0x20), true, true, "VSBK",
+ "WN"),
+ inventory::SystemKeywordInfo("RG", Binary(4, 0x20), true, true, "VSBK",
+ "RG"),
+ inventory::SystemKeywordInfo("FV", Binary(32, 0x20), false, true, "VSBK",
+ "FV")}},
{"VCEN",
- {inventory::SystemKeywordInfo("FC", Binary(), true, false),
- inventory::SystemKeywordInfo("SE", Binary(7, 0x20), true, true)}},
- {"LXR0", {inventory::SystemKeywordInfo("LX", Binary(), true, false)}},
+ {inventory::SystemKeywordInfo("FC", Binary(), true, false, "VSBK", "FC"),
+ inventory::SystemKeywordInfo("SE", Binary(7, 0x20), true, true, "VSBK",
+ "ES")}},
+ {"LXR0",
+ {inventory::SystemKeywordInfo("LX", Binary(), true, false, "VSBK", "LX")}},
{"UTIL",
- {inventory::SystemKeywordInfo("D0", Binary(1, 0x00), true, true),
- inventory::SystemKeywordInfo("F5", Binary(16, 0x00), false, true),
- inventory::SystemKeywordInfo("F6", Binary(16, 0x00), false, true)}}};
+ {inventory::SystemKeywordInfo("D0", Binary(1, 0x00), true, true, "VSBK",
+ "D0"),
+ inventory::SystemKeywordInfo("F5", Binary(16, 0x00), false, true, "VSBK",
+ "F5"),
+ inventory::SystemKeywordInfo("F6", Binary(16, 0x00), false, true, "VSBK",
+ "F6")}}};
/** @brief Return the hex representation of the incoming byte
*