summaryrefslogtreecommitdiff
path: root/redfish-core/lib/systems.hpp
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2020-04-15 05:36:33 +0300
committerGunnar Mills <gmills@us.ibm.com>2020-04-16 19:52:26 +0300
commitc1e236a6b2b1a6855c34279fb4800d8c5a15dfc2 (patch)
tree8b8f266b12f5387f16387e889314a59cba8f82a3 /redfish-core/lib/systems.hpp
parent450a25cbaf88b640ba55435bbb5bfa8901798c5e (diff)
downloadbmcweb-c1e236a6b2b1a6855c34279fb4800d8c5a15dfc2.tar.xz
System: Remove 2nd setting of "Id"
Id was already set to "system". This changes the Id from the Serial number to "system". Id now matches the last segment of the URL/@odata.id. Could not find a hard rule to require the Id to match the last segment of the URL/@data.id but all Redfish mockups match this way, other bmcweb resources do as well, and redfishtool is easier to use if this is true. Tested: Validator passes. curl -k https://${bmc}/redfish/v1/Systems/system/ ... "Description": "Computer System", "Id": "system", "IndicatorLED": "Off", "Links": { "Chassis": [ { "@odata.id": "/redfish/v1/Chassis/chassis" } ], Change-Id: Ib2cc34f033accfe6ed6236d512801674153944fc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/systems.hpp')
-rw-r--r--redfish-core/lib/systems.hpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 81f310782a..0d7e6f419d 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -532,8 +532,7 @@ void getComputerSystem(std::shared_ptr<AsyncResp> aResp,
}
}
}
- aResp->res.jsonValue["Id"] =
- aResp->res.jsonValue["SerialNumber"];
+
// Grab the bios version
fw_util::getActiveFwVersion(
aResp, fw_util::biosPurpose,