summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBorawski.Lukasz <lukasz.borawski@intel.com>2018-02-09 15:24:22 +0100
committerEd Tanous <ed.tanous@intel.com>2018-03-27 21:02:27 +0000
commit9c31068502b9b86745dc144b11a77725e836d465 (patch)
treeec5e453ac4997c083c9f9234ab12eca636cf02f9 /include
parent5d27b854e5b99a9ab3d3f5ad9f99094252d19092 (diff)
downloadbmcweb-9c31068502b9b86745dc144b11a77725e836d465.tar.gz
bmcweb-9c31068502b9b86745dc144b11a77725e836d465.zip
Redfish Manager and ManagerCollection
Node version of the Manager and ManagerCollection implementation. Change-Id: I693fa57add670fb0ecfc0cf0046e06142571c543 Signed-off-by: Borawski.Lukasz <lukasz.borawski@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/redfish_v1.hpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/include/redfish_v1.hpp b/include/redfish_v1.hpp
index 99e0b3c..57ac7ea 100644
--- a/include/redfish_v1.hpp
+++ b/include/redfish_v1.hpp
@@ -139,59 +139,6 @@ void request_routes(Crow<Middlewares...>& app) {
{{"@odata.id", "/redfish/v1/AccountService/Roles/NoAccess"}}}}}};
res.end();
});
-
- CROW_ROUTE(app, "/redfish/v1/Managers/")
- .methods("GET"_method)(
- [&](const crow::request& req, crow::response& res) {
- res.json_value = {
- {"@odata.context",
- "/redfish/v1/$metadata#ManagerCollection.ManagerCollection"},
- {"@odata.id", "/redfish/v1/Managers"},
- {"@odata.type", "#ManagerCollection.ManagerCollection"},
- {"Name", "Manager Collection"},
- {"Members@odata.count", 1},
- {"Members", {{{"@odata.id", "/redfish/v1/Managers/openbmc"}}}}};
- res.end();
- });
-
- CROW_ROUTE(app, "/redfish/v1/Managers/openbmc/")
- .methods(
- "GET"_method)([&](const crow::request& req, crow::response& res) {
- time_t t = time(NULL);
- tm* mytime = std::localtime(&t);
- if (mytime == nullptr) {
- res.code = 500;
- res.end();
- return;
- }
- std::array<char, 100> time_buffer;
- std::size_t len = std::strftime(time_buffer.data(), time_buffer.size(),
- "%FT%TZ", mytime);
- if (len == 0) {
- res.code = 500;
- res.end();
- return;
- }
- res.json_value = {
- {"@odata.context", "/redfish/v1/$metadata#Manager.Manager"},
- {"@odata.id", "/redfish/v1/Managers/openbmc"},
- {"@odata.type", "#Manager.v1_3_0.Manager"},
- {"Id", "openbmc"},
- {"Name", "OpenBmc Manager"},
- {"Description", "Baseboard Management Controller"},
- {"UUID", app.template get_middleware<PersistentData::Middleware>()
- .system_uuid},
- {"Model", "OpenBmc"}, // TODO(ed), get model
- {"DateTime", time_buffer.data()},
- {"Status",
- {{"State", "Enabled"}, {"Health", "OK"}, {"HealthRollup", "OK"}}},
- {"FirmwareVersion", "1234456789"}, // TODO(ed) get fwversion
- {"PowerState", "On"}};
- get_redfish_sub_routes(app, "/redfish/v1/Managers/openbmc/",
- res.json_value);
- res.end();
- });
-
}
} // namespace redfish
} // namespace crow
OpenPOWER on IntegriCloud