PEL: Print Failing MTMS section into JSON
Remove any trailing whitespace for serial number.
"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "0x4552",
"Machine Type Model": "OPWR-131",
"Serial Number": "1318ABA"
},
Testing: Manually run peltool and verified output. All unit tests
passed.
Signed-off-by: Harisuddin Mohamed Isa <harisuddin@gmail.com>
Change-Id: I7a05790bdf406ef6d7946ffae831a45ee6dd5cda
diff --git a/extensions/openpower-pels/failing_mtms.hpp b/extensions/openpower-pels/failing_mtms.hpp
index 65186eb..8f5cd44 100644
--- a/extensions/openpower-pels/failing_mtms.hpp
+++ b/extensions/openpower-pels/failing_mtms.hpp
@@ -81,6 +81,12 @@
return _mtms.machineSerialNumber();
}
+ /**
+ * @brief Get section in JSON.
+ * @return std::optional<std::string> - Failing MTMS section in JSON
+ */
+ std::optional<std::string> getJSON() const override;
+
private:
/**
* @brief Validates the section contents