diff options
author | Shawn McCarney <shawnmm@us.ibm.com> | 2019-05-03 21:20:24 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-05-09 20:02:40 +0300 |
commit | 26f0389959179b37bae5410dfd5a84831fbdaee6 (patch) | |
tree | 113dda0097e517c902aea8219176189627c3693e /redfish-core/lib/chassis.hpp | |
parent | 49c53ac9b88fbf71f55076121a1605a760fa0096 (diff) | |
download | bmcweb-26f0389959179b37bae5410dfd5a84831fbdaee6.tar.xz |
Redfish: Remove BMCWEB_ENABLE_REDFISH_ONE_CHASSIS
Removed the BMCWEB_ENABLE_REDFISH_ONE_CHASSIS #define. The new support
for finding chassis sensors via associations is now used on all systems.
Test Plan:
https://gist.github.com/smccarney/f5b4783d8cf41a486ceff9b941b1ba9a
Tested: Verified the Chassis, Power, and Thermal output was valid on a
Witherspoon system. Verified sensor associations on Witherspoon
work with bmcweb implementation. Ran Redfish Service Validator.
Change-Id: I975f79da2c9de63e4ddd155d39ea872ca9fbffa9
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Diffstat (limited to 'redfish-core/lib/chassis.hpp')
-rw-r--r-- | redfish-core/lib/chassis.hpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/redfish-core/lib/chassis.hpp b/redfish-core/lib/chassis.hpp index 5cc4531055..ae3201a444 100644 --- a/redfish-core/lib/chassis.hpp +++ b/redfish-core/lib/chassis.hpp @@ -181,14 +181,6 @@ class ChassisCollection : public Node "/redfish/v1/$metadata#ChassisCollection.ChassisCollection"; res.jsonValue["Name"] = "Chassis Collection"; -#ifdef BMCWEB_ENABLE_REDFISH_ONE_CHASSIS - // Assume one Chassis named "chassis" - res.jsonValue["Members@odata.count"] = 1; - res.jsonValue["Members"] = { - {{"@odata.id", "/redfish/v1/Chassis/chassis"}}}; - res.end(); - return; -#endif const std::array<const char *, 3> interfaces = { "xyz.openbmc_project.Inventory.Item.Board", "xyz.openbmc_project.Inventory.Item.Chassis", @@ -268,16 +260,6 @@ class Chassis : public Node return; } const std::string &chassisId = params[0]; -#ifdef BMCWEB_ENABLE_REDFISH_ONE_CHASSIS - // In a one chassis system the only supported name is "chassis" - if (chassisId != "chassis") - { - messages::resourceNotFound(res, "#Chassis.v1_4_0.Chassis", - chassisId); - res.end(); - return; - } -#endif auto asyncResp = std::make_shared<AsyncResp>(res); crow::connections::systemBus->async_method_call( @@ -304,13 +286,11 @@ class Chassis : public Node std::pair<std::string, std::vector<std::string>>> &connectionNames = object.second; -// If only one chassis, just select the first one -#ifndef BMCWEB_ENABLE_REDFISH_ONE_CHASSIS if (!boost::ends_with(path, chassisId)) { continue; } -#endif + if (connectionNames.size() < 1) { BMCWEB_LOG_ERROR << "Only got " |