Redfish: Supporting ServiceRootUUID field for /redfish/v1/Managers/{ManagerId}schema
- Created a common utiity file called, systemd_utils.hpp to hold the function getUuid.
- Added json field support for ServiceEntryPointUUID field to retrieve it from system_utils.hpp.
- Amended the header file, service_root.hpp to get the uuid from the newly created system_utils.hpp file.
Changes tested with QEMU emulator and Witherspoon image => Passed
Redfish Validator => Passed
Change-Id: If7f2aba49942a0b315fb012da29af194ebd0ea6f
Signed-off-by: Bernard Wong <trials13@hotmail.com>
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index a9efb4c..65bea03 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -21,6 +21,7 @@
#include <boost/date_time.hpp>
#include <dbus_utility.hpp>
#include <sstream>
+#include <utils/systemd_utils.hpp>
#include <variant>
namespace redfish
@@ -944,6 +945,7 @@
res.jsonValue["Status"] = {{"State", "Enabled"}, {"Health", "OK"}};
res.jsonValue["ManagerType"] = "BMC";
res.jsonValue["UUID"] = uuid;
+ res.jsonValue["ServiceEntryPointUUID"] = systemd_utils::getUuid();
res.jsonValue["Model"] = "OpenBmc"; // TODO(ed), get model
res.jsonValue["LogServices"] = {