Update to Chassis 1.10 and add PCIeDeviceCollection support
v1.10 of Chassis adds a PCIeDeviceCollection. This change adds
support for the PCIeDeviceCollection and references it from
Chassis.
Tested:
Passed the Redfish Service Validator.
Change-Id: If3bb75f4fa90a9df4a2a94a7c7e0bcaf37673723
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp
index b08ab25..d8bc8f5 100644
--- a/redfish-core/lib/chassis.hpp
+++ b/redfish-core/lib/chassis.hpp
@@ -323,13 +323,16 @@
}
asyncResp->res.jsonValue["@odata.type"] =
- "#Chassis.v1_9_0.Chassis";
+ "#Chassis.v1_10_0.Chassis";
asyncResp->res.jsonValue["@odata.id"] =
"/redfish/v1/Chassis/" + chassisId;
asyncResp->res.jsonValue["@odata.context"] =
"/redfish/v1/$metadata#Chassis.Chassis";
asyncResp->res.jsonValue["Name"] = "Chassis Collection";
asyncResp->res.jsonValue["ChassisType"] = "RackMount";
+ asyncResp->res.jsonValue["PCIeDevices"] = {
+ {"@odata.id",
+ "/redfish/v1/Systems/system/PCIeDevices"}};
const std::string &connectionName =
connectionNames[0].first;
@@ -392,7 +395,7 @@
// Couldn't find an object with that name. return an error
messages::resourceNotFound(
- asyncResp->res, "#Chassis.v1_9_0.Chassis", chassisId);
+ asyncResp->res, "#Chassis.v1_10_0.Chassis", chassisId);
},
"xyz.openbmc_project.ObjectMapper",
"/xyz/openbmc_project/object_mapper",