Redfish: Fix managers UUID mixup
In redfish, there are 3 UUIDs.
1. Service root. This is unique to Redfish, and not needed outside the
service. It is generated on first startup, and persisted to
nonvolatile in the bmcweb_persistent_data.json file. This is the one
that is present in the ServiceRoot schema, as well as in the Systems
schema under the ServiceEntryPointUUID.
2. Managers. This UUID needs to match the UUID avaialble in IPMI, using
the Get Device GUID command. This is generated via the systemd
sd_id128_get_machine_app_specific call, with a matching application ID
in ipmi.
3. System. This UUID is generated from teh host system. In the case of
Power, it comes from settingsd. In the case of x86, it comes from
MDRv2.
This patchset corrects a few properties to pull from the correct place,
after some regressions in the last few weeks that weren't caught right
away.
Vernon has an oncoming patch to IPMI to correct the IPMI side of this.
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Change-Id: I98f3a06ba552c84142aaa749cfd199541a0ae1fd
diff --git a/redfish-core/lib/managers.hpp b/redfish-core/lib/managers.hpp
index 2df6034..5f5ef6e 100644
--- a/redfish-core/lib/managers.hpp
+++ b/redfish-core/lib/managers.hpp
@@ -944,8 +944,8 @@
res.jsonValue["PowerState"] = "On";
res.jsonValue["Status"] = {{"State", "Enabled"}, {"Health", "OK"}};
res.jsonValue["ManagerType"] = "BMC";
- res.jsonValue["UUID"] = uuid;
- res.jsonValue["ServiceEntryPointUUID"] = systemd_utils::getUuid();
+ res.jsonValue["UUID"] = systemd_utils::getUuid();
+ res.jsonValue["ServiceEntryPointUUID"] = uuid;
res.jsonValue["Model"] = "OpenBmc"; // TODO(ed), get model
res.jsonValue["LogServices"] = {