diff options
author | Gunnar Mills <gmills@us.ibm.com> | 2020-04-15 05:36:33 +0300 |
---|---|---|
committer | Gunnar Mills <gmills@us.ibm.com> | 2020-04-16 19:52:26 +0300 |
commit | c1e236a6b2b1a6855c34279fb4800d8c5a15dfc2 (patch) | |
tree | 8b8f266b12f5387f16387e889314a59cba8f82a3 | |
parent | 450a25cbaf88b640ba55435bbb5bfa8901798c5e (diff) | |
download | bmcweb-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>
-rw-r--r-- | redfish-core/lib/systems.hpp | 3 |
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, |