Fix wrong UUID interface
The system GUID should be get from the UUID interface [1]
[1] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Common/UUID.interface.yaml#L4
Tested:
1. Get system GUID via ipmi command:
$ ipmitool raw 0x06 0x37
de 01 70 5a 02 34 e5 ac ec 11 3b ed d8 8a 4d e7
2. The same as Redfish value:
/redfish/v1/Systems/system
Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com>
Change-Id: Ia57926cc9b8abad805dc9258ec159afceb0e8879
diff --git a/apphandler.cpp b/apphandler.cpp
index 8e47288..d0d77f8 100644
--- a/apphandler.cpp
+++ b/apphandler.cpp
@@ -843,8 +843,6 @@
auto ipmiAppGetSystemGuid() -> ipmi::RspType<std::array<uint8_t, 16>>
{
- static constexpr auto bmcInterface =
- "xyz.openbmc_project.Inventory.Item.Bmc";
static constexpr auto uuidInterface = "xyz.openbmc_project.Common.UUID";
static constexpr auto uuidProperty = "UUID";
@@ -853,7 +851,7 @@
{
// Get the Inventory object implementing BMC interface
auto busPtr = getSdBus();
- auto objectInfo = ipmi::getDbusObject(*busPtr, bmcInterface);
+ auto objectInfo = ipmi::getDbusObject(*busPtr, uuidInterface);
// Read UUID property value from bmcObject
// UUID is in RFC4122 format Ex: 61a39523-78f2-11e5-9862-e6402cfc3223