diff options
author | Anthony Wilson <wilsonan@us.ibm.com> | 2019-06-11 18:44:47 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-09-24 20:18:55 +0300 |
commit | 95a3ecada41219555c5efe4080d6589dc2aaa411 (patch) | |
tree | bbe4e6593ce14d8f20179d4ae783d3e7ea539a04 /redfish-core/lib/chassis.hpp | |
parent | cecb4cb6f0423a86645b936b54b65707d1513f11 (diff) | |
download | bmcweb-95a3ecada41219555c5efe4080d6589dc2aaa411.tar.xz |
bmcweb: Implement SensorCollection
Add collection of all power and current sensors.
Testing: Verified SensorCollection and Sensor output
on a Witherspoon system.
Verified no errors from RedfishServiceValidator.
Change-Id: Icfdc14d738bf037d5d599a3c6fc0be5ea0919929
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/chassis.hpp')
-rw-r--r-- | redfish-core/lib/chassis.hpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp index 8553b2835d..8c1341465c 100644 --- a/redfish-core/lib/chassis.hpp +++ b/redfish-core/lib/chassis.hpp @@ -323,7 +323,7 @@ class Chassis : public Node } asyncResp->res.jsonValue["@odata.type"] = - "#Chassis.v1_4_0.Chassis"; + "#Chassis.v1_9_0.Chassis"; asyncResp->res.jsonValue["@odata.id"] = "/redfish/v1/Chassis/" + chassisId; asyncResp->res.jsonValue["@odata.context"] = @@ -369,6 +369,10 @@ class Chassis : public Node asyncResp->res.jsonValue["Power"] = { {"@odata.id", "/redfish/v1/Chassis/" + chassisId + "/Power"}}; + // SensorCollection + asyncResp->res.jsonValue["Sensors"] = { + {"@odata.id", "/redfish/v1/Chassis/" + + chassisId + "/Sensors"}}; asyncResp->res.jsonValue["Status"] = { {"State", "Enabled"}, }; @@ -388,7 +392,7 @@ class Chassis : public Node // Couldn't find an object with that name. return an error messages::resourceNotFound( - asyncResp->res, "#Chassis.v1_4_0.Chassis", chassisId); + asyncResp->res, "#Chassis.v1_9_0.Chassis", chassisId); }, "xyz.openbmc_project.ObjectMapper", "/xyz/openbmc_project/object_mapper", |