diff options
author | Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com> | 2018-03-09 15:49:50 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2018-04-22 21:13:32 +0300 |
commit | e37f8451795a5a17e14cf3bd13c72aa251c648f3 (patch) | |
tree | 136cf49989f86d7de82f915f3fb5a2d64a29396e /include/redfish_v1.hpp | |
parent | 580f37216643f85dadad69c918613dbd1c326f1a (diff) | |
download | bmcweb-e37f8451795a5a17e14cf3bd13c72aa251c648f3.tar.xz |
Adding Chassis and ChassisCollection Schemas to Redfish
This commit:
* removes previous redfish_v1 Chassis implementation
* Adds Chassis and ChassisCollection implementation as Node way
* Adds Chassis Provider class for retrieving data from EntityManager
It was tested:
* Wolfpass run, to see if previous functionality was not broken
* Service Validator, which did not unveil any regression, and did
verified that implemented schemas are complient.
Change-Id: I75a9545a0abd8b85d6ce72329c523fc076affc28
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
Signed-off-by: Rapkiewicz, Pawel <pawel.rapkiewicz@intel.com>
Diffstat (limited to 'include/redfish_v1.hpp')
-rw-r--r-- | include/redfish_v1.hpp | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/include/redfish_v1.hpp b/include/redfish_v1.hpp index 57ac7ea328..52b9410dcb 100644 --- a/include/redfish_v1.hpp +++ b/include/redfish_v1.hpp @@ -51,34 +51,6 @@ void request_routes(Crow<Middlewares...>& app) { res.end(); }); - CROW_ROUTE(app, "/redfish/v1/Chassis/") - .methods("GET"_method)( - [&](const crow::request& req, crow::response& res) { - std::vector<std::string> entities; - /*std::ifstream f("~/system.json"); - - nlohmann::json input = nlohmann::json::parse(f); - for (auto it = input.begin(); it != input.end(); it++) { - auto value = it.value(); - if (value["type"] == "Chassis") { - std::string str = value["name"]; - entities.emplace_back(str); - } - } - */ - - res.json_value = { - {"@odata.context", - "/redfish/v1/$metadata#ChassisCollection.ChassisCollection"}, - {"@odata.id", "/redfish/v1/Chassis"}, - {"@odata.type", "#ChassisCollection.ChassisCollection"}, - {"Name", "Chassis Collection"}, - {"Members@odata.count", entities.size()}}; - - get_redfish_sub_routes(app, "/redfish/v1/Chassis", res.json_value); - res.end(); - }); - CROW_ROUTE(app, "/redfish/v1/AccountService/Accounts/") .methods( "GET"_method)([&](const crow::request& req, crow::response& res) { |