summaryrefslogtreecommitdiff
path: root/redfish-core/lib/power.hpp
diff options
context:
space:
mode:
authorShawn McCarney <shawnmm@us.ibm.com>2019-03-08 19:42:51 +0300
committerEd Tanous <ed.tanous@intel.com>2019-03-20 18:13:53 +0300
commitde629b6ea81bf5308bdcbe5610ec8ea27a4016be (patch)
treebf1783d07ef59d9cf0dc1ccac9ca55eec747099c /redfish-core/lib/power.hpp
parent95897b20269638316c0f3262b8ea17a3e5329dd5 (diff)
downloadbmcweb-de629b6ea81bf5308bdcbe5610ec8ea27a4016be.tar.xz
Redfish: Enhance and fix power/thermal sensors
Made the following enhancements for Redfish power/thermal sensors: * Now dynamically obtains the DBus object path to pass to GetManagedObjects() when getting sensor values. Was previously hard-coded to "/" which didn't work on some systems. * Added "fan_tach" to list of DBus sensor types returned when thermal sensors are requested. * Added support for one-chassis systems. Made the following fixes: * Fixed @odata.id value when power sensors are requested. Previously returned "/redfish/v1/Chassis/chassis/Thermal". * Renamed "PowerSupply" to "PowerSupplies" to conform to schema. * Removed 6 properties that were being returned for PowerSupplies that were not in the schema. * Added check to make sure no sensors of the wrong type were being returned. Previously if the same connection (service) provided both power and thermal sensors, both types of sensors were always returned. Test Plan: https://gist.github.com/smccarney/79186e8510ba5479e846f2592d44d059 Tested: Verified the URLs /redfish/v1/Chassis/<chassis>/Power and /redfish/v1/Chassis/<chassis>/Thermal return the correct sensor names and values on a Witherspoon system. Verified fixes listed above worked. Ran Redfish Service Validator. Change-Id: I4bae615cb61fc436b3c0a9a5c4d6b4566a3ddaa6 Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/power.hpp')
-rw-r--r--redfish-core/lib/power.hpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/redfish-core/lib/power.hpp b/redfish-core/lib/power.hpp
index ebfac98e43..b1df101462 100644
--- a/redfish-core/lib/power.hpp
+++ b/redfish-core/lib/power.hpp
@@ -68,10 +68,6 @@ class Power : public Node
res.jsonValue["@odata.context"] = "/redfish/v1/$metadata#Power.Power";
res.jsonValue["Id"] = "Power";
res.jsonValue["Name"] = "Power";
-#ifdef BMCWEB_ENABLE_REDFISH_ONE_CHASSIS
- res.end();
- return;
-#endif
auto sensorAsyncResp = std::make_shared<SensorsAsyncResp>(
res, chassis_name, typeList, "Power");
// TODO Need to retrieve Power Control information.